51#ifndef MODELS_ASSEMBLIES_SPACECRAFT_H
52#define MODELS_ASSEMBLIES_SPACECRAFT_H
102 SIGNAL(inertia,
Matrix3,
Matrix3({{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}))
112 SIGNAL(initial_attitude, clockwerk::Quaternion, clockwerk::Quaternion({1.0,0.0,0.0,0.0}))
122 SIGNAL(planet_ptr, GraphTreeObject*,
nullptr)
142 SIGNAL(quat_sc_pci, clockwerk::Quaternion, clockwerk::Quaternion({1.0, 0.0, 0.0, 0.0}))
146 SIGNAL(latitude_detic,
double, 0.0)
148 SIGNAL(longitude,
double, 0.0)
150 SIGNAL(altitude_detic,
double, 0.0)
152 SIGNAL(total_power_in,
double, 0.0)
154 SIGNAL(total_power_out,
double, 0.0)
165 Frame* frame_ptr=
nullptr);
175 const
std::
string &frame_name);
199 Frame* frame_ptr=
nullptr);
209 const
std::
string &frame_name);
217 std::
string time_string,
218 Frame* force_frame_ptr);
226 Frame* force_frame_ptr);
283 int16
start()
override;
312 SphericalHarmonicsGravityModel*
_sph_ptr =
nullptr;
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition appmacros.h:27
#define START_PARAMS
Definition appmacros.h:42
#define END_OUTPUTS
Definition appmacros.h:33
#define END_PARAMS
Definition appmacros.h:47
#define START_OUTPUTS
Definition appmacros.h:28
#define END_INPUTS
Definition appmacros.h:40
#define START_INPUTS
Definition appmacros.h:35
Class for inter-object communication.
Definition DataIO.hpp:60
Class to define a body as a frame with mass and inertia.
Definition Body.h:44
Frame class definition.
Definition Frame.h:96
Node class to apply forces and moments to frames.
Definition Node.h:44
#define CartesianVector3
Definition mathmacros.h:43
#define Matrix3
Definition mathmacros.h:29
Definition CircularBuffer.hpp:28
Extensions to the C++ standard library.
Definition half.hpp:2325
PlanetDefaults earth_wgs84
Definition planetdefaults.cpp:22
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
int addPowerLoad(clockwerk::DataIO< double > *power_load_ptr)
Add a power load to the spacecraft.
Definition Spacecraft.cpp:463
warptwin::TimedImpulsiveBurnModel * programManeuver(CartesianVector3 delta_v__f, std::string time_string, Frame *force_frame_ptr)
Function to program a timed impulsive burn into the spacecraft.
int16 start() override
Class to execute logging.
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
FlatPlateDragModel _atmos_drag
Definition Spacecraft.h:307
MODEL(Spacecraft) public int initializePositionVelocity(CartesianVector3 position_sc_frame__frame, CartesianVector3 velocity_sc_frame__frame, const std::string &frame_name)
Spacecraft Model.
void clearPowerSources()
Clear the list of power sources.
Definition Spacecraft.h:244
PlanetRelativeStatesModel _planet_relative
Definition Spacecraft.h:306
void clearPowerLoads()
Clear the list of power loads.
Definition Spacecraft.h:235
GravityGradientModel _gravity_gradient
Definition Spacecraft.h:305
int initializeAttitude(clockwerk::Quaternion quat_sc_frame__frame, CartesianVector3 ang_vel_sc_frame__sc, Frame *frame_ptr=nullptr)
Initialize attitude and angular velocity of the spacecraft body frame.
AsphericalGravityModel * _asp_ptr
Definition Spacecraft.h:311
FrameStateSensorModel _planet_rotating_state_sensor
Definition Spacecraft.h:303
LvlhFrameManagerModel _lvlh_frame_manager
Definition Spacecraft.h:304
Body _body
Definition Spacecraft.h:297
clockwerk::DataIO< Body * > lvlh
Definition Spacecraft.h:250
void _mapInternal()
Function to internally map relationships between sensors.
Definition Spacecraft.cpp:205
warptwin::GravityGradientModel * gravityGradientModel()
Function to get a handle to the gravity gradient model contained within this model.
Definition Spacecraft.h:274
clockwerk::DataIO< Body * > body
Definition Spacecraft.h:247
warptwin::AsphericalGravityModel * asphericalGravityModel()
Function to get a handle to the aspherical gravity model contained within this model.
Definition Spacecraft.h:264
std::vector< TimedImpulsiveBurnModel * > _planned_burn_ptrs
Definition Spacecraft.h:324
warptwin::LvlhFrameManagerModel * lvlhFrameManager()
Function to get a handle to the LVLH frame manager contained within this model.
Definition Spacecraft.h:260
int _configureFromPlanet()
Configure the spacecraft class to map to planet.
Definition Spacecraft.cpp:109
warptwin::MSISAtmosphereModel * msisModel()
Function to get a handle to the MSIS atmosphere model contained within this model.
Definition Spacecraft.h:278
SphericalHarmonicsGravityModel * _sph_ptr
Definition Spacecraft.h:312
void _calculatePowerAccumulation()
Sum the power loads and sources to calculate power accumulation.
Definition Spacecraft.cpp:515
std::vector< clockwerk::DataIO< double > * > _power_load_ptrs
Definition Spacecraft.h:327
int initializeFromOrbitalElements(double a, double e, double i, double RAAN, double w, double f)
Function to initialize the spacecraftrelative to planet from orbital elements.
Definition Spacecraft.cpp:338
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
std::vector< clockwerk::DataIO< double > * > _power_source_ptrs
Definition Spacecraft.h:330
warptwin::SphericalHarmonicsGravityModel * sphericalHarmGravityModel()
Function to get a handle to the spherical harmonics gravity model contained within this model.
Definition Spacecraft.h:268
warptwin::PlanetRelativeStatesModel * planetRelativeModel()
Function to get a handle to the planet relative state model contained within this model.
Definition Spacecraft.h:271
FrameStateSensorModel _planet_inertial_state_sensor
Definition Spacecraft.h:302
warptwin::FlatPlateDragModel * atmosDrag()
Function to get a handle to the flat plate drag model contained within this model.
Definition Spacecraft.h:281
std::string _planet_name
Definition Spacecraft.h:321
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
Node _gravity_node
Definition Spacecraft.h:298
warptwin::FrameStateSensorModel * planetInertialStateSensor()
Function to get a handle to the frame state sensor relative to the planet inertial frame.
Definition Spacecraft.h:254
warptwin::FrameStateSensorModel * planetRotatingStateSensor()
Function to get a handle to the frame state sensor relative to the planet rotating frame.
Definition Spacecraft.h:257
Node _drag_node
Definition Spacecraft.h:299
int addPowerSource(clockwerk::DataIO< double > *power_source_ptr)
Add a power source to the spacecraft.
Definition Spacecraft.cpp:489
MSISAtmosphereModel * _msis_ptr
Definition Spacecraft.h:313