Modelling planet motion for a space sim

evilfer

New member
Joined
Dec 9, 2010
Messages
53
Reaction score
0
Points
0
Hi all,

I have a couple of questions about modelling planet motion in the Solar System.

First, the motivation: I'm writing a small space simulator. Not like Orbiter, but something like a planning tool: a software that helps you in setting (complex) space flights, which may involve several maneuvers.

I'd like to use it to plan mission and then try to fly them with Orbiter. I'm thinking for instance on the trajectory of the JWST, which is something I'm not capable of planning with Orbiter alone :).

Thus, I need data about the position of planets during the mission. The position should be precise enough for the mission to fly similarly in my sim and then in Orbiter. So far I got it from the Horizons System. As I don't know much about Astronomy, I have the following questions (well, many questions, here are just a couple):

- Do you know a better (fast, precise) way of obtaining/computing the position of planets?

- I'm currently interpolating their positions from points (from Horizons System) 2-hours apart. Any idea about the time gap between points for decent precision?

- Also, I've implemented a simple linear interpolation, without using the planets' velocity vectors (also available). I did search but found no information about what's the best interpolation method for my case. Any recommendations on this?

Best regards and thank you,
Eloy

PD: One final question: do you think this software might be useful? :)
 
Thus, I need data about the position of planets during the mission. The position should be precise enough for the mission to fly similarly in my sim and then in Orbiter. So far I got it from the Horizons System. As I don't know much about Astronomy, I have the following questions (well, many questions, here are just a couple):

- Do you know a better (fast, precise) way of obtaining/computing the position of planets?
Orbiter uses VSOP87, which is probably not as accurate as JPL Horizons. I don't know about speed comparison. For performance reasons, orbiter usually doesn't use all the terms of the series expansion (this can be adjusted with the ErrorLimit entry).

- I'm currently interpolating their positions from points (from Horizons System) 2-hours apart. Any idea about the time gap between points for decent precision?
Depends. What interpolation are you using? Linear in cartesian coordinates? Linear in polar coordinates? Linear in orbital elements? Higher order? Different planets will require different interpolation intervals. To see the intervals Orbiter is using (in seconds), see the "SamplingInterval" entries in the individual planet cfg files.
- Also, I've implemented a simple linear interpolation, without using the planets' velocity vectors (also available). I did search but found no information about what's the best interpolation method for my case. Any recommendations on this?
Linear in what? Interpolating the polar coordinates is probably several orders of magnitude more accurate than interpolating the cartesian coordinates at the same sampling intervals.
 
AFAIK VSOP87 is the standard for the calculation (as opposed to lookup which is essentially what you're doing) of planetary positions (Ephemerides). There are any number of software implementations including the one in Orbiter itself - at least one of them should be free to use. Using the Horizons data and interpolating seems like doings things backwards to me.
 
Orbiter uses VSOP87, which is probably not as accurate as JPL Horizons. I don't know about speed comparison. For performance reasons, orbiter usually doesn't use all the terms of the series expansion (this can be adjusted with the ErrorLimit entry).


Depends. What interpolation are you using? Linear in cartesian coordinates? Linear in polar coordinates? Linear in orbital elements? Higher order? Different planets will require different interpolation intervals. To see the intervals Orbiter is using (in seconds), see the "SamplingInterval" entries in the individual planet cfg files.

Linear in what? Interpolating the polar coordinates is probably several orders of magnitude more accurate than interpolating the cartesian coordinates at the same sampling intervals.

Hi, thank you for the answers :).

I took a look at the cfg files, Orbiter samples the Earth position every 79 seconds while I'm sampling every 7200s :S.

I'm using cartesian linear interpolation. I guess an advantage of this approach is that I don't need any computation for each sample, and only very simple computations for the interpolation. Also, I get Cartesian position vectors from HORIZONS, so everything is easy.

On the other hand, now I wonder whether the combination of Cartesian interpolation and long sampling intervals might result in "too bad precision" (the measurement of precision quality for my sim would be similarity with Orbiter).

Additionally, another disadvantage of my current system is the size of stored data. Sampling positions every 7200s requires (in uncompressed binary files, 32bits/number) around 0.1MB/body/year, which is not little I guess.


AFAIK VSOP87 is the standard for the calculation (as opposed to lookup which is essentially what you're doing) of planetary positions (Ephemerides). There are any number of software implementations including the one in Orbiter itself - at least one of them should be free to use. Using the Horizons data and interpolating seems like doings things backwards to me.

After reading your answers I also feel my current implementation is a little backwards :), I can say at least it was very simple to have something running quickly.

So, I think I need to try VSOP87 and compare both systems. Only in the case of relevant performance difference I would keep my current system, but the more I think of this, the more unlikely this appears to me.

Thank you for your help, I love learning about this stuff!
Eloy

PD: A cognac is what I need right now...
 
Check out SPICE: http://naif.jpl.nasa.gov/naif/

...kinda solves your problems completely


Thank you for the link! It seems that through SPICE I can process all bodies (including moons, big asteroids, etc.) in the same way. In contrast, I could only find VSOP87 data for the Sun, Moon and planets, but not for other bodies.

Then, I'll use SPICE first, and later investigate VSOP87E more. I guess it makes sense to let the user decide the data source for their simulations :).

Eloy
 
Back
Top