ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
TimedImpulsiveBurnModel.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/*
17Impulse model header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef MODELS_ACTUATORS_TIMED_IMPULSIVE_BURN_MODEL_H
23#define MODELS_ACTUATORS_TIMED_IMPULSIVE_BURN_MODEL_H
24
25#include "core/macros.h"
26#include "simulation/Model.h"
27#include "core/CartesianVector.hpp"
28#include "six_dof_dynamics/Frame.hpp"
29#include "six_dof_dynamics/Body.hpp"
30#include "six_dof_dynamics/Node.hpp"
31#include "models/actuators/ImpulseModel.h"
32#include "monitors/TimeTriggerMonitor.h"
33
34namespace modelspace {
35
36 /**
37 * @brief Timed Impulsive Burn Model
38 *
39 * This model is used for mission planning to program an impulsive burn to occur
40 * at a specific time and in a specific frame. The model internally uses a
41 * time trigger monitor, ImpulseModel, and node to apply a force to a specific
42 * body in the simulation.
43 *
44 * Once triggered, the impulsive burn model will not trigger again until reset.
45 *
46 * Author: Alex Reynolds <alex.reynolds@attx.tech>
47 */
48 class TimedImpulsiveBurnModel : public Model {
49 public:
50 // Model params
51 // NAME TYPE DEFAULT VALUE
53 /** The body frame of the spacecraft which will be performing the burn */
54 SIGNAL(body_frame, BodyD*, nullptr)
55 /** The frame in which the burn will be executed. If null, will execute in the body frame */
56 SIGNAL(burn_frame, FrameD*, nullptr)
57 /** The time of ignition of the burn in the selected timescale. Default is to not trigger */
58 SIGNAL(time_of_ignition, clockwerk::Time, clockwerk::Time(999999999999, 0))
59 /** The delta V of the burn to be executed at time_of_ignition */
62
63 // Model inputs
64 // NAME TYPE DEFAULT VALUE
66 /** The current time in the same timescale as the parameterized TIG */
67 SIGNAL(current_time, clockwerk::Time, clockwerk::Time())
69
70 // Model outputs
71 // NAME TYPE DEFAULT VALUE
73
75
76 TimedImpulsiveBurnModel(Model &pnt, const std::string &m_name="impulse");
77 TimedImpulsiveBurnModel(SimulationExecutive &e, const std::string &m_name="impulse");
78 TimedImpulsiveBurnModel(Model &pnt, int schedule_slot, const std::string &m_name="impulse");
79 TimedImpulsiveBurnModel(SimulationExecutive &e, int schedule_slot, const std::string &m_name="impulse");
80 ~TimedImpulsiveBurnModel() {}
81
82 /// @brief Function to get a handle to the time trigger monitor contained within this model
83 /// @return Pointer to the time trigger monitor
84 modelspace::TimeTriggerMonitor* timeTriggerMonitor() {return &_time_trigger;}
85 /// @brief Function to get a handle to the impulse model contained within this model
86 /// @return Pointer to the impulse model
87 modelspace::ImpulseModel* impulseModel() {return &_impulse;}
88 protected:
89 int start();
90 int execute();
91
92 // Internal models and monitors
93 TimeTriggerMonitor _time_trigger;
94 ImpulseModel _impulse;
95
96 // Node at which forces will be applied
97 NodeD _force_node;
98
99 // Boolean indicating whether trigger has happened before
100 bool _triggered = false;
101 };
102}
103
104#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
Time()
Default, copy constructors and default destructor.
Definition Time.h:48
Impulse Model.
Definition ImpulseModel.h:39
Base model class for derived implementation.
Definition Model.h:56
Implementation of the executive class for simulation.
Definition SimulationExecutive.h:63
The time trigger monitor is a simple implementation of the monitor that triggers continuously after a...
Definition TimeTriggerMonitor.h:37
Timed Impulsive Burn Model.
Definition TimedImpulsiveBurnModel.h:48
modelspace::TimeTriggerMonitor * timeTriggerMonitor()
Function to get a handle to the time trigger monitor contained within this model.
Definition TimedImpulsiveBurnModel.h:84
modelspace::ImpulseModel * impulseModel()
Function to get a handle to the impulse model contained within this model.
Definition TimedImpulsiveBurnModel.h:87
int execute()
Function to execute the task. All math and calculations should be here.
Definition TimedImpulsiveBurnModel.cpp:71
int start()
Function to perform task startup activities (step once after creation)
Definition TimedImpulsiveBurnModel.cpp:45
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition macros.h:87
#define BodyD
Definition macros.h:66
#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 NodeD
Definition macros.h:68
#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< clockwerk::Time > current_time
Definition TimedImpulsiveBurnModel.h:67
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > deltav__burn
Definition TimedImpulsiveBurnModel.h:60
clockwerk::DataIO< clockwerk::Body< double > * > body_frame
Definition TimedImpulsiveBurnModel.h:54
clockwerk::DataIO< clockwerk::Frame< double > * > burn_frame
Definition TimedImpulsiveBurnModel.h:56
clockwerk::DataIO< clockwerk::Time > time_of_ignition
Definition TimedImpulsiveBurnModel.h:58