ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
ImpulseModel.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_MODELS_IMPULSE_MODEL_H
23#define MODELS_ACTUATORS_MODELS_IMPULSE_MODEL_H
24
25#include "core/macros.h"
26#include "simulation/Model.h"
27#include "core/CartesianVector.hpp"
28
29namespace modelspace {
30
31 /**
32 * @brief Impulse Model
33 *
34 * This model is used to apply a force impulsively (across a single time
35 * step) to generate a velocity change. It receives a commanded impulse
36 * and calculates the force necessary to apply it, given the current
37 * simulation step size. Implictly uses the simulation executive time as input.
38 */
39 class ImpulseModel : public Model {
40 public:
41 // Model params
42 // NAME TYPE DEFAULT VALUE
45
46 // Model inputs
47 // NAME TYPE DEFAULT VALUE
49 /** Flag to trigger the impulse model to calculate and output a force */
50 SIGNAL(trigger, int, false)
51 /** The impulse to be applied across a single timestep */
54
55 // Model outputs
56 // NAME TYPE DEFAULT VALUE
58 /** The force applied for the timestep. Will read zero when trigger is false */
61
62 // Model-specific implementations of startup and derivative
63 ImpulseModel();
64 ImpulseModel(Model &pnt, const std::string &m_name="impulse");
65 ImpulseModel(SimulationExecutive &e, const std::string &m_name="impulse");
66 ImpulseModel(Model &pnt, int schedule_slot, const std::string &m_name="impulse");
67 ImpulseModel(SimulationExecutive &e, int schedule_slot, const std::string &m_name="impulse");
68 ~ImpulseModel() {}
69 protected:
70 int execute();
71 };
72
73}
74
75#endif
Impulse Model.
Definition ImpulseModel.h:39
int execute()
Function to execute the task. All math and calculations should be here.
Definition ImpulseModel.cpp:31
Base model class for derived implementation.
Definition Model.h:56
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 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< int > trigger
Definition ImpulseModel.h:50
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > impulse__f
Definition ImpulseModel.h:52
clockwerk::DataIO< clockwerk::CartesianVector< double, 3 > > force__f
Definition ImpulseModel.h:59