![]() |
JSBSim Flight Dynamics Model 1.0 (23 February 2013)
An Open Source Flight Dynamics and Control Software Library in C++
|
Inheritance diagram for MSIS:
Collaboration diagram for MSIS:Public Member Functions | |
| MSIS (FGFDMExec *) | |
| Constructor. | |
| ~MSIS () | |
| Destructor. | |
| bool | InitModel (void) |
| bool | Run (bool Holding) |
| Runs the MSIS-00 atmosphere model; called by the Executive Can pass in a value indicating if the executive is directing the simulation to Hold. | |
| void | UseExternal (void) |
| Does nothing. External control is not allowed. | |
| bool Run | ( | bool | Holding | ) | [virtual] |
| Holding | if true, the executive has been directed to hold the sim from advancing time. Some models may ignore this flag, such as the Input model, which may need to be active to listen on a socket for the "Resume" command to be given. |
Reimplemented from FGAtmosphere.
Definition at line 159 of file FGMSIS.cpp.
References FGPropagate::GetAltitudeASL(), FGFDMExec::GetAuxiliary(), FGLocation::GetLatitudeDeg(), FGLocation::GetLongitudeDeg(), FGFDMExec::GetPropagate(), and FGModel::Run().
{
if (FGModel::Run(Holding)) return true;
if (Holding) return false;
double h = FDMExec->GetPropagate()->GetAltitudeASL();
//do temp, pressure, and density first
//if (!useExternal) {
// get sea-level values
Calculate(FDMExec->GetAuxiliary()->GetDayOfYear(),
FDMExec->GetAuxiliary()->GetSecondsInDay(),
0.0,
FDMExec->GetPropagate()->GetLocation().GetLatitudeDeg(),
FDMExec->GetPropagate()->GetLocation().GetLongitudeDeg());
SLtemperature = output.t[1] * 1.8;
SLdensity = output.d[5] * 1.940321;
SLpressure = 1716.488 * SLdensity * SLtemperature;
SLsoundspeed = sqrt(2403.0832 * SLtemperature);
rSLtemperature = 1.0/SLtemperature;
rSLpressure = 1.0/SLpressure;
rSLdensity = 1.0/SLdensity;
rSLsoundspeed = 1.0/SLsoundspeed;
// get at-altitude values
Calculate(FDMExec->GetAuxiliary()->GetDayOfYear(),
FDMExec->GetAuxiliary()->GetSecondsInDay(),
h,
FDMExec->GetPropagate()->GetLocation().GetLatitudeDeg(),
FDMExec->GetPropagate()->GetLocation().GetLongitudeDeg());
//intTemperature = output.t[1] * 1.8;
//intDensity = output.d[5] * 1.940321;
//intPressure = 1716.488 * intDensity * intTemperature;
//cout << "T=" << intTemperature << " D=" << intDensity << " P=";
//cout << intPressure << " a=" << soundspeed << endl;
//}
Debug(2);
return false;
}
Here is the call graph for this function: