Katniss218 / HumanSpaceProgram

A WIP open-source realistic rocketry game
GNU Affero General Public License v3.0
11 stars 1 forks source link

Orbits and Trajectories #23

Open Katniss218 opened 1 month ago

Katniss218 commented 1 month ago

Idea of a Trajectory.

There are 2 types. N-nody and keplerian.

Planets move on keplerian orbits. Vessels use nbody.

Maybe color parts of the trajectory of the vessels depending on soi or whether it's in atmosphere.

You can sample trajectories eother in 0..1 range, or by UT to get position, velocity, and orbital frame.

If the fps is good, the nbody trajectories could run ahead and precompute positions/velocities at future UTs.

Use jobs to make this fast.

Katniss218 commented 1 month ago

Vessels in orbit around Earth currently experience around 50 km drift between orbits, at moderate timewarps.

This is simply unacceptable.

Katniss218 commented 1 month ago

Nbody trajectories will use a custom solver (#18) (maybe something like RK45 at first?) to compute orbital paths more precisely than the current eulerian integration of gravitational forces.