WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
SolarPanelModel.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/*
17Solar panel model header file
18
19Author: Alex Jackson
20*/
21/*
22Metadata for MS GUI:
23imdata = {"displayname" : "Solar Panel",
24 "exclude" : False,
25 "category" : "Power"
26}
27aliases = {"mass" : "Mass",
28 "solar_irr" : "Solar Flux",
29 "panel_eff" : "Solar Panel Efficiency",
30 "panel_area" : "Solar Panel Area",
31 "panel_normal__body" : "Panel Normal Vector",
32 "sun_frame_ptr" : "Sun Frame",
33 "r_sun" : "Solar Radius",
34 "planet_frame_ptr" : "Planet Frame",
35 "r_planet" : "Planet Radius",
36 "body_frame_ptr" : "Body Frame",
37 "power" : "Power",
38 "vis_frac" : "Visible Fraction",
39 "panel_body_fixed" : "Body Fixed Panel"
40}
41*/
42
43#ifndef MODELS_POWER_SOLAR_PANEL_MODEL_H
44#define MODELS_POWER_SOLAR_PANEL_MODEL_H
45
46#include "simulation/Model.h"
51
52namespace warptwin {
53
62 MODEL(SolarPanelModel)
63 public:
64
65 // Model params
66 // NAME TYPE DEFAULT VALUE
69 SIGNAL(mass, double, 0.0)
71 SIGNAL(solar_irr, double, 1361.0)
73 SIGNAL(panel_eff, double, 0.28)
75 SIGNAL(panel_area, double, 1.0)
78 SIGNAL(panel_normal__body, CartesianVector3, CartesianVector3({1.0,0.0,0.0}))
80 SIGNAL(sun_frame_ptr, Frame*, nullptr)
82 SIGNAL(r_sun, double, 695700000.0)
84 SIGNAL(planet_frame_ptr, Frame*, nullptr)
86 SIGNAL(r_planet, double, warpos::earth_wgs84.eq_radius)
88 SIGNAL(body_frame_ptr, Frame*, nullptr)
91 SIGNAL(panel_body_fixed, int, true)
93
94 // Model inputs
95 // NAME TYPE DEFAULT VALUE
97
99
100 // Model outputs
101 // NAME TYPE DEFAULT VALUE
104 SIGNAL(power, double, 0.0)
108 SIGNAL(vis_frac, double, 1.0)
110
111 protected:
112 int16 start() override;
113 int16 execute() override;
114 // Occultation model used internally
115 OccultationModel _oc;
116 // The frame state sensor for relative states between spacecraft and sun
117 FrameStateSensorModel _fss_sc_s;
118 // Effective solar area model used internally
119 EffectiveSolarAreaModel _esa;
120 // Solar panel power model used for internal calculations
121 SolarPanelPowerModel _spp;
122 };
123
124}
125
126#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.
SIGNAL(_mu, double, warpos::earth_wgs84.mu)
OccultationModel _oc
Definition SolarPanelModel.h:115
EffectiveSolarAreaModel _esa
Definition SolarPanelModel.h:119
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
int16 execute() override
Function to check monitor input conditions and set trigger flag accordingly. Should be implemented in...
FrameStateSensorModel _fss_sc_s
Definition SolarPanelModel.h:117
SolarPanelPowerModel _spp
Definition SolarPanelModel.h:121