ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
LvlhFrameManagerModel.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/*
17Frams state sensor model header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef MODELS_SUPPORT_LVLH_FRAME_MODEL_H
23#define MODELS_SUPPORT_LVLH_FRAME_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
30namespace modelspace {
31
32 /**
33 * @brief LVLV Frame Manager Model
34 *
35 * This model creates and maintains the LVLH reference frame
36 * according to the NASA definition here:
37 * https://ntrs.nasa.gov/api/citations/19780010162/downloads/19780010162.pdf
38 *
39 * It creates a frame as a child of the parent frame parameterized by
40 * parent. It locks position to the parent frame, leaves attitude free,
41 * then updates attitude at every derivative step according to the LVLH
42 * frame definition.
43 *
44 * Definition:
45 * +Z axis directed toward the center of the Earth
46 * +Y axis perpendicular to the orbit plane with direction opposite angular momentum
47 * +X axis completes the right hand frame in the direction of orbit travel
48 *
49 * Important: This is a position-only frame. Angular velocity is not updated
50 */
51 class LvlhFrameManagerModel : public Model {
52 public:
53 // Model params
54 // NAME TYPE DEFAULT VALUE
56 /** The inertial parent frame which the target frame is orbiting */
58 /** The reference target frame to which the LVLH frame should attach */
61
62 // Model inputs
63 // NAME TYPE DEFAULT VALUE
65 /** This is the orbital position of the object for which we're calculating LVLH */
67 /** This is the orbital velocity of the object for which we're calculating LVLH */
70
71 // Model outputs
72 // NAME TYPE DEFAULT VALUE
74 /** The LVLH frame produced by this model */
77
78 // Model-specific implementations of startup and derivative
79 LvlhFrameManagerModel();
80 LvlhFrameManagerModel(Model &pnt, const std::string &m_name="lvlh_frame_manager");
81 LvlhFrameManagerModel(SimulationExecutive &e, const std::string &m_name="lvlh_frame_manager");
82 LvlhFrameManagerModel(Model &pnt, int schedule_slot, const std::string &m_name="lvlh_frame_manager");
83 LvlhFrameManagerModel(SimulationExecutive &e, int schedule_slot, const std::string &m_name="lvlh_frame_manager");
84 virtual ~LvlhFrameManagerModel() {}
85 protected:
86 int start();
87 int execute();
88
89 /// @brief This is the actual LVLH frame
90 FrameD _lvlh_frame = FrameD("lvlh_frame");
91
92 /// @brief Temporary variable to hold lvlh attitude
94
95 /// @brief Temporary variable to hold LVLH angular velociyt in lvlh frame
97 };
98
99}
100
101#endif
DataIO(GraphTreeObject *data_parent, std::string data_name, T initial_value)
Constructor for the DataIO object.
Definition DataIO.hpp:134
Frame(const std::string &name, Frame< T > *par=nullptr, bool free=false)
Constructor for the frame object.
Definition Frame.hpp:294
LVLV Frame Manager Model.
Definition LvlhFrameManagerModel.h:51
int start()
Function to perform task startup activities (step once after creation)
Definition LvlhFrameManagerModel.cpp:44
clockwerk::DCM< double > _lvlh_attitude__r
Temporary variable to hold lvlh attitude.
Definition LvlhFrameManagerModel.h:93
clockwerk::Frame< double > _lvlh_frame
This is the actual LVLH frame.
Definition LvlhFrameManagerModel.h:90
clockwerk::CartesianVector< double, 3 > _lvlh_ang_vel__lvlh
Temporary variable to hold LVLH angular velociyt in lvlh frame.
Definition LvlhFrameManagerModel.h:96
int execute()
Function to execute the task. All math and calculations should be here.
Definition LvlhFrameManagerModel.cpp:69
Base model class for derived implementation.
Definition Model.h:56
Implementation of the executive class for simulation.
Definition SimulationExecutive.h:63
#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 DCMD
Definition macros.h:70
#define START_OUTPUTS
Definition macros.h:88
#define FrameD
Definition macros.h:64
#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 LvlhFrameManagerModel.h:66
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > vel__inertial
Definition LvlhFrameManagerModel.h:68
clockwerk::DataIO< clockwerk::Frame< double > * > lvlh_frame_ptr
Definition LvlhFrameManagerModel.h:75
clockwerk::DataIO< clockwerk::Frame< double > * > target_frame_ptr
Definition LvlhFrameManagerModel.h:59
clockwerk::DataIO< clockwerk::Frame< double > * > planet_frame_ptr
Definition LvlhFrameManagerModel.h:57