Skip to content

Class astrea::astro::Integrator

ClassList > astrea > astro > Integrator

Integrator class for numerical propagation of orbital mechanics problems.More...

  • #include <Integrator.hpp>

Public Types

Type Name
enum EnumType StepMethod
Enumeration for different Runge-Kutta stepper methods.

Public Static Attributes

Type Name
Interval defaultInterval = { 0.0 \* astrea::detail::time\_unit, 86400.0 \* astrea::detail::time\_unit }
Default time interval for propagation.

Public Functions

Type Name
Integrator () = default
Default constructor for the Integrator class.
int n_func_evals ()
Get the current timestep used by the integrator.
StateHistory propagate (const State & state0, const Time & propTime, const EquationsOfMotion & eom, Vehicle vehicle, bool store=false, std::vector< Event > events={})
Propagate the state of a vehicle over a specified time interval using the given equations of motion.
StateHistory propagate (const State & state0, const Date & endEpoch, const EquationsOfMotion & eom, Vehicle vehicle, bool store=false, std::vector< Event > events={})
Propagate the state of a vehicle from its current epoch to a specified end epoch using the given equations of motion.
void set_abs_tol (const Unitless & absTol)
Set the absolute tolerance for the integrator.
void set_initial_timestep (const Time & dt0)
Set the initial timestep for the integrator.
void set_max_iter (const int & itMax)
Set the maximum number of iterations for the integrator.
void set_rel_tol (const Unitless & relTol)
Set the relative tolerance for the integrator.
void set_step_method (const StepMethod & stepMethod)
Set the step method for the integrator.
void set_timestep (const Time & fixedTimeStep)
Set the fixed timestep for the integrator.
void switch_fixed_timestep (const bool & onOff)
Switch the fixed timestep mode on or off.
void switch_fixed_timestep (const bool & onOff, const Time & fixedTimeStep)
Set the fixed timestep for the integrator.
void switch_print (const bool & onOff)
Switch the printing of integration details on or off.
void switch_timer (const bool & onOff)
Switch the timer for measuring integration performance on or off.
~Integrator () = default
Default destructor for the Integrator class.

Detailed Description

This class implements various Runge-Kutta methods for integrating the equations of motion of a vehicle in space. It allows for variable step sizes, error control, and event handling.

Public Types Documentation

enum StepMethod

Enumeration for different Runge-Kutta stepper methods.

enum astrea::astro::Integrator::StepMethod {
    RK45,
    RKF45,
    RKF78,
    DOP45,
    DOP78
};


Public Static Attributes Documentation

variable defaultInterval

Default time interval for propagation.

Interval astrea::astro::Integrator::defaultInterval;


Public Functions Documentation

function Integrator

Default constructor for the Integrator class.

astrea::astro::Integrator::Integrator () = default


function n_func_evals

Get the current timestep used by the integrator.

inline int astrea::astro::Integrator::n_func_evals () 

Returns:

Time The current timestep.


function propagate [1/2]

Propagate the state of a vehicle over a specified time interval using the given equations of motion.

StateHistory astrea::astro::Integrator::propagate (
    const State & state0,
    const Time & propTime,
    const EquationsOfMotion & eom,
    Vehicle vehicle,
    bool store=false,
    std::vector< Event > events={}
) 

Parameters:

  • state0 The initial state from which to start propagation.
  • propTime The total propagation time after the initial state epoch.
  • eom The equations of motion to use for the propagation.
  • vehicle The vehicle whose state is to be propagated.
  • store Whether to store the state history during propagation. Default is false.

Returns:

StateHistory The history of the vehicle's state over the propagated interval.


function propagate [2/2]

Propagate the state of a vehicle from its current epoch to a specified end epoch using the given equations of motion.

StateHistory astrea::astro::Integrator::propagate (
    const State & state0,
    const Date & endEpoch,
    const EquationsOfMotion & eom,
    Vehicle vehicle,
    bool store=false,
    std::vector< Event > events={}
) 

Parameters:

  • state0 The initial state from which to start propagation.
  • endEpoch The final epoch (end time) for the propagation.
  • eom The equations of motion to use for the propagation.
  • vehicle The vehicle whose state is to be propagated.
  • store Whether to store the state history during propagation. Default is false.

Returns:

StateHistory The history of the vehicle's state over the propagated interval.


function set_abs_tol

Set the absolute tolerance for the integrator.

void astrea::astro::Integrator::set_abs_tol (
    const Unitless & absTol
) 

Parameters:

  • absTol The absolute tolerance value to set.

function set_initial_timestep

Set the initial timestep for the integrator.

void astrea::astro::Integrator::set_initial_timestep (
    const Time & dt0
) 

Parameters:

  • dt0 The initial timestep to set.

function set_max_iter

Set the maximum number of iterations for the integrator.

void astrea::astro::Integrator::set_max_iter (
    const int & itMax
) 

Parameters:

  • itMax The maximum number of iterations to set.

function set_rel_tol

Set the relative tolerance for the integrator.

void astrea::astro::Integrator::set_rel_tol (
    const Unitless & relTol
) 

Parameters:

  • relTol The relative tolerance value to set.

function set_step_method

Set the step method for the integrator.

void astrea::astro::Integrator::set_step_method (
    const StepMethod & stepMethod
) 

Parameters:

  • stepMethod The name of the step method to use (e.g., "RK45", "RKF45", etc.).

function set_timestep

Set the fixed timestep for the integrator.

void astrea::astro::Integrator::set_timestep (
    const Time & fixedTimeStep
) 

Parameters:

  • fixedTimeStep The fixed timestep to set.

function switch_fixed_timestep [1/2]

Switch the fixed timestep mode on or off.

void astrea::astro::Integrator::switch_fixed_timestep (
    const bool & onOff
) 

Parameters:

  • onOff Boolean flag to turn fixed timestep mode on (true) or off (false).

function switch_fixed_timestep [2/2]

Set the fixed timestep for the integrator.

void astrea::astro::Integrator::switch_fixed_timestep (
    const bool & onOff,
    const Time & fixedTimeStep
) 

Parameters:

  • fixedTimeStep The fixed timestep to set.

function switch_print

Switch the printing of integration details on or off.

void astrea::astro::Integrator::switch_print (
    const bool & onOff
) 

Parameters:

  • onOff Boolean flag to turn printing on (true) or off (false).

function switch_timer

Switch the timer for measuring integration performance on or off.

void astrea::astro::Integrator::switch_timer (
    const bool & onOff
) 

Parameters:

  • onOff Boolean flag to turn the timer on (true) or off (false).

function ~Integrator

Default destructor for the Integrator class.

astrea::astro::Integrator::~Integrator () = default



The documentation for this class was generated from the following file astrea/astro/astro/propagation/numerical/Integrator.hpp