malcontent
Off on a Comet
- Joined
- Feb 15, 2017
- Messages
- 27
- Reaction score
- 11
- Points
- 18
I have been working on a simulation and have got a spaceship in orbit around a planet. Now I want to present some information useful for navigation, in particular for landing on the surface. So the speed the surface moving under you is important, but for the life of me I can not figure it out or find the right information on the web (or the math forum)
I have two hunches. The first is that I need to find the tangential plane to the surface of the planet and project the velocity vector onto this plane, which will match the vector you find in this plane for the velocity of the rotation of the body. This is not a simple orthogonal projection though, so there I get stuck.
My second hunch is that there's a chance converting the vector represention to Kepler elements might be better, scaling the distance between two moments in time to the circle the ship orbits, but perhaps this is only easier in the idealised circular, non inclined orbit. (Isn't everything?)
Some details:
This simulation is running on a 1mhz Commodore 64, so it's highly likely the code to calc the speed, will take as long as updating the physics, I might have to forego considering the rotation speed, but basically the point is I am looking for a method that is both computationally cheap, and memory friendly. Approximations are okay, because of the resoloution of the dimensions, you'll be landing at unrealistic speeds anyway. I have slow and accurate trig routines, and fast and approximate ones, so with lots of fast trig the errors compound.
Any pointers are appreciated. Nice to be on this forum, and hope to have anyone interested flying an 8-bit spaceship soon.
I have two hunches. The first is that I need to find the tangential plane to the surface of the planet and project the velocity vector onto this plane, which will match the vector you find in this plane for the velocity of the rotation of the body. This is not a simple orthogonal projection though, so there I get stuck.
My second hunch is that there's a chance converting the vector represention to Kepler elements might be better, scaling the distance between two moments in time to the circle the ship orbits, but perhaps this is only easier in the idealised circular, non inclined orbit. (Isn't everything?)
Some details:
This simulation is running on a 1mhz Commodore 64, so it's highly likely the code to calc the speed, will take as long as updating the physics, I might have to forego considering the rotation speed, but basically the point is I am looking for a method that is both computationally cheap, and memory friendly. Approximations are okay, because of the resoloution of the dimensions, you'll be landing at unrealistic speeds anyway. I have slow and accurate trig routines, and fast and approximate ones, so with lots of fast trig the errors compound.
Any pointers are appreciated. Nice to be on this forum, and hope to have anyone interested flying an 8-bit spaceship soon.