JSBSim Flight Dynamics Model 1.3.3 (16 Oct 2026)
An Open Source Flight Dynamics and Control Software Library in C++
Loading...
Searching...
No Matches
FGMars.h
1/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3 Header: FGMars.h
4 Author: Jon Berndt
5 Date started: 01/05/2004
6
7 ------------- Copyright (C) 2004 Jon S. Berndt (jon@jsbsim.org) -------------
8
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
12 version.
13
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17 details.
18
19 You should have received a copy of the GNU Lesser General Public License along with
20 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 Further information about the GNU Lesser General Public License can also be found on
24 the world wide web at http://www.gnu.org.
25
26HISTORY
27--------------------------------------------------------------------------------
2801/05/2004 JSB Created
29
30%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31SENTRY
32%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
33
34#ifndef FGMars_H
35#define FGMars_H
36
37/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38INCLUDES
39%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
40
41#include "models/FGAtmosphere.h"
42
43/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44FORWARD DECLARATIONS
45%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
46
47namespace JSBSim {
48
49/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50CLASS DOCUMENTATION
51%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
52
57/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58CLASS DECLARATION
59%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
60
61class FGMars : public FGAtmosphere {
62public:
65
66 double GetTemperature(double altitude) const override { return Temperature; }
67 double GetPressure(double altitude) const override { return Pressure; }
68 void SetTemperature(double t, double h, eTemperature unit) override {}
69
70protected:
76 static constexpr double Mmars = 43.49 * kgtoslug / 1000.0;
77
78private:
79 void Calculate(double altitude) override;
80 void Debug(int from) override;
81};
82
83} // namespace JSBSim
84
85//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86#endif
87
Models an empty, abstract base atmosphere class.
eTemperature
Enums for specifying temperature units.
Encapsulates the JSBSim simulation executive.
Definition FGFDMExec.h:185
Models the Martian atmosphere.
Definition FGMars.h:61
static constexpr double Mmars
Mean molecular weight of the Martian atmosphere - slug/mol.
Definition FGMars.h:76
void SetTemperature(double t, double h, eTemperature unit) override
Sets the temperature at the supplied altitude.
Definition FGMars.h:68
double GetPressure(double altitude) const override
Returns the pressure at a specified altitude in psf.
Definition FGMars.h:67
double GetTemperature(double altitude) const override
Returns the actual modeled temperature in degrees Rankine at a specified altitude.
Definition FGMars.h:66
Main namespace for the JSBSim Flight Dynamics Model.
Definition FGFDMExec.cpp:73