Page 1 of 1

Looking for an easy-to-implement way of doing interpolation

Posted: 07.06.2006, 08:52
by Lunar
I am working on a simulation in Celestia, spacecraft around a planet using an XYZ orbit file. This all works, no problems there.

To get a nice animation I calculated a, what I call, horizon XYZ file and camera XYZ file (and corresponding objects). The horizon file uses the entries from the spacecraft XYZ file and calculates the corresponding point on the horizon that is in the orbital plane in flight direction. The camera file uses the entries from the spacecraft XYZ file and the newly calculated horizon entries to calculate a position some 50m behind the spacecraft on the line horizon-spacecraft. The animation then starts with the observer being in the camera location and following it, while tracking the horizon. To my disappointment you then see the spacecraft wobble up and down and left to right in the observer field-of-view. Probably due to the fact that the entries in the spacecraft XYZ file are 1 to 3 minutes apart from each other and the interpolation algorithm in Celestia could be better? There's no doubt really about the accuracy of the spacecraft XYZ file.
Anyone knows of an effective, easy-to-implement way of doing interpolation? Then I could create an XYZ file that has entries every second for instance. Open for all suggestions!

Cheers!!

Re: Looking for an easy-to-implement way of doing interpolat

Posted: 07.06.2006, 18:51
by hank
Lunar wrote:Open for all suggestions!

Have you considered using a CELX script to control the observer?

- Hank