ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
GroundStationModel.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/*
17Ground station model header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef MODELS_STATES_GROUND_STATION_MODEL_H
23#define MODELS_STATES_GROUND_STATION_MODEL_H
24
27#include "utils/planetdefaults.h"
28
29namespace modelspace {
30
31 /**
32 * @brief Simple ground station model
33 *
34 * This model is a simple model of a ground station. It uses the FrameStateSensor
35 * and RangeAzElSensor internally to create an ENU frame as a child of the parent
36 * frame, then returns results every step. It is primarily a configuration wrapper
37 * model -- that is, it does the large majority of its work in startup, and adds
38 * little to no functionality at runtime, and instead runs the innter frame state
39 * sensor and range az el sensor model, which do the heavy lifting.
40 */
41 class GroundStationModel : public Model {
42 public:
43 // Model params
44 // NAME TYPE DEFAULT VALUE
46 /** The frame of the spacecraft object that the ground station will sense*/
48 /** The planet rotating frame to which the ground station is attached. Note that
49 * the planet rotating frame must be a child of the associated planet inertial
50 * frame, which is also used in this model. */
52 /** This is the equatorial radius of the planet. Default is Earth in meters */
53 SIGNAL(R_planet, double, clockwerk::earth_wgs84.semimajor_axis)
54 /** This is the centric latitude of the ground station, in radians */
55 SIGNAL(latitude_centric_rad, double, 0.0)
56 /** The longitude of the ground station, in radians*/
57 SIGNAL(longitude_rad, double, 0.0)
58 /** This is the elevation mask value, in radians, for the ground station. Default is zero degrees*/
59 SIGNAL(elevation_mask_rad, double, 0.0)
61
62 // Model inputs
63 // NAME TYPE DEFAULT VALUE
65
67
68 // Model outputs
69 // NAME TYPE DEFAULT VALUE
71 /** The position of the spacecraft as measured in the GS East, North, Up frame */
73 /** The velocity of the spacecraft as measured in the GS East, North, Up frame*/
75 /** This is the range of the input object to the frame. Will be zero if masked.*/
76 SIGNAL(range, double, 0.0)
77 /** This is the range rate of the spacecraft to the GS. Will be zero if masked.*/
78 SIGNAL(range_rate, double, 0.0)
79 /** This is the azimuth of the spacecraft wrt the frame x vector, in radians. Will be zero if masked */
80 SIGNAL(azimuth, double, 0.0)
81 /** This is the elevation of the spacecraft wrt the frame x-y plane, in radians. Will be zero if masked. */
82 SIGNAL(elevation, double, 0.0)
83 /** This is the mask flag for the ground station. True for masked, False for visible */
84 SIGNAL(masked, bool, true)
85 /** The position of the ground station as measured in the planet-centered inertial frame */
87 /** The velocity of the ground station as measured in the planet-centered inertial frame */
90
91 // Model-specific implementations of startup and derivative
92 GroundStationModel();
93 GroundStationModel(Model &pnt, const std::string &m_name="ground_station");
94 GroundStationModel(SimulationExecutive &e, const std::string &m_name="ground_station");
95 GroundStationModel(Model &pnt, int schedule_slot, const std::string &m_name="ground_station");
96 GroundStationModel(SimulationExecutive &e, int schedule_slot, const std::string &m_name="ground_station");
97 ~GroundStationModel() {}
98
99 // Getters for handles to respective submodels
100 // TODO: Fix this to not be needed because these can all be public. Until then it's here
101 clockwerk::DataIO<FrameD*> enuFrame = clockwerk::DataIO<FrameD*>(this, "enuFrame", &_enu_frame);
102 modelspace::FrameStateSensorModel* frameStateSensorEnu() {return &_fss_enu;}
103 modelspace::RangeAzElSensorModel* rangeAzElSensor() {return &_range_az_el_sensor;}
104 protected:
105 int start();
106 int execute();
107
108 /// @brief The ENU frame created for the GS by this model
110
111 /// @brief The frame state sensor for relative states to the ENU frame
113
114 /// @brief The range az el sensor for our actual ground station
116
117 /// @brief The frame state sensor for GS state in the PCI frame
119 };
120
121}
122
123#endif
Class for inter-object communication.
Definition DataIO.hpp:46
DataIO(GraphTreeObject *data_parent, std::string data_name, T initial_value)
Constructor for the DataIO object.
Definition DataIO.hpp:134
Frame state sensor model.
Definition FrameStateSensorModel.h:45
Simple ground station model.
Definition GroundStationModel.h:41
FrameStateSensorModel _fss_gs_pci
The frame state sensor for GS state in the PCI frame.
Definition GroundStationModel.h:118
int start()
Function to perform task startup activities (step once after creation)
Definition GroundStationModel.cpp:61
int execute()
Function to execute the task. All math and calculations should be here.
Definition GroundStationModel.cpp:114
RangeAzElSensorModel _range_az_el_sensor
The range az el sensor for our actual ground station.
Definition GroundStationModel.h:115
clockwerk::Frame< double > _enu_frame
The ENU frame created for the GS by this model.
Definition GroundStationModel.h:109
FrameStateSensorModel _fss_enu
The frame state sensor for relative states to the ENU frame.
Definition GroundStationModel.h:112
Base model class for derived implementation.
Definition Model.h:56
Range, azimuth, and elevation sensor model.
Definition RangeAzElSensorModel.h:51
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 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< double > azimuth
Definition GroundStationModel.h:80
clockwerk::DataIO< double > elevation
Definition GroundStationModel.h:82
clockwerk::DataIO< double > range
Definition GroundStationModel.h:76
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > gs_velocity__pci
Definition GroundStationModel.h:88
clockwerk::DataIO< bool > masked
Definition GroundStationModel.h:84
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > gs_position__pci
Definition GroundStationModel.h:86
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > velocity__enu
Definition GroundStationModel.h:74
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > position__enu
Definition GroundStationModel.h:72
clockwerk::DataIO< double > range_rate
Definition GroundStationModel.h:78
clockwerk::DataIO< double > R_planet
Definition GroundStationModel.h:53
clockwerk::DataIO< double > longitude_rad
Definition GroundStationModel.h:57
clockwerk::DataIO< clockwerk::Frame< double > * > spacecraft_frame
Definition GroundStationModel.h:47
clockwerk::DataIO< clockwerk::Frame< double > * > planet_rotating_frame
Definition GroundStationModel.h:51
clockwerk::DataIO< double > elevation_mask_rad
Definition GroundStationModel.h:59
clockwerk::DataIO< double > latitude_centric_rad
Definition GroundStationModel.h:55