- add a "static" orbit for bodies that are not moving anywhere
- now bodies in a rotating frame and also in the spaceport frame have
such "static" orbits
- add display of the orbits of objects moving strictly to the star or
from the star
- fix compile warning for possibly uninitiated variable in
LuaSystemView.cpp
- fix an issue where smooth animation sometimes have a hard time
catching up with a newly selected object
Fixes#5062
Many interesting features have been introduced without changing the
main graphical appealing:
* Introduced Orbit::OrbitalTimeAtPos. Very useful to predict future
characteristics of an orbit
* Better ingame support for orbital transfer planner: ETA label, real
burning indicator (thanks to OrbitalTimeAtPos!) and time controls
support.
* Changed the scale of the time controls for a better low-scale
adjustments
* Fixed a stupid bug where the burning indicator was showed only when
moving
Orbit::OrbitalVelocityAtTime is implemented, and now it is possible to
plan a maneuver in the future. This should help a lot and make
everything funnier.
The weird prototype for calc_orbit has been cleaned up into FromBodyState.
FromBodyState is a static method that constructs a new Orbit from the
body state parameters.
DynamicBody's unused internal "orbit" member has been removed.
The Orbit structure from StarSystem.cpp is pulled out into its own
files Orbit.h/cpp, and other orbital calculations are turned into
static functions on that struct.
Orbit struct and calculations are also altered to work for hyperbolic
trajectories.
DynamicBody gains a ReturnOrbit method to compute the orbit of the
body, and this is used to plot the player's orbit in the System View.
Note: This was originally a 15-commit PR from irigi.
I (@johnbartholomew) am squashing it into one commit because the
history is messy but I don't want it to lose irigi as git author.