WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
CustomPlanet.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX INC 2025. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX INC. 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 INC.
15******************************************************************************/
16/*
17Custom Planet header file
18
19Author: Alex Reynolds
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Custom Planet",
24 "exclude" : False,
25 "category" : "Assemblies"
26}
27aliases = {"initial_attitude" : "EXCLUDE",
28 "omega" : "Planet Ang. Vel.",
29 "eq_radius" : "Equatorial Radius",
30 "flattening" : "Ellipse Flattening",
31 "mu" : "Gravitational Parameter",
32 "J2" : "EXCLUDE",
33 "J3" : "EXCLUDE",
34 "mean_ang_vel" : "Mean Ang. Vel.",
35 "self_id", "Planet",
36 "inertial_frame" : "Planet Inertial Frame",
37 "rotating_frame" : "Planet Rotating Frame",
38 "eq_radius" : "Equatorial Radius",
39 "flattening" : "Ellipse Flattening",
40 "mu" : "Gravitational Parameter",
41 "J2" : "EXCLUDE",
42 "J3" : "EXCLUDE",
43 "mean_ang_vel" : "Mean Ang. Vel.",
44}
45*/
46
47#ifndef MODELS_ASSEMBLIES_SIMPLE_PLANET_MODEL_H
48#define MODELS_ASSEMBLIES_SIMPLE_PLANET_MODEL_H
49
51#include "simulation/Model.h"
52#include "frames/Frame.h"
55
56namespace warptwin {
57
68 MODEL(CustomPlanet)
69 public:
70 // Model params
71 // NAME TYPE DEFAULT VALUE
75 SIGNAL(initial_attitude, clockwerk::Quaternion, clockwerk::Quaternion({1.0,0.0,0.0,0.0}))
82 SIGNAL(eq_radius, double, warpos::earth_wgs84.eq_radius)
86 SIGNAL(flattening, double, warpos::earth_wgs84.flattening)
90 SIGNAL(mu, double, warpos::earth_wgs84.mu)
94 SIGNAL(J2, double, warpos::earth_wgs84.J2)
98 SIGNAL(J3, double, warpos::earth_wgs84.J3)
104
105 // Model inputs
106 // NAME TYPE DEFAULT VALUE
108
110
111 // Model outputs
112 // NAME TYPE DEFAULT VALUE
117 SIGNAL(self_id, GraphTreeObject*, nullptr)
119 SIGNAL(inertial_frame, Frame*, nullptr)
121 SIGNAL(rotating_frame, Frame*, nullptr)
124 SIGNAL(eq_radius, double, warpos::earth_wgs84.eq_radius)
127 SIGNAL(flattening, double, warpos::earth_wgs84.flattening)
130 SIGNAL(mu, double, warpos::earth_wgs84.mu)
133 SIGNAL(J2, double, warpos::earth_wgs84.J2)
136 SIGNAL(J3, double, warpos::earth_wgs84.J3)
141
142 protected:
143 int16 start() override;
144
145 // The inertial frame of the planet
146 Frame _planet_inertial = Frame("planet_inertial_frame");
147
148 // The planet rotating frame
149 Frame _planet_rotating = Frame("planet_rotating_frame");
150 };
151
152}
153
154#endif
#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
Frame class definition.
Definition Frame.h:96
#define CartesianVector3
Definition mathmacros.h:43
PlanetDefaults earth_wgs84
Definition planetdefaults.cpp:22
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
MODEL(CustomPlanet) public Frame _planet_inertial
Custom planet consisting of inertial and rotating frame which can be configured with custom rotation ...
Definition CustomPlanet.h:146
int16 start() override
Class to execute logging.
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
Frame _planet_rotating
Definition CustomPlanet.h:149
floating_point mean_ang_vel
Definition planetdefaults.h:38