1. CannonBallSRP#
- class CannonballSRP(state_array: StateArray, spacecraft: Spacecraft, base_frame: Frame)#
Bases:
DynamicModel
Models the acceleration due to Solar Radiation Pressure (SRP) using the cannonball model.
This model assumes the spacecraft behaves as a perfect sphere, where the incident solar radiation is reflected isotropically. The force exerted by the SRP is computed as a function of the spacecraft’s cross-sectional area, mass, reflectivity coefficient, and the distance from the Sun.
- Parameters:
state_array (
StateArray
) – The state vector of the spacecraft containing position, velocity, and other estimated parameters.spacecraft (
Spacecraft
) – The spacecraft object with defined mass, cross-sectional area, and reflectivity coefficient.base_frame (
Frame
) – Frame of the propagator.
See also
scarabaeus.StateArray
Represents state vectors with origins and reference frames.
scarabaeus.Spacecraft
Defines spacecraft properties including mass and area.
scarabaeus.Propagator
Uses this model when cannonball_SRP=True.
Notes
The model assumes uniform reflection across the entire spacecraft surface.
The Sun’s position is retrieved dynamically from SPICE data.
The acceleration follows an inverse-square law based on Sun-spacecraft distance.
References
Montenbruck, O., & Gill, E. (2000). Satellite Orbits: Models, Methods, and Applications.
Examples
# intial setup import scarabaeus as scb # Define spacecraft properties mass = scb.ArrayWUnits(500, "kg") # Spacecraft mass area = scb.ArrayWUnits(20, "m^2") # Cross-sectional area reflectivity = 1.3 # Reflectivity coefficient # Create spacecraft object sc = scb.Spacecraft("Test_Sat", -1000, mass, area, reflectivity) # Define state vector with position, velocity, and SRP coefficient state = [ ( "position", 3, "estimated", "dynamic", sc, scb.ArrayWUnits([7000, 0, 0], "km"), ), ( "velocity", 3, "estimated", "dynamic", sc, scb.ArrayWUnits([0, 7.5, 0], "km/s"), ), ("eta_srp", 1, "estimated", "static", sc, scb.ArrayWUnits(1, None)), ] # Create state vector state_vector = scb.StateArray(epoch = epochs[0], frame = 'J2000', origin = scb.CelestialBody('Earth'), state = state) # Initialize propagator with Cannonball SRP enabled prop = scb.Propagator(sc, state_vector, epochs, cannonball_SRP = True) prop.propagate()
Attributes
The cross-sectional area of the spacecraft.
The mass of the spacecraft, typically expressed in units of kilograms.
The celestial body that serves as the origin for the state vector.
The name of the origin body.
The solar radiation pressure constant at 1 AU, expreseed in units of WHAT.
The reflectivity coefficient of the spacecraft.
The reference frame in which SRP calculations are performed.
Methods
compute_acceleration
(position, ...)Computes the acceleration due to solar radiation pressure (SRP).
compute_partial_by_eta
(position, ...)Computes the partial derivative of SRP acceleration with respect to the SRP scale factor (eta_srp).
compute_partial_by_position
(position, ...)Computes the partial derivatives of the SRP acceleration with respect to position.
- compute_acceleration(position: ArrayWUnits, current_state: dict, epoch: float, body: Body) ArrayWUnits #
Computes the acceleration due to solar radiation pressure (SRP).
This method calculates the SRP acceleration experienced by the spacecraft based on its distance from the Sun and its physical properties.
- Parameters:
position (
ArrayWUnits
) – Spacecraft position vector in the reference frame (size: 3x1, units: km).current_state (
dict
) – Dictionary containing the current state parameters, including eta_srp.epoch (
float
) – The current simulation epoch.body (
Body
) – The spacecraft for which SRP acceleration is computed.
- Returns:
srp_vec – The SRP acceleration vector (size: 3x1, units: km/s^2).
- Return type:
- compute_partial_by_eta(position: ArrayWUnits, current_state: dict, epoch: EpochArray, body: Body) ArrayWUnits #
Computes the partial derivative of SRP acceleration with respect to the SRP scale factor (eta_srp).
This method determines how changes in the SRP scale factor affect the acceleration.
- Parameters:
position (
ArrayWUnits
) – Spacecraft position vector in the reference frame (size: 3x1, units: km).current_state (
dict
) – Dictionary containing the current state parameters, including eta_srp.epoch (
EpochArray
) – Current simulation epoch.body (
Body
) –The spacecraft affected by SRP.
- returns:
partial – The 3x1 partial derivative vector of SRP acceleration with respect to eta_srp. Expressed in units of \(\frac{km}{s^2}\).
- rtype:
- compute_partial_by_position(position: ArrayWUnits, current_state: dict, epoch: EpochArray, body: Body) ArrayWUnits #
Computes the partial derivatives of the SRP acceleration with respect to position.
This method determines how the SRP acceleration varies as a function of the spacecraft’s position relative to the Sun.
- Parameters:
position (
ArrayWUnits
) – Spacecraft position vector in the reference frame (size: 3x1, units: km).current_state (
dict
) – Dictionary containing the current state parameters, including eta_srp.epoch (
EpochArray
) – Current simulation epoch.body (
Body
) – The spacecraft affected by SRP.
- Returns:
jacobian – The Jacobian matrix of SRP acceleration with respect to position (size: 3x3, units: 1/s^2).
- Return type:
- property area: ArrayWUnits#
The cross-sectional area of the spacecraft.
- Base:
CannonballSRP
- Type:
- property mass: ArrayWUnits#
The mass of the spacecraft, typically expressed in units of kilograms.
- Base:
CannonballSRP
- Type:
- property origin: Body#
The celestial body that serves as the origin for the state vector.
- Base:
CannonballSRP
- Type:
- property p_srp: ArrayWUnits#
The solar radiation pressure constant at 1 AU, expreseed in units of WHAT.
- Base:
CannonballSRP
- Type: