Skip to content

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&lt;2&gt;(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&lt;2&gt;(astrea::detail::minor\_distance\_unit)
constexpr SurfaceArea DEFAULT_SOLAR_AREA = 1.0 \* mp\_units::pow&lt;2&gt;(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\_DRAG
Coefficient of drag.
Unitless _coefficientOfLift = DEFAULT\_COEFFICIENT\_OF\_LIFT
Coefficient of lift.
Unitless _coefficientOfReflectivity = DEFAULT\_COEFFICIENT\_OF\_REFLECTIVITY
Coefficient of reflectivity.
std::size_t _id
SurfaceArea _liftArea = DEFAULT\_LIFT\_AREA
Lift area of the spacecraft.
Mass _mass = DEFAULT\_MASS
Mass of the spacecraft.
std::string _name
SurfaceArea _ramArea = DEFAULT\_RAM\_AREA
Ram area of the spacecraft.
StateHistory _stateHistory
SurfaceArea _sunArea = DEFAULT\_SOLAR\_AREA
Solar 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

constexpr Unitless astrea::astro::Spacecraft::DEFAULT_COEFFICIENT_OF_DRAG;

variable DEFAULT_COEFFICIENT_OF_LIFT

constexpr Unitless astrea::astro::Spacecraft::DEFAULT_COEFFICIENT_OF_LIFT;

variable DEFAULT_COEFFICIENT_OF_REFLECTIVITY

constexpr Unitless astrea::astro::Spacecraft::DEFAULT_COEFFICIENT_OF_REFLECTIVITY;

variable DEFAULT_LIFT_AREA

constexpr SurfaceArea astrea::astro::Spacecraft::DEFAULT_LIFT_AREA;

variable DEFAULT_MASS

constexpr Mass astrea::astro::Spacecraft::DEFAULT_MASS;

variable DEFAULT_RAM_AREA

constexpr SurfaceArea astrea::astro::Spacecraft::DEFAULT_RAM_AREA;

variable DEFAULT_SOLAR_AREA

constexpr SurfaceArea astrea::astro::Spacecraft::DEFAULT_SOLAR_AREA;

Public Functions Documentation

function Spacecraft [1/2]

Default constructor for Spacecraft .

inline astrea::astro::Spacecraft::Spacecraft () 


function Spacecraft [2/2]

Constructs a Spacecraft with aGeneralPerturbations object and anAstrodynamicsSystem .

astrea::astro::Spacecraft::Spacecraft (
    const GeneralPerturbations & gp,
    const AstrodynamicsSystem & sys
) 

Parameters:


function get_coefficient_of_drag

Gets the coefficients of drag, lift, and reflectivity.

Unitless astrea::astro::Spacecraft::get_coefficient_of_drag () const

Returns:

Unitless The coefficient of drag.


function get_coefficient_of_lift

Gets the coefficient of lift.

Unitless astrea::astro::Spacecraft::get_coefficient_of_lift () const

Returns:

Unitless The coefficient of lift.


function get_coefficient_of_reflectivity

Gets the coefficient of reflectivity.

Unitless astrea::astro::Spacecraft::get_coefficient_of_reflectivity () const

Returns:

Unitless The coefficient of reflectivity.


function get_id

Gets the unique identifier of the spacecraft.

inline virtual std::size_t astrea::astro::Spacecraft::get_id () const

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:

  • date The 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:

  • date The 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.

inline State & astrea::astro::Spacecraft::get_initial_state () 

Returns:

State& A reference to the initial state of the spacecraft.


function get_initial_state [2/2]

Gets the initial state of the spacecraft.

inline const State & astrea::astro::Spacecraft::get_initial_state () const

Returns:

const State& A reference to the initial state of the spacecraft.


function get_lift_area

Gets the lift area of the spacecraft.

SurfaceArea astrea::astro::Spacecraft::get_lift_area () const

Returns:

SurfaceArea The lift area of the spacecraft.


function get_mass

Gets the mass of the spacecraft.

virtual Mass astrea::astro::Spacecraft::get_mass () const

Returns:

Mass The mass of the spacecraft.

Implements astrea::astro::PayloadPlatform::get_mass


function get_name

Gets the name of the spacecraft.

inline virtual std::string astrea::astro::Spacecraft::get_name () const

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.

SurfaceArea astrea::astro::Spacecraft::get_ram_area () const

Returns:

SurfaceArea The ram area of the spacecraft.


function get_solar_area

Gets the solar area of the spacecraft.

SurfaceArea astrea::astro::Spacecraft::get_solar_area () const

Returns:

SurfaceArea The solar area of the spacecraft.


function get_state_history [1/2]

Gets the state history of the spacecraft.

StateHistory & astrea::astro::Spacecraft::get_state_history () 

Returns:

StateHistory& A reference to the state history of the spacecraft.


function get_state_history [2/2]

Gets the state history of the spacecraft.

const StateHistory & astrea::astro::Spacecraft::get_state_history () const

Returns:

const StateHistory& A reference to the state history of the spacecraft.


function operator==

Equality operator to compare two Spacecraft objects.

bool astrea::astro::Spacecraft::operator== (
    const Spacecraft & other
) const

Parameters:

Returns:

true if the Spacecraft objects are equal, false otherwise.


function set_coefficient_of_drag

Sets the coefficients of drag.

void astrea::astro::Spacecraft::set_coefficient_of_drag (
    const Unitless & cd
) 

Parameters:

  • cd The coefficient of drag to set.

function set_coefficient_of_lift

Sets the coefficient of lift.

void astrea::astro::Spacecraft::set_coefficient_of_lift (
    const Unitless & cl
) 

Parameters:

  • cl The coefficient of lift to set.

function set_coefficient_of_reflectivity

Sets the coefficient of reflectivity.

void astrea::astro::Spacecraft::set_coefficient_of_reflectivity (
    const Unitless & cr
) 

Parameters:

  • cr The coefficient of reflectivity to set.

function set_lift_area

Sets the lift area of the spacecraft.

void astrea::astro::Spacecraft::set_lift_area (
    const SurfaceArea & liftArea
) 

Parameters:

  • liftArea The lift area to set.

function set_mass

Sets the mass of the spacecraft.

void astrea::astro::Spacecraft::set_mass (
    const Mass & mass
) 

Parameters:

  • mass The new mass to set for the spacecraft.

function set_name

Sets the name of the spacecraft.

void astrea::astro::Spacecraft::set_name (
    const std::string & name
) 

Parameters:

  • name The name to set for the spacecraft.

function set_ram_area

Sets the surface area for ram.

void astrea::astro::Spacecraft::set_ram_area (
    const SurfaceArea & ramArea
) 

Parameters:

  • ramArea The ram area to set.

function set_solar_area

Sets the solar area of the spacecraft.

void astrea::astro::Spacecraft::set_solar_area (
    const SurfaceArea & solarArea
) 

Parameters:

  • solarArea The solar area to set.

function set_state_history

Stores the state history of the spacecraft.

void astrea::astro::Spacecraft::set_state_history (
    const StateHistory & history
) 

Parameters:


function store_state

Stores a single state in the spacecraft's state history.

void astrea::astro::Spacecraft::store_state (
    const State & state
) 

Parameters:

  • state The State object to store.

function ~Spacecraft

Virtual destructor for Spacecraft .

virtual astrea::astro::Spacecraft::~Spacecraft () = default


Protected Attributes Documentation

variable _coefficientOfDrag

Coefficient of drag.

Unitless astrea::astro::Spacecraft::_coefficientOfDrag;


variable _coefficientOfLift

Coefficient of lift.

Unitless astrea::astro::Spacecraft::_coefficientOfLift;


variable _coefficientOfReflectivity

Coefficient of reflectivity.

Unitless astrea::astro::Spacecraft::_coefficientOfReflectivity;


variable _id

std::size_t astrea::astro::Spacecraft::_id;

variable _liftArea

Lift area of the spacecraft.

SurfaceArea astrea::astro::Spacecraft::_liftArea;


variable _mass

Mass of the spacecraft.

Mass astrea::astro::Spacecraft::_mass;


variable _name

std::string astrea::astro::Spacecraft::_name;

variable _ramArea

Ram area of the spacecraft.

SurfaceArea astrea::astro::Spacecraft::_ramArea;


variable _stateHistory

StateHistory astrea::astro::Spacecraft::_stateHistory;

variable _sunArea

Solar area of the spacecraft.

SurfaceArea astrea::astro::Spacecraft::_sunArea;


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.

void astrea::astro::Spacecraft::generate_id () 



The documentation for this class was generated from the following file astrea/astro/astro/platforms/vehicles/Spacecraft.hpp