Orbital Mechanics

前端 未结 5 710
情书的邮戳
情书的邮戳 2021-02-03 10:05

Does anyone have an example of implementing Orbital Mechanics (preferably in XNA)? The code I am currently using is below, but it doesn\'t \"feel right\" when it executes. The

5条回答
  •  忘了有多久
    2021-02-03 11:02

    A passing object will not enter orbit. One characteristic of an orbit is that you will return to the same point (relative to the body being orbited) with the same velocity. If you started from effective infinity, you'll go back to effective infinity.

    In order to enter orbit, you will need to change the velocity at some point in a way unrelated to gravity, or perhaps have additional large bodies. Similarly, you can't launch an object into orbit from the surface: you have to have something (like a last rocket burn) once the satellite reaches the desired altitude. Otherwise it will try to return to the launch point, which is on the surface.

    Some of my worst debugging experiences were when the program was fine and my test data or calculations were off. Make sure you know what to look for.

提交回复
热议问题