I am (like a hundred other people, like a thousand other people) trying to make a space flight simulator. I'm not a student. (That said, I found Orbit – space flight sim. It’s excellent.* You should try it.)
I have an Orbit object but, I can’t find all the functions I need. All of you must have a library/class that can manage an orbit. I Googled and looked on Github. If not a whole class, I’m looking for a functions (formulas) to get vectors for a prograde, retrograde, normal, anti-normal directions in an orbit.
- When you use the autopilot to roll from Prograde to Normal (+), for example, it only needs to roll on one axis (Y if Y is up from the planet) but, it starts to roll on other axis, too. So, I’m working on a better roll program. I tried rewriting lerp to make it roll on the axis with the longest roll first and the others as needed (there percentage of their roll was less than the inverse of time (1 – t)); I.e., rolling on only the Y axis from 0 to 90 degs, without changing the other angles (assuming that they were already in one autopilot mode). V1( 0, 0, 0).mult(rad) to V2( 0, 90, 0).mult(rad). But, I can’t find out how to get a retrograde vector from an orbit. Well, I can draw an oval representing my orbit, and I can take two locations a degree apart, get the difference, normalize it and, hopefully, it gives me a prograde vector, but I think there might be a better way.
I found orekit but can’t make heads or tails of it. It looks like a bunch of dat file but I don’t see any code.
Can someone offer me a class or point me to one?
Can someone tell me how to calculate prograde, etc., from Vector r and Vector v?
Can someone rewrite lerp (or slerp) to make the biggest change first (and maybe skipping the other axis if they don’t need to be changed)? Oh and, the following is good but, doesn’t give me all I need. Get r (bold) and v (bold) from r and v. Say what!? I’m looking at that again.