WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
GravityGradientModel.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/*
17Gravity gradient torque model header file
18
19Author: Sam Matez
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Gravity Gradient Torque",
24 "exclude" : False,
25 "category" : "Dynamics"
26}
27aliases = {"mu" : "GM",
28 "pos_body_pci" : "Position",
29 "quat_body_pci" : "Attitude",
30 "inertiatensor_body_body" : "Spacecraft Inertia",
31 "ggTorque_body_body" : "Gravity Torque"
32}
33*/
34
35#ifndef MODELS_ENVIRONMENT_GRAVITY_GRADIENT_MODEL_H
36#define MODELS_ENVIRONMENT_GRAVITY_GRADIENT_MODEL_H
37
38#include "frames/Body.h"
39#include "frames/frameutils.h"
40#include "simulation/Model.h"
42
43namespace warptwin {
44
60 MODEL(GravityGradientModel)
61 public:
62 // Model params
63 // NAME TYPE DEFAULT VALUE
67 SIGNAL(mu, double, warpos::earth_wgs84.mu)
69
70 // Model inputs
71 // NAME TYPE DEFAULT VALUE
74 SIGNAL(pos_body_pci, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
76 SIGNAL(quat_body_pci, clockwerk::Quaternion, clockwerk::Quaternion({1.0, 0.0, 0.0, 0.0}))
78 SIGNAL(inertiatensor_body_body, Matrix3, Matrix3({{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}))
80
81 // Model outputs
82 // NAME TYPE DEFAULT VALUE
85 SIGNAL(ggTorque_body_body, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
87
88 protected:
89 // Execute in protected
90 int16 execute() override;
91
92 // Temporary vectors and variables to carry out our calculations
94 double _r;
97
98 };
99
100}
101
102#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
#define CartesianVector3
Definition mathmacros.h:43
#define Matrix3
Definition mathmacros.h:29
PlanetDefaults earth_wgs84
Definition planetdefaults.cpp:22
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
CartesianVector3 _ggTorque
Definition GravityGradientModel.h:96
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
double _r
Point mass gravity model.
Definition GravityGradientModel.h:94
MODEL(GravityGradientModel) public CartesianVector3 _pos_body_pci__body
Gravity Gradient Model.
Definition GravityGradientModel.h:60
double _multiplier
Definition GravityGradientModel.h:95