MCPcopy Create free account
hub / github.com/JSBSim-Team/jsbsim / LoadInputs

Method LoadInputs

src/FGFDMExec.cpp:432–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
431
432void FGFDMExec::LoadInputs(unsigned int idx)
433{
434 switch(idx) {
435 case ePropagate:
436 Propagate->in.vPQRidot = Accelerations->GetPQRidot();
437 Propagate->in.vUVWidot = Accelerations->GetUVWidot();
438 Propagate->in.DeltaT = dT;
439 break;
440 case eInput:
441 break;
442 case eInertial:
443 Inertial->in.Position = Propagate->GetLocation();
444 break;
445 case eAtmosphere:
446 Atmosphere->in.altitudeASL = Propagate->GetAltitudeASL();
447 Atmosphere->in.GeodLatitudeDeg = Propagate->GetGeodLatitudeDeg();
448 Atmosphere->in.LongitudeDeg = Propagate->GetLongitudeDeg();
449 break;
450 case eWinds:
451 Winds->in.AltitudeASL = Propagate->GetAltitudeASL();
452 Winds->in.DistanceAGL = Propagate->GetDistanceAGL();
453 Winds->in.Tl2b = Propagate->GetTl2b();
454 Winds->in.Tw2b = Auxiliary->GetTw2b();
455 Winds->in.V = Auxiliary->GetVt();
456 Winds->in.totalDeltaT = dT * Winds->GetRate();
457 break;
458 case eAuxiliary:
459 Auxiliary->in.Pressure = Atmosphere->GetPressure();
460 Auxiliary->in.Density = Atmosphere->GetDensity();
461 Auxiliary->in.Temperature = Atmosphere->GetTemperature();
462 Auxiliary->in.SoundSpeed = Atmosphere->GetSoundSpeed();
463 Auxiliary->in.KinematicViscosity = Atmosphere->GetKinematicViscosity();
464 Auxiliary->in.DistanceAGL = Propagate->GetDistanceAGL();
465 Auxiliary->in.Mass = MassBalance->GetMass();
466 Auxiliary->in.Tl2b = Propagate->GetTl2b();
467 Auxiliary->in.Tb2l = Propagate->GetTb2l();
468 Auxiliary->in.vPQR = Propagate->GetPQR();
469 Auxiliary->in.vPQRi = Propagate->GetPQRi();
470 Auxiliary->in.vPQRidot = Accelerations->GetPQRidot();
471 Auxiliary->in.vUVW = Propagate->GetUVW();
472 Auxiliary->in.vUVWdot = Accelerations->GetUVWdot();
473 Auxiliary->in.vVel = Propagate->GetVel();
474 Auxiliary->in.vBodyAccel = Accelerations->GetBodyAccel();
475 Auxiliary->in.ToEyePt = MassBalance->StructuralToBody(Aircraft->GetXYZep());
476 Auxiliary->in.VRPBody = MassBalance->StructuralToBody(Aircraft->GetXYZvrp());
477 Auxiliary->in.RPBody = MassBalance->StructuralToBody(Aircraft->GetXYZrp());
478 Auxiliary->in.vFw = Aerodynamics->GetvFw();
479 Auxiliary->in.vLocation = Propagate->GetLocation();
480 Auxiliary->in.CosTht = Propagate->GetCosEuler(eTht);
481 Auxiliary->in.SinTht = Propagate->GetSinEuler(eTht);
482 Auxiliary->in.CosPhi = Propagate->GetCosEuler(ePhi);
483 Auxiliary->in.SinPhi = Propagate->GetSinEuler(ePhi);
484 Auxiliary->in.TotalWindNED = Winds->GetTotalWindNED();
485 Auxiliary->in.TurbPQR = Winds->GetTurbPQR();
486 break;
487 case eSystems:
488 // Dynamic inputs come into the components that FCS manages through properties
489 break;

Callers

nothing calls this directly

Calls 15

GetPQRidotMethod · 0.80
GetUVWidotMethod · 0.80
GetAltitudeASLMethod · 0.80
GetDistanceAGLMethod · 0.80
GetRateMethod · 0.80
GetDensityMethod · 0.80
GetSoundSpeedMethod · 0.80
GetUVWdotMethod · 0.80
GetBodyAccelMethod · 0.80
StructuralToBodyMethod · 0.80
GetTotalWindNEDMethod · 0.80
GetTurbPQRMethod · 0.80

Tested by

no test coverage detected