ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
ProximityMonitor.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/*
17Proximity Monitor header file
18
19Author: Sam Matez
20*/
21#ifndef MONITORS_PROXIMITY_MONITOR_H
22#define MONITORS_PROXIMITY_MONITOR_H
23
24#include "core/CartesianVector.hpp"
25#include "architecture/Tasks.h"
26#include "architecture/Time.h"
27#include "architecture/Executive.h"
28#include "data_management/GraphTreeObject.h"
29#include "data_management/DataIO.hpp"
30#include "core/clockwerkerrors.h"
31#include "simulation/SimulationSteps.h"
32
33namespace modelspace {
34
35 /// The time trigger monitor is a simple implementation of the monitor
36 /// that triggers continuously after a set time. The time is set upon
37 /// construction, but may be changed during run via function.
38 class ProximityMonitor : public clockwerk::Monitor {
39 public:
40 // Model params
41 // NAME TYPE DEFAULT VALUE
43 /** This is the variable at what difference between deputy and chief the monitor should trigger */
44 SIGNAL(trigger_range, double, 1000.0)
46
47 // Model inputs
48 // NAME TYPE DEFAULT VALUE
50 /** Take chief position (position 1)*/
52 /** Take deputy position (position 2) */
55
57 /** The range between the chief and deputy */
58 SIGNAL(range, double, 0.0)
60
61 /// Overloaded onstructors for the model object -- requires executive and (optional) name
62 ProximityMonitor(clockwerk::Task &pnt, const std::string &m_name="proximity_monitor")
63 : clockwerk::Monitor(pnt, ALL, m_name) {}
64 ProximityMonitor(clockwerk::Executive &e, const std::string &m_name="proximity_monitor")
65 : clockwerk::Monitor(e, ALL, m_name) {}
66 ProximityMonitor(clockwerk::Task &pnt, int schedule_slot, const std::string &m_name="proximity_monitor")
67 : clockwerk::Monitor(pnt, schedule_slot, m_name) {}
68 ProximityMonitor(clockwerk::Executive &e, int schedule_slot, const std::string &m_name="proximity_monitor")
69 : clockwerk::Monitor(e, schedule_slot, m_name) {}
70 ~ProximityMonitor() {};
71
72 protected:
73 double _range; // stores calculated range
74 CartesianVector3D _rel_position; // stores relative position vector
75
76 /// @brief Function to check our current (base) time against
77 /// our rate conditions
78 /// @return Error code corresponding to success/failure
79 /// @note Will NOT run if trigger and persistence are true
80 int execute();
81 };
82
83}
84
85#endif
Central control mechanism to run simulations and software.
Definition Executive.h:43
Base class implementation of the monitor.
Definition Tasks.h:212
Monitor(Executive &executive, int schedule_slot=0, const std::string &m_name="Unnamed")
Executive-based constructor for the task.
Definition Tasks.h:232
Monitor(Task &pnt, int schedule_slot=0, const std::string &m_name="Unnamed")
Task-based constructor for the task. Auto-assigns executive.
Definition Tasks.h:224
This is the base implementation of the task class.
Definition Tasks.h:68
The time trigger monitor is a simple implementation of the monitor that triggers continuously after a...
Definition ProximityMonitor.h:38
int execute()
Function to check our current (base) time against our rate conditions.
Definition ProximityMonitor.cpp:22
ProximityMonitor(clockwerk::Task &pnt, const std::string &m_name="proximity_monitor")
Overloaded onstructors for the model object – requires executive and (optional) name.
Definition ProximityMonitor.h:62
#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 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 > > chief_position
Definition ProximityMonitor.h:51
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > deputy_position
Definition ProximityMonitor.h:53
clockwerk::DataIO< double > range
Definition ProximityMonitor.h:58
clockwerk::DataIO< double > trigger_range
Definition ProximityMonitor.h:44