Question Getting orbit information?

dmurley

New member
Joined
Dec 11, 2017
Messages
37
Reaction score
0
Points
0
Location
Hill country (near San Antonio
1) Is there a way to get information on orbit eccentricity using Lua?
2) Is there a way to get information on time to apoapsis?

Okay. I figured out how to get tables with the information I need. What I don't know is how to extract information from the tables.

Thanks.

David
 
Last edited:

dgatsoulis

ele2png user
Joined
Dec 2, 2009
Messages
1,774
Reaction score
8
Points
38
Location
Sparta
To learn how to use tables in lua, check out this tutorial:

Tables Tutorial

In the case of the orbital elements and parameters, you get two tables if you use v:get_elementsex()

el,op = v:get_elementsex()

To access the value associated with the key in a table you can use the table[key] syntax:

You can get the value by using the string for that value.

sma = el['a'] get the value of 'a' for table el (Semi-major axis)
sma = el.a same as above with different syntax
 
Last edited:
Top