Propagators
The Propagators module aims to provide straight forward, easy to use, interfaces for simulations of orbit and attitude dynamics. The module both defines the state derivative dynamics functions as well as methods to propagate the state vector in time.
It is important to note the default behavior and documentation for each function because functionality can change dramatically (simulation of state-only for full integration of the variational equations) depending on the inputs provided.
SatelliteDynamics.fderiv_earth_orbit
— FunctionCompute the state derivative.
Arguments:
epc::Epoch
: Current epochx::Array{<:Real, 1}
: Satellite state vectormass::Real
: Satellite mass [kg]area_drag
: Velocity-facing area affected by drag. [m^2]coef_drag
: Coefficient of drag [dimensionless]area_srp
: Velocity-facing area affected by drag. [m^2]coef_srp
: Coefficient of reflectivity [dimensionless]n_grav::Integer
: Gravity model degree (Default: 20)m_grav::Integer
: Gravity model order (Default: 20)drag::Bool
: Include cannonball atomospheric drag in force model (Default:true
)srp::Bool
: Include flat-plate solar radiation pressure in force model (Default:true
)moon::Bool
: Include thridbody lunar gravity in force model (Default:true
)sun::Bool
: Include thirdbody solar in force model (Default:true
)relativity::Bool
: Include relativistic effects in force model (Default:true
)
Returns:
dx::Array{<:Float64, 1}
: Satellite state derivative, velocity and accelerations [m; m/s]
SatelliteDynamics.EarthInertialState
— TypeSatellite orbit state vector using an Earth inertial state representation and dynamics model.
If an initial state transition matrix is provided it will be used for propagation if there is no state transition matrix then only the state will be propagated.
Attributes:
rk4::RK4
Internal numerical integrator used for state propagationdt::Real
Default propagation time step. All steps will be this size unless
the state vector is requested to propagate to a time smaller than this step size, which it will do.
epc::Epoch
Epoch of statex::Array{Float64, 1}
State vector. Earth-centered inertial Cartesian state.phi::Union{Nothing, Array{Float64, 2}}
State transition matrix, or the matrix
of partial derivatives of the state at the current time with respect to the start of propagation.
The following force model parametters can be set as keyword arguments
Parameters:
mass::Real
: Satellite mass [kg]area_drag
: Velocity-facing area affected by drag. [m^2]coef_drag
: Coefficient of drag [dimensionless]area_srp
: Velocity-facing area affected by drag. [m^2]coef_srp
: Coefficient of reflectivity [dimensionless]n_grav::Integer
: Gravity model degree (Default: 20)m_grav::Integer
: Gravity model order (Default: 20)drag::Bool
: Include cannonball atomospheric drag in force model (Default:true
)srp::Bool
: Include flat-plate solar radiation pressure in force model (Default:true
)moon::Bool
: Include thridbody lunar gravity in force model (Default:true
)sun::Bool
: Include thirdbody solar in force model (Default:true
)relativity::Bool
: Include relativistic effects in force model (Default:true
)
SatelliteDynamics.step!
— FunctionStep dynamics state the specified time.
Arguments:
state::EarthInertialState
State vector to propagatedt::Real
Step size. If no value is provided will use default state stepsize
SatelliteDynamics.stepto!
— FunctionStep dynamics state to the specified time. Will take as many internal steps as required to advance the propagator to the correct time. No internal step will exceed the size specified in the state propagator.
Arguments:
state::EarthInertialState
State vector to propagatetime::Union{Real, Epoch}
Time to propagate internal state too. Can be either
a real number to advance the state by or the Epoch
SatelliteDynamics.sim!
— FunctionSimulate the sttate dynamics to the specified time. Takes same inputs as stepto!
but instead of just updating the state vector to the specified time, this function also returns the timesteps, state values, and state transition matrices for each time step.
Arguments:
state::EarthInertialState
State vector to propagatetime::Union{Real, Epoch}
Time to propagate internal state too. Can be either
a real number to advance the state by or the Epoch
Returns:
t::Array{Float64, 1}
Elapsed time as a scalar from the initial simulation epochepc::Array{Epoch, 1}
Epoch at each timestepx::Array{Float64, 2}
State vectors at each time step. Time is along second axisPhi::Array{Float64, 2}
Stacked array of state transition matrices
SatelliteDynamics.reinit!
— FunctionReinitialize State transition matrix to identity at the current time step.
Used to reinitialize the state transition matrix value to identity