Class astrea::astro::Spacecraft¶
ClassList > astrea > astro > Spacecraft
A class representing a spacecraft in the astrea astro platform. This class encapsulates the properties of a spacecraft, including its mass, dynamic coefficients, and surface areas.
#include <Spacecraft.hpp>
Inherits the following classes: astrea::astro::PayloadPlatform
Public Static Attributes¶
| Type | Name |
|---|---|
| constexpr Unitless | DEFAULT_COEFFICIENT_OF_DRAG = 2.2 \* astrea::detail::unitless |
| constexpr Unitless | DEFAULT_COEFFICIENT_OF_LIFT = 0.9 \* astrea::detail::unitless |
| constexpr Unitless | DEFAULT_COEFFICIENT_OF_REFLECTIVITY = /* multi line expression */ |
| constexpr SurfaceArea | DEFAULT_LIFT_AREA = 1.0 \* mp\_units::pow<2>(astrea::detail::minor\_distance\_unit) |
| constexpr Mass | DEFAULT_MASS = 1000.0 \* astrea::detail::mass\_unit |
| constexpr SurfaceArea | DEFAULT_RAM_AREA = 1.0 \* mp\_units::pow<2>(astrea::detail::minor\_distance\_unit) |
| constexpr SurfaceArea | DEFAULT_SOLAR_AREA = 1.0 \* mp\_units::pow<2>(astrea::detail::minor\_distance\_unit) |
Public Functions¶
| Type | Name |
|---|---|
| Spacecraft () Default constructor for Spacecraft . |
|
| Spacecraft (const GeneralPerturbations & gp, const AstrodynamicsSystem & sys) Constructs a Spacecraft with aGeneralPerturbations object and anAstrodynamicsSystem . |
|
| Unitless | get_coefficient_of_drag () const Gets the coefficients of drag, lift, and reflectivity. |
| Unitless | get_coefficient_of_lift () const Gets the coefficient of lift. |
| Unitless | get_coefficient_of_reflectivity () const Gets the coefficient of reflectivity. |
| virtual std::size_t | get_id () const Gets the unique identifier of the spacecraft. |
| virtual RadiusVector< frames::earth::icrf > | get_inertial_position (const Date & date) override const Gets the inertial position of the spacecraft at a specific date. |
| virtual VelocityVector< frames::earth::icrf > | get_inertial_velocity (const Date & date) override const Gets the inertial velocity of the spacecraft at a specific date. |
| State & | get_initial_state () Gets the initial state of the spacecraft. |
| const State & | get_initial_state () const Gets the initial state of the spacecraft. |
| SurfaceArea | get_lift_area () const Gets the lift area of the spacecraft. |
| virtual Mass | get_mass () const Gets the mass of the spacecraft. |
| virtual std::string | get_name () const Gets the name of the spacecraft. |
| SurfaceArea | get_ram_area () const Gets the surface areas for ram, solar, and lift. |
| SurfaceArea | get_solar_area () const Gets the solar area of the spacecraft. |
| StateHistory & | get_state_history () Gets the state history of the spacecraft. |
| const StateHistory & | get_state_history () const Gets the state history of the spacecraft. |
| bool | operator== (const Spacecraft & other) const Equality operator to compare two Spacecraft objects. |
| void | set_coefficient_of_drag (const Unitless & cd) Sets the coefficients of drag. |
| void | set_coefficient_of_lift (const Unitless & cl) Sets the coefficient of lift. |
| void | set_coefficient_of_reflectivity (const Unitless & cr) Sets the coefficient of reflectivity. |
| void | set_lift_area (const SurfaceArea & liftArea) Sets the lift area of the spacecraft. |
| void | set_mass (const Mass & mass) Sets the mass of the spacecraft. |
| void | set_name (const std::string & name) Sets the name of the spacecraft. |
| void | set_ram_area (const SurfaceArea & ramArea) Sets the surface area for ram. |
| void | set_solar_area (const SurfaceArea & solarArea) Sets the solar area of the spacecraft. |
| void | set_state_history (const StateHistory & history) Stores the state history of the spacecraft. |
| void | store_state (const State & state) Stores a single state in the spacecraft's state history. |
| virtual | ~Spacecraft () = default Virtual destructor for Spacecraft . |
Public Functions inherited from astrea::astro::PayloadPlatform¶
See astrea::astro::PayloadPlatform
| Type | Name |
|---|---|
| void | attach_payload (const PayloadParameters_T & parameters) Attaches a single payload to the platform. |
| void | attach_payloads (const std::vector< PayloadParameters_T > & parameterPack) Attaches multiple payloads to the platform. |
| virtual std::size_t | get_id () const = 0 Get the ID of the payload. |
| virtual Mass | get_mass () const Get the mass of the platform. |
| std::vector< Payload_T > & | get_payloads () Retrieves the list of payloads attached to the platform. |
| const std::vector< Payload_T > & | get_payloads () const Retrieves the list of payloads attached to the platform (const version). |
Public Functions inherited from astrea::astro::FrameReference¶
See astrea::astro::FrameReference
| Type | Name |
|---|---|
| FrameReference () = default Default constructor for FrameReference . |
|
| virtual CartesianVector< Acceleration, frames::earth::icrf > | get_inertial_acceleration (const Date & date) const Get the acceleration of the frame in Earth-Centered Inertial coordinates. |
| virtual CartesianVector< Distance, frames::earth::icrf > | get_inertial_position (const Date & date) const = 0 Get the position of the frame in Earth-Centered Inertial coordinates. |
| virtual CartesianVector< Velocity, frames::earth::icrf > | get_inertial_velocity (const Date & date) const = 0 Get the velocity of the frame in Earth-Centered Inertial coordinates. |
| virtual std::string | get_name () const = 0 Get the name of the frame reference. |
| virtual | ~FrameReference () = default Default destructor for FrameReference . |
Protected Attributes¶
| Type | Name |
|---|---|
| Unitless | _coefficientOfDrag = DEFAULT\_COEFFICIENT\_OF\_DRAGCoefficient of drag. |
| Unitless | _coefficientOfLift = DEFAULT\_COEFFICIENT\_OF\_LIFTCoefficient of lift. |
| Unitless | _coefficientOfReflectivity = DEFAULT\_COEFFICIENT\_OF\_REFLECTIVITYCoefficient of reflectivity. |
| std::size_t | _id |
| SurfaceArea | _liftArea = DEFAULT\_LIFT\_AREALift area of the spacecraft. |
| Mass | _mass = DEFAULT\_MASSMass of the spacecraft. |
| std::string | _name |
| SurfaceArea | _ramArea = DEFAULT\_RAM\_AREARam area of the spacecraft. |
| StateHistory | _stateHistory |
| SurfaceArea | _sunArea = DEFAULT\_SOLAR\_AREASolar area of the spacecraft. |
Protected Attributes inherited from astrea::astro::PayloadPlatform¶
See astrea::astro::PayloadPlatform
| Type | Name |
|---|---|
| std::vector< Payload_T > | _payloads |
Protected Functions¶
| Type | Name |
|---|---|
| void | generate_id () Generates a unique identifier for the spacecraft based on its properties. This method is called in the constructor to ensure that each spacecraft has a unique ID. |
Protected Functions inherited from astrea::astro::PayloadPlatform¶
See astrea::astro::PayloadPlatform
| Type | Name |
|---|---|
| PayloadPlatform () = default Default constructor for PayloadPlatform . |
|
| PayloadPlatform (const PayloadPlatform & other) Copy constructor for PayloadPlatform . |
|
| PayloadPlatform (PayloadPlatform && other) noexcept Move constructor for PayloadPlatform . |
|
| PayloadPlatform & | operator= (const PayloadPlatform & other) Copy assignment operator for PayloadPlatform . |
| PayloadPlatform & | operator= (PayloadPlatform && other) noexcept Move assignment operator for PayloadPlatform . |
| void | reset_payload_parentage () Resets the parentage of all payloads attached to the platform to this. |
| virtual | ~PayloadPlatform () = default Default destructor for PayloadPlatform . |
Public Static Attributes Documentation¶
variable DEFAULT_COEFFICIENT_OF_DRAG¶
variable DEFAULT_COEFFICIENT_OF_LIFT¶
variable DEFAULT_COEFFICIENT_OF_REFLECTIVITY¶
variable DEFAULT_LIFT_AREA¶
variable DEFAULT_MASS¶
variable DEFAULT_RAM_AREA¶
variable DEFAULT_SOLAR_AREA¶
Public Functions Documentation¶
function Spacecraft [1/2]¶
Default constructor for Spacecraft .
function Spacecraft [2/2]¶
Constructs a Spacecraft with aGeneralPerturbations object and anAstrodynamicsSystem .
astrea::astro::Spacecraft::Spacecraft (
const GeneralPerturbations & gp,
const AstrodynamicsSystem & sys
)
Parameters:
gpThe GeneralPerturbations object containing initial parameters.sysThe AstrodynamicsSystem to which this spacecraft belongs.
function get_coefficient_of_drag¶
Gets the coefficients of drag, lift, and reflectivity.
Returns:
Unitless The coefficient of drag.
function get_coefficient_of_lift¶
Gets the coefficient of lift.
Returns:
Unitless The coefficient of lift.
function get_coefficient_of_reflectivity¶
Gets the coefficient of reflectivity.
Returns:
Unitless The coefficient of reflectivity.
function get_id¶
Gets the unique identifier of the spacecraft.
Returns:
std::size_t The unique identifier of the spacecraft.
Implements astrea::astro::PayloadPlatform::get_id
function get_inertial_position¶
Gets the inertial position of the spacecraft at a specific date.
virtual RadiusVector < frames::earth::icrf > astrea::astro::Spacecraft::get_inertial_position (
const Date & date
) override const
Parameters:
dateThe date at which to retrieve the position.
Returns:
RadiusVector<frames::earth::icrf> The inertial position of the spacecraft.
Implements astrea::astro::FrameReference::get_inertial_position
function get_inertial_velocity¶
Gets the inertial velocity of the spacecraft at a specific date.
virtual VelocityVector < frames::earth::icrf > astrea::astro::Spacecraft::get_inertial_velocity (
const Date & date
) override const
Parameters:
dateThe date at which to retrieve the velocity.
Returns:
VelocityVector<frames::earth::icrf> The inertial velocity of the spacecraft.
Implements astrea::astro::FrameReference::get_inertial_velocity
function get_initial_state [1/2]¶
Gets the initial state of the spacecraft.
Returns:
State& A reference to the initial state of the spacecraft.
function get_initial_state [2/2]¶
Gets the initial state of the spacecraft.
Returns:
const State& A reference to the initial state of the spacecraft.
function get_lift_area¶
Gets the lift area of the spacecraft.
Returns:
SurfaceArea The lift area of the spacecraft.
function get_mass¶
Gets the mass of the spacecraft.
Returns:
Mass The mass of the spacecraft.
Implements astrea::astro::PayloadPlatform::get_mass
function get_name¶
Gets the name of the spacecraft.
Returns:
std::string The name of the spacecraft.
Implements astrea::astro::FrameReference::get_name
function get_ram_area¶
Gets the surface areas for ram, solar, and lift.
Returns:
SurfaceArea The ram area of the spacecraft.
function get_solar_area¶
Gets the solar area of the spacecraft.
Returns:
SurfaceArea The solar area of the spacecraft.
function get_state_history [1/2]¶
Gets the state history of the spacecraft.
Returns:
StateHistory& A reference to the state history of the spacecraft.
function get_state_history [2/2]¶
Gets the state history of the spacecraft.
Returns:
const StateHistory& A reference to the state history of the spacecraft.
function operator==¶
Equality operator to compare two Spacecraft objects.
Parameters:
otherThe other Spacecraft to compare with.
Returns:
true if the Spacecraft objects are equal, false otherwise.
function set_coefficient_of_drag¶
Sets the coefficients of drag.
Parameters:
cdThe coefficient of drag to set.
function set_coefficient_of_lift¶
Sets the coefficient of lift.
Parameters:
clThe coefficient of lift to set.
function set_coefficient_of_reflectivity¶
Sets the coefficient of reflectivity.
Parameters:
crThe coefficient of reflectivity to set.
function set_lift_area¶
Sets the lift area of the spacecraft.
Parameters:
liftAreaThe lift area to set.
function set_mass¶
Sets the mass of the spacecraft.
Parameters:
massThe new mass to set for the spacecraft.
function set_name¶
Sets the name of the spacecraft.
Parameters:
nameThe name to set for the spacecraft.
function set_ram_area¶
Sets the surface area for ram.
Parameters:
ramAreaThe ram area to set.
function set_solar_area¶
Sets the solar area of the spacecraft.
Parameters:
solarAreaThe solar area to set.
function set_state_history¶
Stores the state history of the spacecraft.
Parameters:
historyThe StateHistory object to store.
function store_state¶
Stores a single state in the spacecraft's state history.
Parameters:
stateThe State object to store.
function ~Spacecraft¶
Virtual destructor for Spacecraft .
Protected Attributes Documentation¶
variable _coefficientOfDrag¶
Coefficient of drag.
variable _coefficientOfLift¶
Coefficient of lift.
variable _coefficientOfReflectivity¶
Coefficient of reflectivity.
variable _id¶
variable _liftArea¶
Lift area of the spacecraft.
variable _mass¶
Mass of the spacecraft.
variable _name¶
variable _ramArea¶
Ram area of the spacecraft.
variable _stateHistory¶
variable _sunArea¶
Solar area of the spacecraft.
Protected Functions Documentation¶
function generate_id¶
Generates a unique identifier for the spacecraft based on its properties. This method is called in the constructor to ensure that each spacecraft has a unique ID.
The documentation for this class was generated from the following file astrea/astro/astro/platforms/vehicles/Spacecraft.hpp