Beispiel #1
0
 private static void UpdateADI(IADI adi, HsiBits hsibits)
 {
     adi.InstrumentState.OffFlag        = ((hsibits & HsiBits.ADI_OFF) == HsiBits.ADI_OFF);
     adi.InstrumentState.AuxFlag        = ((hsibits & HsiBits.ADI_AUX) == HsiBits.ADI_AUX);
     adi.InstrumentState.GlideslopeFlag = ((hsibits & HsiBits.ADI_GS) == HsiBits.ADI_GS);
     adi.InstrumentState.LocalizerFlag  = ((hsibits & HsiBits.ADI_LOC) == HsiBits.ADI_LOC);
 }
Beispiel #2
0
 private static void SetADIToOffState(IADI adi)
 {
     adi.InstrumentState.PitchDegrees = 0;
     adi.InstrumentState.RollDegrees  = 0;
     adi.InstrumentState.GlideslopeDeviationDegrees = 0;
     adi.InstrumentState.LocalizerDeviationDegrees  = 0;
     adi.InstrumentState.ShowCommandBars            = false;
 }
Beispiel #3
0
        private static void UpdateNavigationMode(IHorizontalSituationIndicator hsi, IEHSI ehsi, IADI adi, IISIS isis, FlightData flightData)
        {
            /*
             *  This value is called navMode and is unsigned char type with 4 possible values: ILS_TACAN = 0, and TACAN = 1,
             *  NAV = 2, ILS_NAV = 3
             */

            byte bmsNavMode = flightData.navMode;

            switch (bmsNavMode)
            {
            case 0:     //NavModes.PlsTcn:
                hsi.InstrumentState.ShowToFromFlag  = false;
                ehsi.InstrumentState.ShowToFromFlag = false;
                ehsi.InstrumentState.InstrumentMode = InstrumentModes.PlsTacan;
                break;

            case 1:     //NavModes.Tcn:
                hsi.InstrumentState.ShowToFromFlag   = true;
                ehsi.InstrumentState.ShowToFromFlag  = true;
                ehsi.InstrumentState.InstrumentMode  = InstrumentModes.Tacan;
                adi.InstrumentState.ShowCommandBars  = false;
                isis.InstrumentState.ShowCommandBars = false;
                break;

            case 2:     //NavModes.Nav:
                hsi.InstrumentState.ShowToFromFlag   = false;
                ehsi.InstrumentState.ShowToFromFlag  = false;
                ehsi.InstrumentState.InstrumentMode  = InstrumentModes.Nav;
                adi.InstrumentState.ShowCommandBars  = false;
                isis.InstrumentState.ShowCommandBars = false;
                break;

            case 3:     //NavModes.PlsNav:
                hsi.InstrumentState.ShowToFromFlag  = false;
                ehsi.InstrumentState.ShowToFromFlag = false;
                ehsi.InstrumentState.InstrumentMode = InstrumentModes.PlsNav;
                break;
            }
        }
Beispiel #4
0
 private static void SetADIPitchAndRoll(IADI adi, FlightData flightData)
 {
     adi.InstrumentState.PitchDegrees = ((flightData.pitch / Common.Math.Constants.RADIANS_PER_DEGREE));
     adi.InstrumentState.RollDegrees  = ((flightData.roll / Common.Math.Constants.RADIANS_PER_DEGREE));
 }