The open lewdness law is the most likely charge:
§ 5901. Open lewdness.
A person commits a misdemeanor of the third degree if he does any lewd act which he knows is likely to be observed by others who would be affronted or alarmed.
As you can see, the element is "knows is likely to be observed". In my opinion, you would have a viable defense by arguing that it took place in an area where you knew noone would observe. It may not fly, depending on the attitude of the prosecutor and judge. The counter would be that one should know that they could be observed in any public place. Still, the defense is worth making. It might give you leverage to negotiate a better deal.
Lewdness is a misdemeanor of the third degree with fine of $250 to $5000 and/or imprisonmnet not more than 90 days.
The information is provided for discussion and entertainment purposes only. I believe in helping people and answering their questions and providing information and solutions. To encourage and facilitate this practice, it is understood and agreed by the recipient that by opening, reading, accepting, and viewing this information, no attorney-client relationship has been discussed, agreed to or otherwise established. In legal matters, time is of the essence. As such, you should contact an experienced lawyer right away to protect your legal rights!
I appreciate your "Accepting" my answer if it has been helpful to you. Doing so allows me to continue helping in this manner. I will be available for follow-up questions should you have them after you click "Accept". Thank you.