SDK Question Barycenter velocity?

Ajaja

Active member
Joined
Apr 20, 2008
Messages
240
Reaction score
127
Points
43
How to get barycenter velocity? I need it for calculation of Lagrange points for planets. oapiGetBarycentre returns position only :(
 
If the primary body you are interested supports ephemeris calculation (all the major bodies in Orbiter do) then you can get the barycentre velocity by calling the planets clbkEphemeris function.

EDIT: If the body doesn't support ephemeris calculation you can get an ordered list of bodies (see this thread for ideas on how to do that) then calculate the barycentre velocity from the mass and velocity of the parent object and all its children:
 
If the primary body you are interested supports ephemeris calculation (all the major bodies in Orbiter do) then you can get the barycentre velocity by calling the planets clbkEphemeris function.
For Earth clbkEphemeris/clbkFastEphemeris return only EPHEM_TRUEPOS|EPHEM_TRUEVEL|EPHEM_POLAR. Not EPHEM_BARYPOS/EPHEM_BARYVEL
:(

EDIT: If the body doesn't support ephemeris calculation you can get an ordered list of bodies (see this thread for ideas on how to do that) then calculate the barycentre velocity from the mass and velocity of the parent object and all its children:
Thanks! I'll go this way.

But, if oapiGetBarycentre is here, why is there not some oapiGetBarycentreVel function in SDK?
 
Last edited:
For Earth clbkEphemeris/clbkFastEphemeris return only EPHEM_TRUEPOS|EPHEM_TRUEVEL|EPHEM_POLAR. Not EPHEM_BARYPOS/EPHEM_BARYVEL
:(


Thanks! I'll go this way.

But, if oapiGetBarycentre is here, why is there not some oapiGetBarycentreVel function in SDK?
I had the same problem when updating the TransX code. I had to write my own function to get the barycentric velocity by the method mentioned above.
 
Back
Top