WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
FrameStateSensorModel.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/*
17Frams state sensor model header file
18
19Author: Alex Reynolds
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Frame State Sensor",
24 "exclude" : False,
25 "category" : "Sensors"
26}
27aliases = {"target_frame_ptr" : "Frame A",
28 "reference_frame_ptr" : "Frame B",
29 "output_frame_ptr" : "EXCLUDE",
30 "pos_tgt_ref__out" : "Position A wrt B",
31 "vel_tgt_ref__out" : "Velocity A in B",
32 "vel_tgt_ref_inertial__out" : "EXCLUDE",
33 "att_tgt_ref" : "Attitude A wrt B",
34 "omega_tgt_ref__out" : "Ang. Vel. A wrt B"
35}
36*/
37
38#ifndef MODELS_STATES_FRAME_STATE_SENSOR_MODEL_H
39#define MODELS_STATES_FRAME_STATE_SENSOR_MODEL_H
40
41#include "simulation/Model.h"
42#include "frames/Frame.h"
43#include "frames/frameutils.h"
44
45namespace warptwin {
46
60 MODEL(FrameStateSensorModel)
61 public:
62 // Model params
63 // NAME TYPE DEFAULT VALUE
67 SIGNAL(target_frame_ptr, Frame*, nullptr)
68
71 SIGNAL(reference_frame_ptr, Frame*, nullptr)
75 SIGNAL(output_frame_ptr, Frame*, nullptr)
77
78 // Model inputs
79 // NAME TYPE DEFAULT VALUE
81
83
84 // Model outputs
85 // NAME TYPE DEFAULT VALUE
89 SIGNAL(pos_tgt_ref__out, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
93 SIGNAL(vel_tgt_ref__out, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
97 SIGNAL(vel_tgt_ref_inertial__out,CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
99 SIGNAL(att_tgt_ref, clockwerk::Quaternion, clockwerk::Quaternion({1.0, 0.0, 0.0, 0.0}))
102 SIGNAL(omega_tgt_ref__out, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
104
105 protected:
106 int16 start() override;
107 int16 execute() override;
108
109 // DCM relating our reference frame to our root frame
111
113 };
114}
115
116#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
Class defining a direction cosine matrix inherited from Matrix.
Definition DCM.h:69
Frame class definition.
Definition Frame.h:96
#define CartesianVector3
Definition mathmacros.h:43
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)
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
CartesianVector3 _tmp_tgt
Definition FrameStateSensorModel.h:112
clockwerk::DCM _dcm_tmp
Definition FrameStateSensorModel.h:110