ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
OrbitalElementsSensorModel.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/*
17Orbital elements model header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef MODELS_STATES_ORBITAL_ELEMENTS_SENSOR_MODEL_H
23#define MODELS_STATES_ORBITAL_ELEMENTS_SENSOR_MODEL_H
24
25#include "core/macros.h"
26#include "simulation/Model.h"
27#include "six_dof_dynamics/Frame.hpp"
28#include "utils/frameutils.hpp"
29#include "utils/planetdefaults.h"
30
31namespace modelspace {
32
33 /**
34 * @brief Orbital elements sensor model
35 *
36 * This model takes the xyz cartesian state of a
37 * spacecraft and outputs it as keplerian orbital elements
38 */
39 class OrbitalElementsSensorModel : public Model {
40 public:
41 // Model params
42 // NAME TYPE DEFAULT VALUE
44 /** This is the gravitational parameter of our parent planet. Defaults to
45 * Earth's gravitational parameter for ease of use */
46 SIGNAL(mu, double, clockwerk::earth_wgs84.mu)
48
49 // Model inputs
50 // NAME TYPE DEFAULT VALUE
52 /** The position of the spacecraft in a generic inertial frame */
54 /** The velocity of the spacecraft in a generic inertial frame */
57
58 // Model outputs
59 // NAME TYPE DEFAULT VALUE
61 /** The semimajor axis of the spacecraft orbit, in meters */
62 SIGNAL(a, double, 0.0)
63 /** The orbit eccentricity */
64 SIGNAL(e, double, 0.0)
65 /** The orbit inclination, in radians */
66 SIGNAL(i, double, 0.0)
67 /** The orbit RAAN, in radians */
68 SIGNAL(RAAN, double, 0.0)
69 /** The orbit argument of periapsis */
70 SIGNAL(w, double, 0.0)
71 /** The true anomaly, in radians */
72 SIGNAL(f, double, 0.0)
74
75 // Model-specific implementations of startup and derivative
76 OrbitalElementsSensorModel();
77 OrbitalElementsSensorModel(Model &pnt, const std::string &m_name="orbital_elements");
78 OrbitalElementsSensorModel(SimulationExecutive &e, const std::string &m_name="orbital_elements");
79 OrbitalElementsSensorModel(Model &pnt, int schedule_slot, const std::string &m_name="orbital_elements");
80 OrbitalElementsSensorModel(SimulationExecutive &e, int schedule_slot, const std::string &m_name="orbital_elements");
81 virtual ~OrbitalElementsSensorModel() {}
82
83 protected:
84 int execute();
85
86 // Temporary vector to hold orbital elements output
87 CartesianVector6D _orbital_elements;
88 };
89
90}
91
92#endif
Base model class for derived implementation.
Definition Model.h:56
Orbital elements sensor model.
Definition OrbitalElementsSensorModel.h:39
int execute()
Function to execute the task. All math and calculations should be here.
Definition OrbitalElementsSensorModel.cpp:33
Implementation of the executive class for simulation.
Definition SimulationExecutive.h:63
#define CartesianVector6D
Definition macros.h:58
#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< clockwerk::CartesianVector< double, 3 > > vel__inertial
Definition OrbitalElementsSensorModel.h:55
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > pos__inertial
Definition OrbitalElementsSensorModel.h:53
clockwerk::DataIO< double > e
Definition OrbitalElementsSensorModel.h:64
clockwerk::DataIO< double > a
Definition OrbitalElementsSensorModel.h:62
clockwerk::DataIO< double > RAAN
Definition OrbitalElementsSensorModel.h:68
clockwerk::DataIO< double > i
Definition OrbitalElementsSensorModel.h:66
clockwerk::DataIO< double > f
Definition OrbitalElementsSensorModel.h:72
clockwerk::DataIO< double > w
Definition OrbitalElementsSensorModel.h:70
clockwerk::DataIO< double > mu
Definition OrbitalElementsSensorModel.h:46