WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
SpacecraftLinkModel.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/*
17Spacecraft link model header file
18
19Author: Alex Reynolds
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Spacecraft Link",
24 "exclude" : False,
25 "category" : "Assemblies"
26}
27aliases = {"sc_1_frame" : "Spacecraft 1 Body",
28 "sc_2_frame" : "Spacecraft 2 Body",
29 "r_planet" : "Planet Equatorial Radius",
30 "planet_frame" : "Planet Frame",
31 "max_range" : "Max Range (m)",
32 "max_range_rate" : "Max Range Rate (m/s)",
33 "max_az_look_angle" : "EXCLUDE",
34 "max_el_look_angle" : "EXCLUDE",
35 "range" : "Range",
36 "range_rate" : "Range Rate",
37 "visible" : "Visible",
38 "sc_1_az_look_angle" : "EXCLUDE",
39 "sc_1_el_look_angle" : "EXCLUDE",
40}
41*/
42
43#ifndef MODELS_STATES_SPACECRAFT_LINK_MODEL_H
44#define MODELS_STATES_SPACECRAFT_LINK_MODEL_H
45
50
51namespace warptwin {
52
65 MODEL(SpacecraftLinkModel)
66 public:
67 // Model params
68 // NAME TYPE DEFAULT VALUE
73 SIGNAL(sc_1_frame, Frame*, nullptr)
75 SIGNAL(sc_2_frame, Frame*, nullptr)
78 SIGNAL(planet_frame, Frame*, nullptr)
80 SIGNAL(r_planet, double, warpos::earth_wgs84.eq_radius)
83 SIGNAL(max_range, double, warpos::AU_TO_METERS)
86 SIGNAL(max_range_rate, double, warpos::AU_TO_METERS)
90 SIGNAL(max_az_look_angle, double, warpos::TWO_PI)
94 SIGNAL(max_el_look_angle, double, warpos::TWO_PI)
96
97 // Model inputs
98 // NAME TYPE DEFAULT VALUE
100
102
103 // Model outputs
104 // NAME TYPE DEFAULT VALUE
107 SIGNAL(range, double, 0.0)
109 SIGNAL(range_rate, double, 0.0)
111 SIGNAL(sc_1_az_look_angle, double, 0.0)
113 SIGNAL(sc_1_el_look_angle, double, 0.0)
115 SIGNAL(visible, bool, false)
117
118 protected:
119 int16 start() override;
120 int16 execute() override;
121
122 // The range, azimuth, elevation look angle for both spacecraft
123 RangeAzElSensorModel _range_az_el_sensor;
124
125 // Occultation model used internally
126 OccultationModel _oc;
127
128 // Temporary/local variables to hold intermediate calculations
134 };
135}
136
137#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
Frame class definition.
Definition Frame.h:96
#define CartesianVector3
Definition mathmacros.h:43
Definition CircularBuffer.hpp:28
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
CartesianVector3 _sc_pos_tmp__sc
Definition SpacecraftLinkModel.h:132
int16 start() override
Class to execute logging.
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
OccultationModel _oc
Definition SolarPanelModel.h:115
RangeAzElSensorModel _range_az_el_sensor
The range az el sensor for our actual ground station.
Definition GroundStationModel.h:136
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
clockwerk::Quaternion _sc_quat_tmp_root
Definition SpacecraftLinkModel.h:129
CartesianVector3 _sc_vel_tmp__root
Definition SpacecraftLinkModel.h:131
CartesianVector3 _sc_vel_tmp__sc
Definition SpacecraftLinkModel.h:133
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
CartesianVector3 _sc_pos_tmp__root
Definition SpacecraftLinkModel.h:130