ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
SolarRadiationPressureModel.h
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16/*
17Solar Radiation Pressure model header file
18
19Author: Sam Matez
20*/
21
22#ifndef MODELS_SOLAR_RADIATION_PRESSURE_MODEL_H
23#define MODELS_SOLAR_RADIATION_PRESSURE_MODEL_H
24
25// #include "six_dof_dynamics/Body.hpp"
26#include "core/macros.h"
27#include "architecture/Tasks.h"
28#include "utils/frameutils.hpp"
29#include "simulation/Model.h"
30#include "utils/unitutils.h"
31
32namespace modelspace {
33
34 /**
35 * @brief Solar Radiation Pressure Model
36 *
37 * This model calculates the solar radiation pressure
38 * perturbation that acts on a body in orbit.
39 * The methods and calculations in this model come from
40 * https://freeflyer.com/_help_Files/spherical_srp.htm
41 *
42 * Author: Sam Matez
43 * Email: sam.matez@attx.tech
44 *
45 */
46 class SolarRadiationPressureModel : public Model {
47 public:
48 // Model params
49 // NAME TYPE DEFAULT VALUE
51 /** The solar flux , defaults to the mean solar flux at one astronomical unit (W/m^2) */
52 SIGNAL(S, double, 1358.0)
54
55 // Model inputs
56 // NAME TYPE DEFAULT VALUE
58 /** The body coefficient of reflectivity () */
59 SIGNAL(C_r, double, 1.0)
60 /** The area of the body subject to solar radiation (the mean area that faces the sun) (m^2) */
61 SIGNAL(A_srp, double, 1.0)
62 /** The body position wrt the Sun in any generic frame (m) */
63 SIGNAL(position_body_sun_f, CartesianVector3D, CartesianVector3D({clockwerk::AU_TO_METERS, 0.0, 0.0}))
64 /** The solar eclipse factor - ranges from 0 (lowest) to 1 (highest) Depending on magnitude of Earth's shadow */
65 SIGNAL(v, double, 1.0)
67
68 // Model Outputs
69 // NAME TYPE DEFAULT VALUE
71 /** The force acting on the body due to solar radiation pressure (N) in the smae generic frame as the input */
74
75 // Model-specific implementations of startup and derivative
76 SolarRadiationPressureModel();
77 SolarRadiationPressureModel(Model &pnt, const std::string &m_name="SRP");
78 SolarRadiationPressureModel(SimulationExecutive &e, const std::string &m_name="SRP");
79 SolarRadiationPressureModel(Model &pnt, int schedule_slot, const std::string &m_name="SRP");
80 SolarRadiationPressureModel(SimulationExecutive &e, int schedule_slot, const std::string &m_name="SRP");
81 virtual ~SolarRadiationPressureModel() {}
82
83 protected:
84 // Execute in protected
85 int execute();
86
87 // Temporary vectors and variables to carry out our calculations
88 double _r;
89 double _multiplier;
90 CartesianVector3D _unitpos_body_sun_f;
91 };
92
93}
94
95#endif
Base model class for derived implementation.
Definition Model.h:56
Implementation of the executive class for simulation.
Definition SimulationExecutive.h:63
Solar Radiation Pressure Model.
Definition SolarRadiationPressureModel.h:46
int execute()
Function to execute the task. All math and calculations should be here.
Definition SolarRadiationPressureModel.cpp:42
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition macros.h:87
#define START_PARAMS
Definition macros.h:96
#define CartesianVector3D
Definition macros.h:54
#define END_OUTPUTS
Definition macros.h:90
#define END_PARAMS
Definition macros.h:98
#define START_OUTPUTS
Definition macros.h:88
#define END_INPUTS
Definition macros.h:94
#define START_INPUTS
Definition macros.h:92
Class to propagate CR3BP dynamics in characteristic units.
Definition ConfigurationWriter.cpp:18
clockwerk::DataIO< double > A_srp
Definition SolarRadiationPressureModel.h:61
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > position_body_sun_f
Definition SolarRadiationPressureModel.h:63
clockwerk::DataIO< double > C_r
Definition SolarRadiationPressureModel.h:59
clockwerk::DataIO< double > v
Definition SolarRadiationPressureModel.h:65
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > srp_force_body_f
Definition SolarRadiationPressureModel.h:72
clockwerk::DataIO< double > S
Definition SolarRadiationPressureModel.h:52