Having sex in a car or having sex in a public place is not in itself illegal. To allow a willing person to watch that act can not be illegal. What is illegal is if that act be seen by a third party who is able to report the matter as something that has caused them offence or intimidation. To expose yourself to a willing person is not illegal, but it seen by a third party it could be construed as indecent exposure.
There are laws that protect members of the public from being unwilling witnesses to sexual behaviour or from being harassed or intimidated in their use of public spaces or facilities. So sex in public toilets, parks or places where other passers-by may be offended is illegal.
If you are in a private place or in a location where you wouldn't expect to be spied upon, then you're probably okay. Prosecution relies on a third party onlooker getting upset and reporting you. So, if you want sex under the stars, make sure you pick a secluded spot.