15         DrawTextW(msg, 5, yy, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    19         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    22         PROCESS_MEMORY_COUNTERS pmc;
    23         GetProcessMemoryInfo(GetCurrentProcess(), &pmc, 
sizeof(pmc));
    24         swprintf_s(msg, 99, L
"Memory used: %i kB", pmc.WorkingSetSize / 1024);
    25         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    28         Nullable<float> avionicsBayTemp = 
bus->GetComponentStateFloat(
"721D4FC2-F13E-47B3-9A21-B7FE9A1C677C");
    29         if (avionicsBayTemp.
is_set())
    30                 swprintf_s(msg, 99, L
"AvionicsBayTemp: %.1f°C (%.1f°F)", avionicsBayTemp.
get(), avionicsBayTemp.
get() * 9.0f / 5.0f + 32.0f);
    32                 swprintf_s(msg, 99, L
"AvionicsBayTemp: NO SIGNAL");
    33         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    35         Nullable<float> pneumaticPressure = 
bus->GetComponentStateFloat(
"0E1C068F-F901-4C1A-AC12-10F53E894579");
    36         if (pneumaticPressure.
is_set())
    37                 swprintf_s(msg, 99, L
"pneumaticPressure: %.1f PSI", pneumaticPressure.
get());
    39                 swprintf_s(msg, 99, L
"pneumaticPressure: NO SIGNAL");
    40         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    43         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    45         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    50         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    54         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    58         DrawText(msg, 966, 706, DT_NOCLIP, D3DXCOLOR(0.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    64         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    68         static float oldhdg = 0.0f;
    70         if (_yaw < -D3DX_PI) _yaw += D3DX_PI*2.0f;
    71         if (_yaw > D3DX_PI) _yaw -= D3DX_PI*2.0f;
    77         float desiredyaw = 0.0f;
    80         float yawcorr = desiredyaw - _yaw; 
    82         float dampen = yawcorr / 0.05235987756f; 
    83         if (dampen > 0.3f) dampen = 0.3f;
    84         if (dampen < -0.3f) dampen = -0.3f;
    85         swprintf_s(msg, 99, L
"Yaw correction: %.1f", dampen);
    86         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    90         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    93         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
    96         Nullable<float> sunrise = 
bus->GetComponentStateFloat(
"AAE97FDE-1AEB-4E21-8D66-29D55F500D61");
    98                 swprintf_s(msg, 99, L
"Sunrise: %02i:%02i AM", static_cast<int>(floorf(sunrise.
get())), 
static_cast<int>(fmodf(sunrise.
get(), 1.0f)*60.0f));
   100                 swprintf_s(msg, 99, L
"Sunrise: NO SIGNAL");
   101         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
   103         Nullable<float> sunset = 
bus->GetComponentStateFloat(
"1EC47487-BCA5-4CD4-8E20-494D490906B0");
   105                 swprintf_s(msg, 99, L
"Sunset: %02i:%02i PM", static_cast<int>(floorf(sunset.
get())), 
static_cast<int>(fmodf(sunset.
get(), 1.0f)*60.0f));
   107                 swprintf_s(msg, 99, L
"Sunset: NO SIGNAL");
   108         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
   112         static float peak = 0.0f;
   113         Nullable<float> vibrationMils = 
bus->GetComponentStateFloat(
"D259893C-95EA-419C-90F3-17EB20320A9C");
   114         if (vibrationMils.
is_set())
   116                 if (fabsf(vibrationMils.
get()) > peak)
   117                         peak = fabsf(vibrationMils.
get());
   118                 swprintf_s(msg, 99, L
"Vibration (Mils): %.2f (Peak %.2f)", vibrationMils.
get(), peak);
   121                 swprintf_s(msg, 99, L
"Vibration (Mils): NO SIGNAL");
   122         DrawText(msg, 5, yy += 24, DT_NOCLIP, D3DXCOLOR(1.0f, 1.0f, 0.0f, 1.0f), 0, 
"Diagnostics");
 float EngineThrustCommand[enginesC]
(57) Thrust command (when an information source is installed); 
 
double PlatformFrontRightBellow
 
void DrawText(const WCHAR *str, int x, int y, int flags, D3DXCOLOR color, int font, std::string elementName)
 
std::vector< Command > commandStream
 
double PlatformFrontLeftBellow
 
float IndicatedAirspeed
(3) Indicated Airspeed in km per second? 
 
float PitchAttitude
(6) Pitch attitude; 
 
float HeadingTrue
(4) Heading–primary flight crew reference (if selectable, record discrete, true or magnetic); ...
 
float RollAttitude
(7) Roll attitude; 
 
Abstract base class for instrumentation By definition, instruments don't do any of the work (they don...
 
Diagnostics(int prmX, int prmY, float prmXScale, float prmYScale)
 
void Render(float fElapsed) override
 
double PlatformBackLeftBellow
 
D3DXVECTOR3 PlatformAcceleration
 
double PlatformBackRightBellow
 
float GlideslopeDeviation