Position query based on defined reference body

ghrasko

New member
Joined
May 27, 2008
Messages
18
Reaction score
0
Points
1
I am trying to continuously record (and use) the position relative to the Moon in a scenario, where the gravity effect of the Earth and the Sun is not negligible (Distant Retrograde Orbit - DRO). In this situation I can still follow the orbit parameters relative to the Moon and to the Earth on the MDFs if I set the REF accordingly. Of course their predictions of the orbit are not accurate as both bodies will effect the orbit finally, but as a minimum the distance to the defined body (RaD) is always correct. However, if I ask the orbit parameters via LUA as...

orion = vessel.get_interface('orion') el,op = orion:get_elementsex() term.out(op)

... I will get back the orbit data as REF=Sun - probably because it is not only the Moon that effects the spaceship.

Is it possible somehow to query these data via LUA for a defined reference object? If not, can I get that data by programming a module or similar object in C++?
 
Last edited:

ghrasko

New member
Joined
May 27, 2008
Messages
18
Reaction score
0
Points
1
I find useful information here in the help doc:
orbiter/Html/Main/Script/mtd_vessel.htm

Based on that I can ask for relative position:

orion = vessel.get_interface('orion') href=oapi.get_objhandle('moon') glob = orion:get_globalpos(href) equ = oapi.global_to_equ(moon,glob) term.out(equ.rad) )

I think, this is OK.
 
Last edited:
Top