WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
OrbitalElementsStateInit.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/*
17Orbital elements model header file
18
19Author: Alex Reynolds
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Orbital Elements Initializer",
24 "exclude" : False,
25 "category" : "Initial States"
26}
27aliases = {"mu" : "GM",
28 "pos__inertial" : "Position",
29 "vel__inertial" : "Velocity",
30 "a" : "Semimajor Axis",
31 "e" : "Eccentricity",
32 "i" : "Inclination",
33 "RAAN" : "RAAN",
34 "w" : "Arg. of Periapsis",
35 "f" : "True Anomaly"
36}
37*/
38
39#ifndef MODELS_STATES_ORBITAL_ELEMENTS_STATE_INIT_H
40#define MODELS_STATES_ORBITAL_ELEMENTS_STATE_INIT_H
41
42#include "simulation/Model.h"
43#include "frames/Frame.h"
44#include "frames/frameutils.h"
46#include "constants/unitutils.h"
47
48namespace warptwin {
49
56 MODEL(OrbitalElementsStateInit)
57 public:
58 // Model params
59 // NAME TYPE DEFAULT VALUE
63 SIGNAL(mu, double, warpos::earth_wgs84.mu)
65 SIGNAL(a, double, 6878140.0)
67 SIGNAL(e, double, 1e-10)
69 SIGNAL(i, double, 45.0*warpos::DEGREES_TO_RADIANS)
71 SIGNAL(RAAN, double, 0.0)
73 SIGNAL(w, double, 0.0)
75 SIGNAL(f, double, 0.0)
77
78 // Model inputs
79 // NAME TYPE DEFAULT VALUE
81
83
84 // Model outputs
85 // NAME TYPE DEFAULT VALUE
88 SIGNAL(pos__inertial, CartesianVector3, CartesianVector3({0.0,0.0,0.0}))
90 SIGNAL(vel__inertial, CartesianVector3, CartesianVector3({0.0,0.0,0.0}))
92
93 protected:
94 int16 start() override;
95
96 // Temporary vector to hold orbital elements input
98
99 // Temporary vectors to hold position/velocity output
102 };
103
104}
105
106#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 CartesianVector6
Definition mathmacros.h:45
PlanetDefaults earth_wgs84
Definition planetdefaults.cpp:22
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
int16 start() override
Class to execute logging.
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
CartesianVector3 _pos
Definition OrbitalElementsStateInit.h:100
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
CartesianVector3 _vel
Definition OrbitalElementsStateInit.h:101
MODEL(OrbitalElementsSensorModel) public CartesianVector6 _orbital_elements
Model for sensing the instantaneous orbital elements of a vehicle given its position and velocity.
Definition OrbitalElementsSensorModel.h:55