ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
OrbitalElementsStateInit.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_STATE_INIT_H
23#define MODELS_STATES_ORBITAL_ELEMENTS_STATE_INIT_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 Model to produce position/velocity vector from orbital elements
35 *
36 * This model produces the xyz cartesian state of a spacecraft from
37 * orbital elements for state initialization.
38 */
39 class OrbitalElementsStateInit : 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)
47 /** The semimajor axis of the spacecraft orbit, in meters */
48 SIGNAL(a, double, 0.0)
49 /** The orbit eccentricity */
50 SIGNAL(e, double, 0.0)
51 /** The orbit inclination, in radians */
52 SIGNAL(i, double, 0.0)
53 /** The orbit RAAN, in radians */
54 SIGNAL(RAAN, double, 0.0)
55 /** The orbit argument of periapsis */
56 SIGNAL(w, double, 0.0)
57 /** The true anomaly, in radians */
58 SIGNAL(f, double, 0.0)
60
61 // Model inputs
62 // NAME TYPE DEFAULT VALUE
64
66
67 // Model outputs
68 // NAME TYPE DEFAULT VALUE
70 /** The position of the spacecraft in a generic inertial frame */
72 /** The velocity of the spacecraft in a generic inertial frame */
75
76 // Model-specific implementations of startup and derivative
77 OrbitalElementsStateInit();
78 OrbitalElementsStateInit(Model &pnt, const std::string &m_name="orbit_init");
79 OrbitalElementsStateInit(SimulationExecutive &e, const std::string &m_name="orbit_init");
80 OrbitalElementsStateInit(Model &pnt, int schedule_slot, const std::string &m_name="orbit_init");
81 OrbitalElementsStateInit(SimulationExecutive &e, int schedule_slot, const std::string &m_name="orbit_init");
82 virtual ~OrbitalElementsStateInit() {}
83
84 protected:
85 int start();
86
87 // Temporary vector to hold orbital elements input
88 CartesianVector6D _orbital_elements;
89
90 // Temporary vectors to hold position/velocity output
93 };
94
95}
96
97#endif
Base model class for derived implementation.
Definition Model.h:56
Model to produce position/velocity vector from orbital elements.
Definition OrbitalElementsStateInit.h:39
int start()
Function to perform task startup activities (step once after creation)
Definition OrbitalElementsStateInit.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 > > pos__inertial
Definition OrbitalElementsStateInit.h:71
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > vel__inertial
Definition OrbitalElementsStateInit.h:73
clockwerk::DataIO< double > i
Definition OrbitalElementsStateInit.h:52
clockwerk::DataIO< double > f
Definition OrbitalElementsStateInit.h:58
clockwerk::DataIO< double > e
Definition OrbitalElementsStateInit.h:50
clockwerk::DataIO< double > RAAN
Definition OrbitalElementsStateInit.h:54
clockwerk::DataIO< double > a
Definition OrbitalElementsStateInit.h:48
clockwerk::DataIO< double > mu
Definition OrbitalElementsStateInit.h:46
clockwerk::DataIO< double > w
Definition OrbitalElementsStateInit.h:56