ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
GroundStationSensor.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/*
17Camera sensor model header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef MODELS_SENSORS_SIMPLE_CAMERA_SENSOR_H
23#define MODELS_SENSORS_SIMPLE_CAMERA_SENSOR_H
24
25#include "core/macros.h"
26#include "simulation/Model.h"
27#include "models/support/BiasNoiseModel.h"
28#include "monitors/RateMonitor.h"
29
30namespace modelspace {
31 /**
32 * @brief Ground Station Sensor Model
33 *
34 * The ground station sensor model is a wrapper around the
35 * ground station model which perturbs the range and range
36 * rate measurements according to the inputs to this model.
37 *
38 * This model also downselects rate according to the input
39 * to this model.
40 *
41 * Author: Alex Reynolds <alex.reynolds@attx.tech>
42 */
43 class GroundStationSensor : public Model {
44 public:
45 // Model params
46 // NAME TYPE DEFAULT VALUE
48 /** The bias in the range measurement output described as a single scalar
49 * Default is no bias. */
50 SIGNAL(range_bias, double, 0.0)
51 /** The bias in the range rate measurement output described as a single scalar
52 * Default is no bias. */
53 SIGNAL(range_rate_bias, double, 0.0)
54 /** The one-sigma gaussian noise in range measurement output described as a scalar
55 * Default is no noise. */
56 SIGNAL(range_gaussian_noise, double, 0.0)
57 /** The one-sigma gaussian noise in range rate measurement output described as a scalar
58 * Default is no noise. */
60 /** The rate at which the GS generates an output, in seconds. Setting this value
61 * to 0 forces the GS to output at the simulation rate. */
62 SIGNAL(rate_sec, clockwerk::Time, clockwerk::Time(0))
63 /** Value to seed the internal RNG for this model. */
64 SIGNAL(seed_value, int, 0)
66
67 // Model inputs
68 // NAME TYPE DEFAULT VALUE
70 /** This is the output time from the model. Will be left stale when not updated*/
71 SIGNAL(time_in, clockwerk::Time, clockwerk::Time(0))
72 /** This is the input range from the ground station model*/
73 SIGNAL(range_in, double, 0.0)
74 /** This is the input range rate from the ground station model*/
75 SIGNAL(range_rate_in, double, 0.0)
77
78 // Model outputs
79 // NAME TYPE DEFAULT VALUE
81 /** This is the time output every time a measurement is made. Left stale
82 * when ground station is masked or due to measurement rate*/
83 SIGNAL(time_measured, clockwerk::Time, clockwerk::Time(0))
84 /** This is the range output every time a measurement is made. Left stale
85 * when ground station is masked or due to measurement rate. Includes bias
86 * and noise */
87 SIGNAL(range_measured, double, 0.0)
88 /** This is the range rate output every time a measurement is made. Left stale
89 * when ground station is masked or due to measurement rate. Includes bias
90 * and noise */
91 SIGNAL(range_rate_measured, double, 0.0)
93
94 /// @brief Accessor for the internal bias and noise model
95 /// @return Pointer to the bias noise model
97
98 /// @brief Accessor for the internal rate monitor model
99 /// @return Pointer to the rate monitor model
101
102 // Model-specific implementations of startup and derivative
103 GroundStationSensor(Model &pnt, const std::string &m_name="ground_station_sensor");
104 GroundStationSensor(SimulationExecutive &e, const std::string &m_name="ground_station_sensor");
105 GroundStationSensor(Model &pnt, int schedule_slot, const std::string &m_name="ground_station_sensor");
106 GroundStationSensor(SimulationExecutive &e, int schedule_slot, const std::string &m_name="ground_station_sensor");
107 virtual ~GroundStationSensor() {}
108 protected:
109 int start();
110 int execute();
111
112 /// @brief Function to configure sensor -- runs in all constructors
113 void _configureInternal();
114
115 /// @brief The bias and noise model for sensor output.
117
118 /// @brief Rate monitor to control the rate at which the sensor runs
120 };
121
122}
123
124#endif
DataIO(GraphTreeObject *data_parent, std::string data_name, T initial_value)
Constructor for the DataIO object.
Definition DataIO.hpp:134
Wrapper to manage and convert time as timespce.
Definition Time.h:45
Bias and noise model.
Definition BiasNoiseModel.h:39
Ground Station Sensor Model.
Definition GroundStationSensor.h:43
modelspace::BiasNoiseModel * biasNoiseModel()
Accessor for the internal bias and noise model.
Definition GroundStationSensor.h:96
void _configureInternal()
Function to configure sensor – runs in all constructors.
Definition GroundStationSensor.cpp:51
modelspace::RateMonitor * rateMonitor()
Accessor for the internal rate monitor model.
Definition GroundStationSensor.h:100
int execute()
Function to execute the task. All math and calculations should be here.
Definition GroundStationSensor.cpp:70
RateMonitor _rate_monitor
Rate monitor to control the rate at which the sensor runs.
Definition GroundStationSensor.h:119
int start()
Function to perform task startup activities (step once after creation)
Definition GroundStationSensor.cpp:62
BiasNoiseModel _sensor_bias_noise
The bias and noise model for sensor output.
Definition GroundStationSensor.h:116
Base model class for derived implementation.
Definition Model.h:56
Monitor to trigger at a particular rate.
Definition RateMonitor.h:42
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 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::Time > time_in
Definition GroundStationSensor.h:71
clockwerk::DataIO< double > range_rate_in
Definition GroundStationSensor.h:75
clockwerk::DataIO< double > range_in
Definition GroundStationSensor.h:73
clockwerk::DataIO< double > range_rate_measured
Definition GroundStationSensor.h:91
clockwerk::DataIO< double > range_measured
Definition GroundStationSensor.h:87
clockwerk::DataIO< clockwerk::Time > time_measured
Definition GroundStationSensor.h:83
clockwerk::DataIO< double > range_bias
Definition GroundStationSensor.h:50
clockwerk::DataIO< double > range_rate_gaussian_noise
Definition GroundStationSensor.h:59
clockwerk::DataIO< double > range_gaussian_noise
Definition GroundStationSensor.h:56
clockwerk::DataIO< double > range_rate_bias
Definition GroundStationSensor.h:53
clockwerk::DataIO< clockwerk::Time > rate_sec
Definition GroundStationSensor.h:62
clockwerk::DataIO< int > seed_value
Definition GroundStationSensor.h:64