ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
SimplePlanet.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/*
17Simple Planet header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef MODELS_ASSEMBLIES_SIMPLE_PLANET_MODEL_H
23#define MODELS_ASSEMBLIES_SIMPLE_PLANET_MODEL_H
24
25#include "core/macros.h"
26#include "core/CartesianVector.hpp"
27#include "simulation/Model.h"
28#include "six_dof_dynamics/Frame.hpp"
29#include "simulation/SimScheduler.h"
30#include "utils/planetdefaults.h"
31
32namespace modelspace {
33
34 /**
35 * @brief Simple Planet Model
36 *
37 * The simple planet model is a simple model of a planet with gravitational
38 * parameter and angular rate.
39 *
40 * Author: Alex Reynolds <alex.reynolds@attx.tech>
41 */
42 class SimplePlanet : public Model {
43 public:
44 // Model params
45 // NAME TYPE DEFAULT VALUE
47 /** The angular velocity of the planet rotating frame relative to the inertial frame.
48 * Defaults to Earth's rotation rate */
50 /** The angular velocity of the planet rotating frame relative to the inertial frame.
51 * Defaults to Earth's rotation rate */
52 SIGNAL(omega, CartesianVector3D, CartesianVector3D({0.0,0.0,clockwerk::earth_wgs84.mean_ang_vel}))
54
55 // Model inputs
56 // NAME TYPE DEFAULT VALUE
58
60
61 // Model outputs
62 // NAME TYPE DEFAULT VALUE
64 /** Accessor to the inertial frame of the planet. Set to point to _planet_inertial in constructor. */
66 /** Accessor to the rotating frame of the planet. Set to point to _planet_inertial in constructor. */
69
70 // Model-specific implementations of startup and derivative
71 SimplePlanet();
72 SimplePlanet(Model &pnt, const std::string &m_name="earth");
73 SimplePlanet(SimulationExecutive &e, const std::string &m_name="earth");
74 ~SimplePlanet() {}
75 protected:
76 int start();
77
78 // The inertial frame of the planet
79 FrameD _planet_inertial = FrameD("planet_inertial_frame");
80
81 // The planet rotating frame
82 FrameD _planet_rotating = FrameD("planet_rotating_frame");
83 };
84
85}
86
87#endif
DataIO(GraphTreeObject *data_parent, std::string data_name, T initial_value)
Constructor for the DataIO object.
Definition DataIO.hpp:134
Frame(const std::string &name, Frame< T > *par=nullptr, bool free=false)
Constructor for the frame object.
Definition Frame.hpp:294
Base model class for derived implementation.
Definition Model.h:56
Simple Planet Model.
Definition SimplePlanet.h:42
int start()
Function to perform task startup activities (step once after creation)
Definition SimplePlanet.cpp:69
Implementation of the executive class for simulation.
Definition SimulationExecutive.h:63
#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 QuaternionD
Definition macros.h:78
#define START_OUTPUTS
Definition macros.h:88
#define FrameD
Definition macros.h:64
#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< clockwerk::Frame< double > * > rotating_frame
Definition SimplePlanet.h:67
clockwerk::DataIO< clockwerk::Frame< double > * > inertial_frame
Definition SimplePlanet.h:65
clockwerk::DataIO< clockwerk::Quaternion< double > > initial_attitude
Definition SimplePlanet.h:49
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > omega
Definition SimplePlanet.h:52