WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
GroundStationModel.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/*
17Ground station model header file
18
19Author: Alex Reynolds
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Ground Station",
24 "exclude" : False,
25 "category" : "Assemblies"
26}
27aliases = {"spacecraft_frame" : "Spacecraft Body",
28 "planet_rotating_frame" : "Planet Rotating Frame",
29 "R_planet" : "Planet Equatorial Radius",
30 "flattening_planet" : "Ellipse Flattening",
31 "latitude_detic_rad" : "Latitude",
32 "longitude_rad" : "Longitude",
33 "elevation_mask_rad" : "Elevation Mask",
34 "position__enu" : "EXCLUDE",
35 "velocity__enu" : "EXCLUDE",
36 "range" : "Range",
37 "range_rate" : "Range Rate",
38 "azimuth" : "Azimuth",
39 "elevation" : "Elevation",
40 "masked" : "Masked",
41 "gs_position__pci" : "EXCLUDE",
42 "gs_velocity__pci" : "EXCLUDE",
43 "self_ptr" : "Ground Station"
44}
45*/
46
47#ifndef MODELS_STATES_GROUND_STATION_MODEL_H
48#define MODELS_STATES_GROUND_STATION_MODEL_H
49
53
54namespace warptwin {
55
66 MODEL(GroundStationModel)
67 public:
68 // Model params
69 // NAME TYPE DEFAULT VALUE
72 SIGNAL(spacecraft_frame, Frame*, nullptr)
76 SIGNAL(planet_rotating_frame, Frame*, nullptr)
78 SIGNAL(R_planet, double, warpos::earth_wgs84.eq_radius)
80 SIGNAL(flattening_planet, double, warpos::earth_wgs84.flattening)
82 SIGNAL(latitude_detic_rad, double, 0.0)
84 SIGNAL(longitude_rad, double, 0.0)
86 SIGNAL(elevation_mask_rad, double, 0.0)
88
89 // Model inputs
90 // NAME TYPE DEFAULT VALUE
92
94
95 // Model outputs
96 // NAME TYPE DEFAULT VALUE
101 SIGNAL(velocity__enu, CartesianVector3, CartesianVector3())
103 SIGNAL(range, double, 0.0)
105 SIGNAL(range_rate, double, 0.0)
107 SIGNAL(azimuth, double, 0.0)
109 SIGNAL(elevation, double, 0.0)
111 SIGNAL(masked, bool, true)
113 SIGNAL(gs_position__pci, CartesianVector3, CartesianVector3())
115 SIGNAL(gs_velocity__pci, CartesianVector3, CartesianVector3())
117 SIGNAL(self_ptr, clockwerk::GraphTreeObject*,nullptr)
119
120 // Getters for handles to respective submodels
121 // TODO: Fix this to not be needed because these can all be public. Until then it's here
122 clockwerk::DataIO<Frame*> enuFrame = clockwerk::DataIO<Frame*>(this, "enuFrame", &_enu_frame);
123 warptwin::FrameStateSensorModel* frameStateSensorEnu() {return &_fss_enu;}
124 warptwin::RangeAzElSensorModel* rangeAzElSensor() {return &_range_az_el_sensor;}
125 protected:
126 int16 start() override;
127 int16 execute() override;
128
131
133 FrameStateSensorModel _fss_enu;
134
136 RangeAzElSensorModel _range_az_el_sensor;
137
139 FrameStateSensorModel _fss_gs_pci;
140 };
141
142}
143
144#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
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.
Frame _enu_frame
The ENU frame created for the GS by this model.
Definition GroundStationModel.h:130
MODEL(GroundStationModel) public warptwin::FrameStateSensorModel * frameStateSensorEnu()
Simple ground station model.
Definition GroundStationModel.h:123
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
RangeAzElSensorModel _range_az_el_sensor
The range az el sensor for our actual ground station.
Definition GroundStationModel.h:136
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
FrameStateSensorModel _fss_gs_pci
The frame state sensor for GS state in the PCI frame.
Definition GroundStationModel.h:139
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
FrameStateSensorModel _fss_enu
The frame state sensor for relative states to the ENU frame.
Definition GroundStationModel.h:133
warptwin::RangeAzElSensorModel * rangeAzElSensor()
Definition GroundStationModel.h:124