Hi, all
I've been conducting a number of simple tests of the accuracy of Orbiter's underlying numerical integration scheme and I thought I would share the results.
I've written a small program that calculates the solution of the parabolic Lambert problem with essentially arbitrary precision. The parabolic Lambert problem can be stated as: calculate both the initial velocity vector at and time of flight needed to travel along a ballistic parabolic trajectory from one point, A, to another point, B, under the influence of a single Newtonian gravitating body (in this case, the Sun).
The 'test', then, is to enter manually the 'firing solution' into Orbiter and then 'time-warp' forward to see how close to the destination point, B, Orbiter's numerical integration of the ballistic trajectory goes. If Orbiter's numerical integration is typically 'close' to the destination point, B, it means two things: first, n-body planetary perturbations for parabolic motion are, for the most part, not particularly significant; and second, Orbiter's underlying numerical integration engine is accurate - i.e., it isn't really a random number generator in disguise. Furthermore, if one gets essentially the same results for different 'time-warp' values (e.g., 1,000x, 10,000x and 100,000x), then the integrator is probably robust to changes in 'time-warp.
To cut a long story short, Orbiter's numerical integration engine seems to be surprisingly accurate. At 10,000x and 100,000x, the integrated ballistic trajectory seems to be essentially identical (to within a few km over flight path distances of around 5 AU).
As for the accuracy of the 2-body parabolic ballistic trajectory, this too seems to provide a very good 'first guess' of the (parabolic) ballistic trajectory between two points in the solar system's n-body gravitational field. As an example, I placed a ship close to Earth's orbit (but not close to Earth) and calculated the ballistic trajectory to Olympus Base on the surface of Mars. The parabolic trajectory was directed 'the long way' around the Sun, with a solar periapsis of 0.765 AU. Duration of flight was 111.4 days. At a time-warp of 10,000x, and following the ballistic trajectory (without any form of mid course correction, of course), Orbiter then had the ship pass overhead Olympus Base at an altitude of 300km. The Mars encounter velocity was around 60+ km/sec which is the sort of speed one would expect for a comet-like, parabolic trajectory.
(It is likely that that the the residual 'error' of 300km is due to n-body perturbations, but I will need to work a little harder to find an accurate 'n-body' firing solution rather that the simple analytical, '2-body' solution.)
For those interested, the analytical 2-body parabolic trajectory firing solution for this example is as follows:
Firing date: MJD 51870.619542570596
Firing co-ordinates:
X 149597870700.0 m
Y 0.0 m
Z 14959787070.0 m
dX/dt -16773.33218530575 m/s
dY/dt 595.872620354075 m/s
dZ/dt -38519.48368154611 m/s
If one wishes to enter this 'firing solution' into Orbiter, the procedure for doing this is as follows:
1. Have Orbiter 'focus' on an undocked Delta Glider
2. 'Pause' Orbiter by hitting Ctrl-P ttemprarily suspend the Orbiter integration engine. While paused make a series of changes using the scenario editor as follows:
a. Open the Scenario Editor and in the 'and amend the current date to the 'Firing Date' given above by using 'copy & paste'. Remember to 'apply' the date before moving on
b. Now use the Scenario Editor to update the state vectors of the ship as per the above. Before entering these changes, change the orbit reference to "Sun / Ecliptic / Cartesian". (This is on the right-hand side of the same panel for changing the state vectors)
c. Use scenario editor to 'Kill Rotation' for the ship by setting all of the angular velocity components to zero (This doesn't affect the trajectory, but simply stops the ship from making arbitrary rotations - a nuisance at high time-warp)
6. Hit 'Ctrl-P' again to start the Orbiter integration engine
7. Time-warp at, say, 10,000x or 100,000x. Open MFDs of your choice and watch the solar system go by until your reach Mars.
I've been conducting a number of simple tests of the accuracy of Orbiter's underlying numerical integration scheme and I thought I would share the results.
I've written a small program that calculates the solution of the parabolic Lambert problem with essentially arbitrary precision. The parabolic Lambert problem can be stated as: calculate both the initial velocity vector at and time of flight needed to travel along a ballistic parabolic trajectory from one point, A, to another point, B, under the influence of a single Newtonian gravitating body (in this case, the Sun).
The 'test', then, is to enter manually the 'firing solution' into Orbiter and then 'time-warp' forward to see how close to the destination point, B, Orbiter's numerical integration of the ballistic trajectory goes. If Orbiter's numerical integration is typically 'close' to the destination point, B, it means two things: first, n-body planetary perturbations for parabolic motion are, for the most part, not particularly significant; and second, Orbiter's underlying numerical integration engine is accurate - i.e., it isn't really a random number generator in disguise. Furthermore, if one gets essentially the same results for different 'time-warp' values (e.g., 1,000x, 10,000x and 100,000x), then the integrator is probably robust to changes in 'time-warp.
To cut a long story short, Orbiter's numerical integration engine seems to be surprisingly accurate. At 10,000x and 100,000x, the integrated ballistic trajectory seems to be essentially identical (to within a few km over flight path distances of around 5 AU).
As for the accuracy of the 2-body parabolic ballistic trajectory, this too seems to provide a very good 'first guess' of the (parabolic) ballistic trajectory between two points in the solar system's n-body gravitational field. As an example, I placed a ship close to Earth's orbit (but not close to Earth) and calculated the ballistic trajectory to Olympus Base on the surface of Mars. The parabolic trajectory was directed 'the long way' around the Sun, with a solar periapsis of 0.765 AU. Duration of flight was 111.4 days. At a time-warp of 10,000x, and following the ballistic trajectory (without any form of mid course correction, of course), Orbiter then had the ship pass overhead Olympus Base at an altitude of 300km. The Mars encounter velocity was around 60+ km/sec which is the sort of speed one would expect for a comet-like, parabolic trajectory.
(It is likely that that the the residual 'error' of 300km is due to n-body perturbations, but I will need to work a little harder to find an accurate 'n-body' firing solution rather that the simple analytical, '2-body' solution.)
For those interested, the analytical 2-body parabolic trajectory firing solution for this example is as follows:
Firing date: MJD 51870.619542570596
Firing co-ordinates:
X 149597870700.0 m
Y 0.0 m
Z 14959787070.0 m
dX/dt -16773.33218530575 m/s
dY/dt 595.872620354075 m/s
dZ/dt -38519.48368154611 m/s
If one wishes to enter this 'firing solution' into Orbiter, the procedure for doing this is as follows:
1. Have Orbiter 'focus' on an undocked Delta Glider
2. 'Pause' Orbiter by hitting Ctrl-P ttemprarily suspend the Orbiter integration engine. While paused make a series of changes using the scenario editor as follows:
a. Open the Scenario Editor and in the 'and amend the current date to the 'Firing Date' given above by using 'copy & paste'. Remember to 'apply' the date before moving on
b. Now use the Scenario Editor to update the state vectors of the ship as per the above. Before entering these changes, change the orbit reference to "Sun / Ecliptic / Cartesian". (This is on the right-hand side of the same panel for changing the state vectors)
c. Use scenario editor to 'Kill Rotation' for the ship by setting all of the angular velocity components to zero (This doesn't affect the trajectory, but simply stops the ship from making arbitrary rotations - a nuisance at high time-warp)
6. Hit 'Ctrl-P' again to start the Orbiter integration engine
7. Time-warp at, say, 10,000x or 100,000x. Open MFDs of your choice and watch the solar system go by until your reach Mars.
Last edited: