WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
TimedImpulsiveBurnModel.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX INC 2025. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX INC. 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 INC.
15******************************************************************************/
16/*
17Impulse model header file
18
19Author: Alex Reynolds
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Timed Impulsive Burn",
24 "exclude" : False,
25 "category" : "GN&C"
26}
27aliases = {"body_frame" : "Spacecraft Body",
28 "burn_frame" : "Frame of Burn Vector",
29 "time_of_ignition" : "Burn Time",
30 "deltav__burn" : "Burn Vector",
31 "current_time" : "Time"
32}
33*/
34#ifndef MODELS_ACTUATORS_TIMED_IMPULSIVE_BURN_MODEL_H
35#define MODELS_ACTUATORS_TIMED_IMPULSIVE_BURN_MODEL_H
36
37#include "simulation/Model.h"
39#include "frames/Frame.h"
40#include "frames/Body.h"
41#include "frames/Node.h"
44
45namespace warptwin {
46
59 MODEL(TimedImpulsiveBurnModel)
60 public:
61 // Model params
62 // NAME TYPE DEFAULT VALUE
65 SIGNAL(body_frame, Body*, nullptr)
67 SIGNAL(burn_frame, Frame*, nullptr)
70 SIGNAL(time_of_ignition, clockwerk::Time, clockwerk::Time(UINT32_MAX, 0))
73 SIGNAL(deltav__burn, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
75
76 // Model inputs
77 // NAME TYPE DEFAULT VALUE
80 SIGNAL(current_time, clockwerk::Time, clockwerk::Time())
82
83 // Model outputs
84 // NAME TYPE DEFAULT VALUE
86
88
91 warptwin::TimeTriggerMonitor* timeTriggerMonitor() {return &_time_trigger;}
92
94 warptwin::ImpulseModel* impulseModel() {return &_impulse;}
95 protected:
96 int16 start() override;
97 int16 execute() override;
98
99 // Internal models and monitors
100 TimeTriggerMonitor _time_trigger;
101 ImpulseModel _impulse;
102
103 // Node at which forces will be applied
105
106 // Boolean indicating whether trigger has happened before
107 bool _triggered = false;
108 };
109}
110
111#endif
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition appmacros.h:27
#define START_PARAMS
Definition appmacros.h:42
#define END_OUTPUTS
Definition appmacros.h:33
#define END_PARAMS
Definition appmacros.h:47
#define START_OUTPUTS
Definition appmacros.h:28
#define END_INPUTS
Definition appmacros.h:40
#define START_INPUTS
Definition appmacros.h:35
Wrapper to manage and convert time as timespce.
Definition Time.h:53
Class to define a body as a frame with mass and inertia.
Definition Body.h:44
Frame class definition.
Definition Frame.h:96
Node class to apply forces and moments to frames.
Definition Node.h:44
#define CartesianVector3
Definition mathmacros.h:43
Definition CircularBuffer.hpp:28
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
int16 start() override
Class to execute logging.
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
bool _triggered
Definition TimedImpulsiveBurnModel.h:107
Node _force_node
Definition TimedImpulsiveBurnModel.h:104
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
TimeTriggerMonitor _time_trigger
Definition TimedImpulsiveBurnModel.h:100
ImpulseModel _impulse
Definition TimedImpulsiveBurnModel.h:101
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
warptwin::ImpulseModel * impulseModel()
Function to get a handle to the impulse model contained within this model.
Definition TimedImpulsiveBurnModel.h:94