- #1
CrLf
- 4
- 0
hey everyone
i hope to find the answer to my troubles here :)
basically i have written a gravity simulator, it loads bodies from a file containing information on each body. using the orbital elements on each body taken from nasa's HORIZON system, i calculate the position and velocity of each body to be loaded in the simulator (currently i have data for about 30 bodies, the main planets, moons of jupiter, dwarf planets etc)
and while this system works fine, the positions/velocities are worked out ok, i have trouble converting them back accurately in certain scenarios
the equations i have work properly given the data i feed them (position/velocity) and when for example i work with a 2 body situation of sun and earth, the elements reproduce as expected, a slight change in inclination/perihelion/eccentricity/semimajoraxis as the days tick bye, but this could be attributed to rounding errors, or the fact the initial data was given based on a full-body simulation, not just 2
however my problem comes when i add the moon in. While the interactions between the two are accurate, when i come to recalculate the orbital elements of the earth, they go a little haywire
i know that the moon changes the path of the earth, and as a result it will effect the elements, but unfortunately it changes them too much for me to be able to note over time the gradual change.
the swing happens on all the elements over a period of about 20 days simulator time and is quite annoying :(
i know i could use the earth-moon barycentre to calculate the orbital elements, and that these would remain somewhat more constant, but it isn't a true reflection of the Earth orbit (not to mention the oribtal elements on the horizon site are different for earth/moon barycentre) and then i have the issue of the moons elements with respect to earth, and if i use the earth-moon barycentre this will get annoying when it comes to tracking the movement of the moon away from the Earth once i include tidal forces
the end goal doesn't involve earth/moon but Jupiter and its moons which given the greater number of bodies will compound the problem more
how do i fix this??
should the orbital elements be calculated with respect to the bodies primary body (ie earth-sun, moon-earth) rather than the barycentre of the system, ie earth-sun system barycentre instead of the sun's position
i hope to find the answer to my troubles here :)
basically i have written a gravity simulator, it loads bodies from a file containing information on each body. using the orbital elements on each body taken from nasa's HORIZON system, i calculate the position and velocity of each body to be loaded in the simulator (currently i have data for about 30 bodies, the main planets, moons of jupiter, dwarf planets etc)
and while this system works fine, the positions/velocities are worked out ok, i have trouble converting them back accurately in certain scenarios
the equations i have work properly given the data i feed them (position/velocity) and when for example i work with a 2 body situation of sun and earth, the elements reproduce as expected, a slight change in inclination/perihelion/eccentricity/semimajoraxis as the days tick bye, but this could be attributed to rounding errors, or the fact the initial data was given based on a full-body simulation, not just 2
however my problem comes when i add the moon in. While the interactions between the two are accurate, when i come to recalculate the orbital elements of the earth, they go a little haywire
i know that the moon changes the path of the earth, and as a result it will effect the elements, but unfortunately it changes them too much for me to be able to note over time the gradual change.
the swing happens on all the elements over a period of about 20 days simulator time and is quite annoying :(
i know i could use the earth-moon barycentre to calculate the orbital elements, and that these would remain somewhat more constant, but it isn't a true reflection of the Earth orbit (not to mention the oribtal elements on the horizon site are different for earth/moon barycentre) and then i have the issue of the moons elements with respect to earth, and if i use the earth-moon barycentre this will get annoying when it comes to tracking the movement of the moon away from the Earth once i include tidal forces
the end goal doesn't involve earth/moon but Jupiter and its moons which given the greater number of bodies will compound the problem more
how do i fix this??
should the orbital elements be calculated with respect to the bodies primary body (ie earth-sun, moon-earth) rather than the barycentre of the system, ie earth-sun system barycentre instead of the sun's position