My problem that I try to solve:
I am trying to set up a Distance Retrograde orbit (DRO) cca. 70 000 km around the Moon as the Orion capsule did it recently. It is a multiple body situation, where both the Moon and the Earth is effecting the capsule. I try to monitor the distance to the Moon (RaD) as the capsule passing the Earth - Moon line both in front and behind the Moon. This is not a closed orbit, a bit chaotic, so I have to check the RaD values continuously. Unfortunatelly the <vessel>:get_element() function seems to return the parameters relative to the Sun in this case. If I try an orbit near to the Moon, it passes the Moon related values. At the RDO, if I set REF=Moon on one of the MFDs in the DG, that shows me the RaD correctly on the screen. But I can't acces that from the LUA script.