WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
DipoleMagneticFieldModel.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/*
17Dipole magnetic field model header file
18
19Author: James Tabony
20*/
21/*
22Metadata for MS GUI:
23imdata = {"exclude" : True}
24*/
25
26#ifndef MODELS_ENVIRONMENT_DIPOLE_MAGNETIC_FIELD_MODEL_H
27#define MODELS_ENVIRONMENT_DIPOLE_MAGNETIC_FIELD_MODEL_H
28
29#include "frames/Body.h"
30#include "frames/frameutils.h"
31#include "simulation/Model.h"
33
34namespace warptwin {
35
52 MODEL(DipoleMagneticFieldModel)
53 public:
54 // Model params
55 // NAME TYPE DEFAULT VALUE
59 SIGNAL(mag_north_colat, double, 0.0)
62 SIGNAL(mag_north_lon, double, 0.0)
64 SIGNAL(dipole_magnitude, double, 30034)
66 SIGNAL(r_planet_equitorial, double, warpos::earth_wgs84.eq_radius)
68 SIGNAL(planet_frame_rotating, Frame*, nullptr)
70
71 // Model inputs
72 // NAME TYPE DEFAULT VALUE
76 SIGNAL(pos_obj_planet__PCR, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
78
79 // Model outputs
80 // NAME TYPE DEFAULT VALUE
84 SIGNAL(mag_field_obj__PCR, CartesianVector3, CartesianVector3({0.0, 0.0, 0.0}))
86
87 protected:
88 // Execute in protected
89 int16 start() override;
90 int16 execute() override;
91
92 // Internal variable for error handling
93 int _err;
94
95 // Temporary vectors and variables to carry out our calculations
96 CartesianVector3 _mag_dipole__PCR; // Magnetic dipole vector in planet centered rotating coordinates
97 CartesianVector3 _mag_field__PCR; // Magnetic field vector in planet centered rotating coordinates
98
99 // Internal variables for scaling factora
101
102 };
103
104}
105
106#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
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
int16 start() override
Class to execute logging.
double _scaling_factor
Definition DipoleMagneticFieldModel.h:100
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
int _err
Definition DipoleMagneticFieldModel.h:93
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
CartesianVector3 _mag_dipole__PCR
Definition DipoleMagneticFieldModel.h:96
CartesianVector3 _mag_field__PCR
Definition DipoleMagneticFieldModel.h:97