Antkeeper
0.0.1
|
Updates the Cartesian position and velocity of orbiting bodies given their Keplerian orbital elements and the current time. More...
#include <orbit-system.hpp>
Public Member Functions | |
orbit_system (entity::registry ®istry) | |
~orbit_system () | |
virtual void | update (float t, float dt) |
Scales then adds the timestep dt to the current time, then recalculates the positions of orbiting bodies. More... | |
void | set_time (double time) |
Sets the current time. More... | |
void | set_time_scale (double scale) |
Sets the factor by which the timestep dt will be scaled before being added to the current time. More... | |
void | set_ephemeris (std::shared_ptr< physics::orbit::ephemeris< double >> ephemeris) |
Sets the ephemeris used to calculate orbital positions. More... | |
![]() | |
updatable_system (entity::registry ®istry) | |
Creates an updatable system. More... | |
Additional Inherited Members | |
![]() | |
entity::registry & | registry |
Registry on which the system operate. More... | |
Updates the Cartesian position and velocity of orbiting bodies given their Keplerian orbital elements and the current time.
Definition at line 33 of file orbit-system.hpp.
|
explicit |
Definition at line 24 of file orbit-system.cpp.
orbit_system::~orbit_system | ( | ) |
Definition at line 34 of file orbit-system.cpp.
void orbit_system::set_ephemeris | ( | std::shared_ptr< physics::orbit::ephemeris< double >> | ephemeris | ) |
Sets the ephemeris used to calculate orbital positions.
ephemeris | Ephemeris. |
Definition at line 70 of file orbit-system.cpp.
void orbit_system::set_time | ( | double | time | ) |
Sets the current time.
time | Time, in days. |
Definition at line 76 of file orbit-system.cpp.
void orbit_system::set_time_scale | ( | double | scale | ) |
Sets the factor by which the timestep dt
will be scaled before being added to the current time.
scale | Factor by which to scale the timestep. |
Definition at line 81 of file orbit-system.cpp.
|
virtual |
Scales then adds the timestep dt
to the current time, then recalculates the positions of orbiting bodies.
t | Time, in seconds. |
dt | Delta time, in seconds. |
Implements updatable_system.
Definition at line 40 of file orbit-system.cpp.