Example #1
0
        public IAS()
            : base("IAS", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 555.55d, 720d);
            _needleCalibration.Add(new CalibrationPointDouble(83.33d, 108d));
            _needleCalibration.Add(new CalibrationPointDouble(166.67d, 216d));
            _needleCalibration.Add(new CalibrationPointDouble(250d, 324d));
            _needleCalibration.Add(new CalibrationPointDouble(333.34d, 432d));
            _needleCalibration.Add(new CalibrationPointDouble(416.67d, 540d));

            _backCalibration = new CalibrationPointCollectionDouble(0d, 0d, 555.55d, 90d);
            _backCalibration.Add(new CalibrationPointDouble(277, 90d));
            _backCalibration.Add(new CalibrationPointDouble(270, 0d));
            _currentBack = new GaugeNeedle("{Helios}/Gauges/MiG-21/IAS/ias_back.xaml", center, new Size(340, 340), center, -90);
            Components.Add(_currentBack);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/IAS/ias_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/generic_needle.xaml", center, new Size(32, 185), new Point(16, 127));
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentIas          = new HeliosValue(this, BindingValue.Empty, "", "IAS", "Current IAS", "", BindingValueUnits.Numeric);
            _currentIas.Execute += CurrentIas_Execute;
            _currentIas.Execute += CurrentBack_Execute;
            Actions.Add(_currentIas);
        }
Example #2
0
        public Airspeed()
            : base("Airspeed", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Airspeed/asi_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _machCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1.9d, 270d);
            _machCalibration.Add(new CalibrationPointDouble(0.5d, 60d));

            _machRing = new GaugeNeedle("{Helios}/Gauges/F-16/Airspeed/asi_inner_faceplate.xaml", new Point(182d, 188d), new Size(188d, 188d), new Point(94d, 94d), -90d);
            Components.Add(_machRing);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 850d, 350d);
            _needleCalibration.Add(new CalibrationPointDouble(200d, 135d));
            _needleCalibration.Add(new CalibrationPointDouble(300d, 195d));
            _needleCalibration.Add(new CalibrationPointDouble(400d, 235d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 267d));

            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/Airspeed/asi_needle.xaml", new Point(182d, 188d), new Size(300d, 300d), new Point(150d, 150d), -90d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _airspeed = new HeliosValue(this, new BindingValue(0d), "", "indicated air speed", "Current airspeed of the aricraft.", "", BindingValueUnits.Knots);
            _airspeed.Execute += new HeliosActionHandler(Airspeed_Execute);
            Actions.Add(_airspeed);

            _mach = new HeliosValue(this, new BindingValue(0d), "", "mach", "Current airspeed of the aricraft.", "", BindingValueUnits.Numeric);
            _mach.Execute += new HeliosActionHandler(Mach_Execute);
            Actions.Add(_mach);
        }
Example #3
0
        public TAS()
            : base("TAS", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleTasCalibration = new CalibrationPointCollectionDouble(167d, 0d, 833d, 335d);
            _needleTasCalibration.Add(new CalibrationPointDouble(278d, 46d));
            _needleTasCalibration.Add(new CalibrationPointDouble(417d, 127d));
            _needleTasCalibration.Add(new CalibrationPointDouble(555d, 207d));

            _needleMCalibration = new CalibrationPointCollectionDouble(0.0d, 0d, 3.0d, 335d);
            _needleMCalibration.Add(new CalibrationPointDouble(0.6d, 0d));
            _needleMCalibration.Add(new CalibrationPointDouble(1d, 56d));
            _needleMCalibration.Add(new CalibrationPointDouble(1.8d, 167d));
            _needleTasCalibration.Add(new CalibrationPointDouble(2.0d, 223d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/TAS/tas_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentTasNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/TAS/tas_needle.xaml", center, new Size(24, 135), new Point(12, 127), 11d);
            Components.Add(_currentTasNeedle);

            _currentMNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/TAS/m_needle.xaml", center, new Size(32, 185), new Point(16, 127), 11d);
            Components.Add(_currentMNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentTAS          = new HeliosValue(this, BindingValue.Empty, "", "TAS", "Current TAS", "", BindingValueUnits.Numeric);
            _currentTAS.Execute += CurrentTas_Execute;
            Actions.Add(_currentTAS);

            _currentM          = new HeliosValue(this, BindingValue.Empty, "", "M", "Current M", "", BindingValueUnits.Numeric);
            _currentM.Execute += CurrentM_Execute;
            Actions.Add(_currentM);
        }
Example #4
0
        public O2Level()
            : base("O2Level", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0, 0d, 150d, 158d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 4d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 47.8d));
            _needleCalibration.Add(new CalibrationPointDouble(100d, 103d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/O2Level/o2_level_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/small_needle.xaml", center, new Size(23, 164), new Point(11.5, 127), 277.5d);
            Components.Add(_currentNeedle);

            _lLungImage = new GaugeImage("{Helios}/Gauges/Mig-21/O2Level/o2_level_blinker_l.xaml", new Rect(136, 194, 25, 63.9));
            Components.Add(_lLungImage);

            _rLungImage = new GaugeImage("{Helios}/Gauges/Mig-21/O2Level/o2_level_blinker_r.xaml", new Rect(180, 194, 25, 63.9));
            Components.Add(_rLungImage);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentO2Level = new HeliosValue(this, BindingValue.Empty, "", "O2 Level", "Current O2 Level", "", BindingValueUnits.Numeric);
            _currentO2Level.Execute += CurrentO2Level_Execute;
            Actions.Add(_currentO2Level);

            _lLungFlag = new HeliosValue(this, new BindingValue(false), "", "Lung Blinkers", "White when working", "True if displayed.", BindingValueUnits.Boolean);
            _lLungFlag.Execute += LFlags_Execute;
            Actions.Add(_lLungFlag);
        }
Example #5
0
        public O2Level()
            : base("O2Level", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0, 0d, 150d, 158d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 4d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 47.8d));
            _needleCalibration.Add(new CalibrationPointDouble(100d, 103d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/O2Level/o2_level_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/small_needle.xaml", center, new Size(23, 164), new Point(11.5, 127), 277.5d);
            Components.Add(_currentNeedle);

            _lLungImage = new GaugeImage("{Helios}/Gauges/MiG-21/O2Level/o2_level_blinker_l.xaml", new Rect(136, 194, 25, 63.9));
            Components.Add(_lLungImage);

            _rLungImage = new GaugeImage("{Helios}/Gauges/MiG-21/O2Level/o2_level_blinker_r.xaml", new Rect(180, 194, 25, 63.9));
            Components.Add(_rLungImage);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentO2Level          = new HeliosValue(this, BindingValue.Empty, "", "O2 Level", "Current O2 Level", "", BindingValueUnits.Numeric);
            _currentO2Level.Execute += CurrentO2Level_Execute;
            Actions.Add(_currentO2Level);

            _lLungFlag          = new HeliosValue(this, new BindingValue(false), "", "Lung Blinkers", "White when working", "True if displayed.", BindingValueUnits.Boolean);
            _lLungFlag.Execute += LFlags_Execute;
            Actions.Add(_lLungFlag);
        }
Example #6
0
        public IAS()
            : base("IAS", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 555.55d, 720d);
            _needleCalibration.Add(new CalibrationPointDouble(83.33d, 108d));
            _needleCalibration.Add(new CalibrationPointDouble(166.67d, 216d));
            _needleCalibration.Add(new CalibrationPointDouble(250d, 324d));
            _needleCalibration.Add(new CalibrationPointDouble(333.34d, 432d));
            _needleCalibration.Add(new CalibrationPointDouble(416.67d, 540d));

            _backCalibration = new CalibrationPointCollectionDouble(0d, 0d, 555.55d, 90d);
            _backCalibration.Add(new CalibrationPointDouble(277, 90d));
            _backCalibration.Add(new CalibrationPointDouble(270, 0d));
            _currentBack = new GaugeNeedle("{Helios}/Gauges/Mig-21/IAS/ias_back.xaml", center, new Size(340, 340), center, -90);
            Components.Add(_currentBack);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/IAS/ias_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_needle.xaml", center, new Size(32, 185), new Point(16, 127));
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentIas = new HeliosValue(this, BindingValue.Empty, "", "IAS", "Current IAS", "", BindingValueUnits.Numeric);
            _currentIas.Execute += CurrentIas_Execute;
            _currentIas.Execute += CurrentBack_Execute;
            Actions.Add(_currentIas);

        }
Example #7
0
        public Airspeed()
            : base("Airspeed", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Airspeed/asi_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _machCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1.9d, 270d);
            _machCalibration.Add(new CalibrationPointDouble(0.5d, 60d));

            _machRing = new GaugeNeedle("{Helios}/Gauges/F-16/Airspeed/asi_inner_faceplate.xaml", new Point(182d, 188d), new Size(188d, 188d), new Point(94d, 94d), -90d);
            Components.Add(_machRing);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 850d, 350d);
            _needleCalibration.Add(new CalibrationPointDouble(200d, 135d));
            _needleCalibration.Add(new CalibrationPointDouble(300d, 195d));
            _needleCalibration.Add(new CalibrationPointDouble(400d, 235d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 267d));

            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/Airspeed/asi_needle.xaml", new Point(182d, 188d), new Size(300d, 300d), new Point(150d, 150d), -90d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _airspeed          = new HeliosValue(this, new BindingValue(0d), "", "indicated air speed", "Current airspeed of the aricraft.", "", BindingValueUnits.Knots);
            _airspeed.Execute += new HeliosActionHandler(Airspeed_Execute);
            Actions.Add(_airspeed);

            _mach          = new HeliosValue(this, new BindingValue(0d), "", "mach", "Current airspeed of the aricraft.", "", BindingValueUnits.Numeric);
            _mach.Execute += new HeliosActionHandler(Mach_Execute);
            Actions.Add(_mach);
        }
Example #8
0
        public EngingeRpm()
            : base("EngingeRpm", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 110d, 344.5d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 315d));

            _needleCalibration1 = new CalibrationPointCollectionDouble(0d, 0d, 110d, 344.5d);
            _needleCalibration1.Add(new CalibrationPointDouble(25d, 6d));  
            _needleCalibration1.Add(new CalibrationPointDouble(65d, 158d));  
            _needleCalibration1.Add(new CalibrationPointDouble(92d, 281d));   
            _needleCalibration1.Add(new CalibrationPointDouble(100d, 318d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _twoNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_needle2.xaml", center, new Size(32, 185), new Point(16, 127), 44);
            Components.Add(_twoNeedle);

            _oneNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_needle1.xaml", center, new Size(32, 185), new Point(16, 127), 44);
            Components.Add(_oneNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngineRpm/enginerpm_bezel.xaml", new Rect(0, 0, 340, 340)));

            _oneE = new HeliosValue(this, BindingValue.Empty, "", "rpm1", "Engine rpm 1", "", BindingValueUnits.Numeric);
            _oneE.Execute += OneEng_Execute;
            Actions.Add(_oneE);

            _twoE = new HeliosValue(this, BindingValue.Empty, "", "rpm2", "Engine rpm 2", "", BindingValueUnits.Numeric);
            _twoE.Execute += TwoEng_Execute;
            Actions.Add(_twoE);

        }
Example #9
0
        public TAS()
            : base("TAS", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleTasCalibration = new CalibrationPointCollectionDouble(167d, 0d, 833d, 335d);
            _needleTasCalibration.Add(new CalibrationPointDouble(278d, 46d));  
            _needleTasCalibration.Add(new CalibrationPointDouble(417d, 127d)); 
            _needleTasCalibration.Add(new CalibrationPointDouble(555d, 207d));

            _needleMCalibration = new CalibrationPointCollectionDouble(0.0d, 0d, 3.0d, 335d);
            _needleMCalibration.Add(new CalibrationPointDouble(0.6d, 0d));
            _needleMCalibration.Add(new CalibrationPointDouble(1d, 56d));
            _needleMCalibration.Add(new CalibrationPointDouble(1.8d, 167d));
            _needleTasCalibration.Add(new CalibrationPointDouble(2.0d, 223d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/TAS/tas_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentTasNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/TAS/tas_needle.xaml", center, new Size(24, 135), new Point(12, 127), 11d);
            Components.Add(_currentTasNeedle);

            _currentMNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/TAS/m_needle.xaml", center, new Size(32, 185), new Point(16, 127), 11d);
            Components.Add(_currentMNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentTAS = new HeliosValue(this, BindingValue.Empty, "", "TAS", "Current TAS", "", BindingValueUnits.Numeric);
            _currentTAS.Execute += CurrentTas_Execute;
            Actions.Add(_currentTAS);

            _currentM = new HeliosValue(this, BindingValue.Empty, "", "M", "Current M", "", BindingValueUnits.Numeric);
            _currentM.Execute += CurrentM_Execute;
            Actions.Add(_currentM);
        }
Example #10
0
        public EngingeRpm()
            : base("EngingeRpm", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 110d, 344.5d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 315d));

            _needleCalibration1 = new CalibrationPointCollectionDouble(0d, 0d, 110d, 344.5d);
            _needleCalibration1.Add(new CalibrationPointDouble(25d, 6d));
            _needleCalibration1.Add(new CalibrationPointDouble(65d, 158d));
            _needleCalibration1.Add(new CalibrationPointDouble(92d, 281d));
            _needleCalibration1.Add(new CalibrationPointDouble(100d, 318d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/EngineRpm/enginerpm_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _twoNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/EngineRpm/enginerpm_needle2.xaml", center, new Size(32, 185), new Point(16, 127), 44);
            Components.Add(_twoNeedle);

            _oneNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/EngineRpm/enginerpm_needle1.xaml", center, new Size(32, 185), new Point(16, 127), 44);
            Components.Add(_oneNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/EngineRpm/enginerpm_bezel.xaml", new Rect(0, 0, 340, 340)));

            _oneE          = new HeliosValue(this, BindingValue.Empty, "", "rpm1", "Engine rpm 1", "", BindingValueUnits.Numeric);
            _oneE.Execute += OneEng_Execute;
            Actions.Add(_oneE);

            _twoE          = new HeliosValue(this, BindingValue.Empty, "", "rpm2", "Engine rpm 2", "", BindingValueUnits.Numeric);
            _twoE.Execute += TwoEng_Execute;
            Actions.Add(_twoE);
        }
Example #11
0
        public VVI1()
            : base("Flight Instruments", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/VVI/vvi_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/Common/needle_a.xaml", new Point(182d, 188d), new Size(22, 165), new Point(11, 130), -90d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));
            //Components.Add(new GaugeImage("{AV-8B}/Images/WQHD/Panel/crystal_reflection_round.png", new Rect(32d, 38d, 300d, 300d)));
            GaugeImage _gauge = new GaugeImage("{AV-8B}/Images/WQHD/Panel/crystal_reflection_round.png", new Rect(32d, 38d, 300d, 300d));

            _gauge.Opacity = 0.4;
            Components.Add(_gauge);

            _verticalVelocity          = new HeliosValue(this, new BindingValue(0d), "Flight Instruments", "vertical velocity", "Veritcal velocity of the aircraft", "(-6,000 to 6,000)", BindingValueUnits.FeetPerMinute);
            _verticalVelocity.Execute += new HeliosActionHandler(VerticalVelocity_Execute);
            Actions.Add(_verticalVelocity);

            _calibrationPoints = new CalibrationPointCollectionDouble(-6000d, -169d, 6000d, 169d);
            _calibrationPoints.Add(new CalibrationPointDouble(-2000d, -81d));
            _calibrationPoints.Add(new CalibrationPointDouble(-1000d, -45d));
            _calibrationPoints.Add(new CalibrationPointDouble(0d, 0d));
            _calibrationPoints.Add(new CalibrationPointDouble(1000d, 45d));
            _calibrationPoints.Add(new CalibrationPointDouble(2000d, 81d));
        }
Example #12
0
        public O2Pressure()
            : base("O2Pressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0, 0d, 20d, 277d);
            _needleCalibration.Add(new CalibrationPointDouble(2d, 30d));
            _needleCalibration.Add(new CalibrationPointDouble(4d, 58d));
            _needleCalibration.Add(new CalibrationPointDouble(6d, 86d));
            _needleCalibration.Add(new CalibrationPointDouble(8d, 115d));
            _needleCalibration.Add(new CalibrationPointDouble(10d, 137.9d));
            _needleCalibration.Add(new CalibrationPointDouble(12d, 160.7d));
            _needleCalibration.Add(new CalibrationPointDouble(14d, 189d));
            _needleCalibration.Add(new CalibrationPointDouble(16d, 210.1d));
            _needleCalibration.Add(new CalibrationPointDouble(18d, 245d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/O2Pressure/o2_pressure_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/small_needle.xaml", center, new Size(23, 164), new Point(11.5, 127), 222d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentO2Pressure          = new HeliosValue(this, BindingValue.Empty, "", "Current O2 Pressure", "Current O2 Pressure", "", BindingValueUnits.Numeric);
            _currentO2Pressure.Execute += CurrentO2Pressure_Execute;
            Actions.Add(_currentO2Pressure);
        }
Example #13
0
        public O2Pressure()
            : base("O2Pressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0, 0d, 20d, 277d);
            _needleCalibration.Add(new CalibrationPointDouble(2d, 30d));
            _needleCalibration.Add(new CalibrationPointDouble(4d, 58d));
            _needleCalibration.Add(new CalibrationPointDouble(6d, 86d));
            _needleCalibration.Add(new CalibrationPointDouble(8d, 115d));
            _needleCalibration.Add(new CalibrationPointDouble(10d, 137.9d));
            _needleCalibration.Add(new CalibrationPointDouble(12d, 160.7d));
            _needleCalibration.Add(new CalibrationPointDouble(14d, 189d));
            _needleCalibration.Add(new CalibrationPointDouble(16d, 210.1d));
            _needleCalibration.Add(new CalibrationPointDouble(18d, 245d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/O2Pressure/o2_pressure_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/small_needle.xaml", center, new Size(23, 164), new Point(11.5, 127), 222d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentO2Pressure = new HeliosValue(this, BindingValue.Empty, "", "Current O2 Pressure", "Current O2 Pressure", "", BindingValueUnits.Numeric);
            _currentO2Pressure.Execute += CurrentO2Pressure_Execute;
            Actions.Add(_currentO2Pressure);
        }
Example #14
0
        public BatteryCapacity()
            : base("BatteryCapacity", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 100d, 300d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 36d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 66d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 96d));
            _needleCalibration.Add(new CalibrationPointDouble(40d, 126d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 156d));
            _needleCalibration.Add(new CalibrationPointDouble(60d, 186d));
            _needleCalibration.Add(new CalibrationPointDouble(70d, 216d));
            _needleCalibration.Add(new CalibrationPointDouble(80d, 246d));
            _needleCalibration.Add(new CalibrationPointDouble(90d, 276d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/BatteryCapacity/battery_capacity_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_small_gray_needle.xaml", center, new Size(32, 185), new Point(16, 127), 210d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentBatteryCapacity = new HeliosValue(this, BindingValue.Empty, "", "Current Battery Capacity", "Current Battery Capacity", "", BindingValueUnits.Numeric);
            _currentBatteryCapacity.Execute += CurrentBatteryCapacity_Execute;
            Actions.Add(_currentBatteryCapacity);
        }
Example #15
0
        public BatteryCapacity()
            : base("BatteryCapacity", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 100d, 300d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 36d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 66d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 96d));
            _needleCalibration.Add(new CalibrationPointDouble(40d, 126d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 156d));
            _needleCalibration.Add(new CalibrationPointDouble(60d, 186d));
            _needleCalibration.Add(new CalibrationPointDouble(70d, 216d));
            _needleCalibration.Add(new CalibrationPointDouble(80d, 246d));
            _needleCalibration.Add(new CalibrationPointDouble(90d, 276d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/BatteryCapacity/battery_capacity_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/generic_small_gray_needle.xaml", center, new Size(32, 185), new Point(16, 127), 210d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentBatteryCapacity          = new HeliosValue(this, BindingValue.Empty, "", "Current Battery Capacity", "Current Battery Capacity", "", BindingValueUnits.Numeric);
            _currentBatteryCapacity.Execute += CurrentBatteryCapacity_Execute;
            Actions.Add(_currentBatteryCapacity);
        }
Example #16
0
        public EngExhaustTempGauge()
            : base("EngExhaustTempGauge", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(300d, 0d, 900d, 231d);
            _needleCalibration.Add(new CalibrationPointDouble(400d, 29d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 59));
            _needleCalibration.Add(new CalibrationPointDouble(600d, 88d));
            _needleCalibration.Add(new CalibrationPointDouble(650d, 118d));
            _needleCalibration.Add(new CalibrationPointDouble(700d, 148d));
            _needleCalibration.Add(new CalibrationPointDouble(750d, 177d));
            _needleCalibration.Add(new CalibrationPointDouble(800d, 206d));
            _needleCalibration.Add(new CalibrationPointDouble(850d, 218d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/EngExhaustTemp/EngExhaustTemp_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/EngExhaustTemp/EngExhaustTemp_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), 242d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/EngExhaustTemp/EngExhaustTemp_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentTemp          = new HeliosValue(this, BindingValue.Empty, "", "Engine Exhaust", "Current Temp", "", BindingValueUnits.Numeric);
            _currentTemp.Execute += CurrentFuel_Execute;
            Actions.Add(_currentTemp);
        }
Example #17
0
        public EngExhaustTempGauge()
            : base("EngExhaustTempGauge", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(300d, 0d, 900d, 231d);
            _needleCalibration.Add(new CalibrationPointDouble(400d, 29d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 59));
            _needleCalibration.Add(new CalibrationPointDouble(600d, 88d));
            _needleCalibration.Add(new CalibrationPointDouble(650d, 118d));
            _needleCalibration.Add(new CalibrationPointDouble(700d, 148d));
            _needleCalibration.Add(new CalibrationPointDouble(750d, 177d));
            _needleCalibration.Add(new CalibrationPointDouble(800d, 206d));
            _needleCalibration.Add(new CalibrationPointDouble(850d, 218d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngExhaustTemp/EngExhaustTemp_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/EngExhaustTemp/EngExhaustTemp_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), 242d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngExhaustTemp/EngExhaustTemp_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentTemp = new HeliosValue(this, BindingValue.Empty, "", "Engine Exhaust", "Current Temp", "", BindingValueUnits.Numeric);
            _currentTemp.Execute += CurrentFuel_Execute;
            Actions.Add(_currentTemp);
        }
Example #18
0
        public RotarySwitch()
            : base("Rotary Switch", new Size(100, 100))
        {
            _swipeCalibration = new CalibrationPointCollectionDouble(-1d, 2d, 1d, 0.5d);
            _swipeCalibration.Add(new CalibrationPointDouble(0.0d, 1d));

            _labelFormat.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(LabelFormat_PropertyChanged);

            _positionValue          = new HeliosValue(this, new BindingValue(1), "", "position", "Current position of the switch.", "", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _positionNameValue = new HeliosValue(this, new BindingValue("0"), "", "position name", "Name of the current position of the switch.", "", BindingValueUnits.Text);
            Values.Add(_positionNameValue);
            Triggers.Add(_positionNameValue);

            _positions.CollectionChanged += new NotifyCollectionChangedEventHandler(Positions_CollectionChanged);
            _positions.PositionChanged   += new EventHandler <RotarySwitchPositionChangeArgs>(PositionChanged);
            _positions.Add(new RotarySwitchPosition(this, 1, "0", 0d));
            _positions.Add(new RotarySwitchPosition(this, 2, "1", 90d));
            _currentPosition = 1;
            _defaultPosition = 1;
        }
Example #19
0
        public RotarySwitch()
            : base("Rotary Switch", new Size(100, 100))
        {
            _swipeCalibration = new CalibrationPointCollectionDouble(-1d, 2d, 1d, 0.5d);
            _swipeCalibration.Add(new CalibrationPointDouble(0.0d, 1d));

            _labelFormat.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(LabelFormat_PropertyChanged);

            _positionValue = new HeliosValue(this, new BindingValue(1), "", "position", "Current position of the switch.", "", BindingValueUnits.Numeric);
            _positionValue.Execute += new HeliosActionHandler(SetPositionAction_Execute);
            Values.Add(_positionValue);
            Actions.Add(_positionValue);
            Triggers.Add(_positionValue);

            _positionNameValue = new HeliosValue(this, new BindingValue("0"), "", "position name", "Name of the current position of the switch.", "", BindingValueUnits.Text);
            Values.Add(_positionNameValue);
            Triggers.Add(_positionNameValue);

            _positions.CollectionChanged += new NotifyCollectionChangedEventHandler(Positions_CollectionChanged);
            _positions.PositionChanged += new EventHandler<RotarySwitchPositionChangeArgs>(PositionChanged);
            _positions.Add(new RotarySwitchPosition(this, 1, "0", 0d));
            _positions.Add(new RotarySwitchPosition(this, 2, "1", 90d));
            _currentPosition = 1;
            _defaultPosition = 1;
        }
Example #20
0
        public IAS()
            : base("IAS", new Size(364, 376))
        {
            //Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/IAS/ias_faceplate.xaml", new Rect(32d, 38d, 300, 300)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 950d, 350d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 18d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 180d));
            _needle = new GaugeNeedle("{Helios}/Gauges/AV-8B/Common/needle_a.xaml", new Point(182d, 188d), new Size(44, 165), new Point(22, 130), 0d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _indicatedAirSpeed          = new HeliosValue(this, new BindingValue(0d), "", "indicated airspeed", "Current indicated airspeed of the aircraft.", "(0 - 950)", BindingValueUnits.Knots);
            _indicatedAirSpeed.Execute += new HeliosActionHandler(IndicatedAirSpeed_Execute);
            Actions.Add(_indicatedAirSpeed);
        }
Example #21
0
        public BrakePressure()
            : base("Brake Pressue Gauge", new Size(280, 280))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/BrakePressure/Brake_Pressure_Faceplate.png", new Rect(0d, 0d, 280d, 280d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1d, 80d);
            _needleCalibration.Add(new CalibrationPointDouble(0.036d, 10d));
            _needleCalibration.Add(new CalibrationPointDouble(0.338d, 30d));
            _needleCalibration.Add(new CalibrationPointDouble(0.636d, 50d));
            _needleCalibration.Add(new CalibrationPointDouble(0.924d, 70d));
            _needle = new GaugeNeedle("{Helios}/Gauges/AV-8B/Common/needle_a.xaml", new Point(140d, 220d), new Size(36, 154), new Point(18, 136), -40d);
            Components.Add(_needle);
            Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/BrakePressure/Brake_Pressure_Cover.png", new Rect(29d, 182d, 226d, 98d)));

            _brakePressure          = new HeliosValue(this, new BindingValue(0d), "", "Brake Pressue", "Brake Pressure in PSI.", "", BindingValueUnits.PoundsPerSquareInch);
            _brakePressure.Execute += new HeliosActionHandler(brakePressure_Execute);
            Actions.Add(_brakePressure);
        }
Example #22
0
        // Base construcor is passed default name and native size
        public AOA()
            : base("Angle of Attack", new Size(300, 300))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/Common/300_Gauge.xaml", new Rect(0d, 0d, 300d, 300d)));

            // Components contains all artifacts that are used to draw the gauge, they are drawn in the order they are added to the collection.
            _warningFlagNeedle = new GaugeNeedle("{Helios}/Gauges/AV-8B/AOA/aoa_off_flag.xaml", new Point(20d, 248d), new Size(70d, 90d), new Point(0d, 178d), 0d);
            Components.Add(_warningFlagNeedle);
            // Add faceplate image to drawing components
            // Source image file (xaml will be vector rendered to appropriate size)
            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/AOA/aoa_faceplate.xaml", new Rect(0d, 0d, 300d, 300d)));
            // Rectangle inside gauge where image will be drawn (scaled automatically to fit rectangle)
            //new Rect(32d, 38d, 300d, 300d)));

            // Create needle calibration scale which will be used to represent 0 degrees rotation for 0 input and 270 degrees rotation when input is 30.
            _needleCalibration = new CalibrationPointCollectionDouble(-5d, -36d, 20d, 146d);
            _needleCalibration.Add(new CalibrationPointDouble(0d, 0d));

            // Add needle to drawing components
            // Source image file (xaml will be vector rendered to appropriate size)
            _needle = new GaugeNeedle("{Helios}/Gauges/AV-8B/Common/needle_a.xaml",
                                      // Location on gauge which the needle will be rotated
                                      new Point(150d, 150d),
                                      // Size of needle image (will scale image to this size automatically)
                                      new Size(30d, 128d),
                                      // Center point of needle image to rotate around
                                      new Point(15d, 113d),
                                      // Initial rotation for this needle
                                      173d);
            Components.Add(_needle);
            _warningFlag          = new HeliosValue(this, new BindingValue(false), "", "Warning Flag", "Indicates whether the warning flag is displayed.", "True if displayed.", BindingValueUnits.Boolean);
            _warningFlag.Execute += new HeliosActionHandler(OffFlag_Execute);
            Actions.Add(_warningFlag);
            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            // Create Angle of Attack value holder
            // Owning Object
            _aoa = new HeliosValue(this,
                                   // Default Value
                                   new BindingValue(0d),
                                   // Device Hint
                                   "",
                                   // Name
                                   "angle of attack",
                                   // Description
                                   "Current angle of attack of the aircraft.",
                                   // Value Description
                                   "(-5 to 20)",
                                   // Value Unit of Measure
                                   BindingValueUnits.Degrees);
            // Hook event callback for when the Angle of Attack value is updated
            _aoa.Execute += new HeliosActionHandler(AOA_Execute);

            // Add angle of attack value into possible action list for bindings
            Actions.Add(_aoa);
        }
Example #23
0
        public FTIT()
            : base("FTIT", new Size(360, 360))
        {
            _needleCalibration = new CalibrationPointCollectionDouble(200d, 18d, 1200d, 342d);
            _needleCalibration.Add(new CalibrationPointDouble(700d, 108d));
            _needleCalibration.Add(new CalibrationPointDouble(1000d, 306d));

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/FTIT/ftit_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needle          = new GaugeNeedle("{Helios}/Gauges/F-16/FTIT/ftit_needle.xaml", new Point(180d, 180d), new Size(60d, 144d), new Point(30d, 114d), 90d);
            _needle.Rotation = _needleCalibration.Interpolate(0);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _ftit = new HeliosValue(this, new BindingValue(0d), "", "ftit", "Current fan turbine inlet temperature of the engine.", "", BindingValueUnits.Celsius);
            _ftit.SetValue(new BindingValue(29.92), true);
            _ftit.Execute += new HeliosActionHandler(FTIT_Execute);
            Actions.Add(_ftit);
        }
Example #24
0
        public VVI()
            : base("VVI", new Size(182, 188))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/VVI/vvi_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));
            _needle = new GaugeNeedle("{Helios}/Gauges/AV-8B/Common/needle_a.xaml", new Point(91d, 94d), new Size(11, 82), new Point(5, 65), -90d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _verticalVelocity          = new HeliosValue(this, new BindingValue(0d), "", "vertical velocity", "Veritcal velocity of the aircraft", "(-6,000 to 6,000)", BindingValueUnits.FeetPerMinute);
            _verticalVelocity.Execute += new HeliosActionHandler(VerticalVelocity_Execute);
            Actions.Add(_verticalVelocity);

            _calibrationPoints = new CalibrationPointCollectionDouble(-0.6d, -170d, 0.6d, 170d);
            _calibrationPoints.Add(new CalibrationPointDouble(-0.29d, -119d));
            _calibrationPoints.Add(new CalibrationPointDouble(-0.19d, -92d));
            _calibrationPoints.Add(new CalibrationPointDouble(0d, 0d));
            _calibrationPoints.Add(new CalibrationPointDouble(0.19d, 92d));
            _calibrationPoints.Add(new CalibrationPointDouble(0.29d, 119d));
        }
Example #25
0
        public FTIT()
            : base("FTIT", new Size(360, 360))
        {
            _needleCalibration = new CalibrationPointCollectionDouble(200d, 18d, 1200d, 342d);
            _needleCalibration.Add(new CalibrationPointDouble(700d, 108d));
            _needleCalibration.Add(new CalibrationPointDouble(1000d, 306d));

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/FTIT/ftit_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/FTIT/ftit_needle.xaml", new Point(180d, 180d), new Size(60d, 144d), new Point(30d, 114d), 90d);
            _needle.Rotation = _needleCalibration.Interpolate(0);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _ftit = new HeliosValue(this, new BindingValue(0d), "", "ftit", "Current fan turbine inlet temperature of the engine.", "", BindingValueUnits.Celsius);
            _ftit.SetValue(new BindingValue(29.92), true);
            _ftit.Execute += new HeliosActionHandler(FTIT_Execute);
            Actions.Add(_ftit);
        }
Example #26
0
        public EngineO2()
            : base("EngineO2", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 40d, 256.8d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 64.8d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 129d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 193d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/EngineO2/engine_o2_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_small_gray_needle.xaml", center, new Size(32, 185), new Point(16, 127), 231.3);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _needleE = new HeliosValue(this, BindingValue.Empty, "", "Engine O2", "Engine O2", "", BindingValueUnits.Numeric);
            _needleE.Execute += Eng_Execute;
            Actions.Add(_needleE);
        }
Example #27
0
        public OilPressure()
            : base("OilPressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);
            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 4d, 89d);
            _needleCalibration.Add(new CalibrationPointDouble(0.8d, 17d));
            _needleCalibration.Add(new CalibrationPointDouble(1.6d, 35d));
            _needleCalibration.Add(new CalibrationPointDouble(2.4d, 53d));
            _needleCalibration.Add(new CalibrationPointDouble(3.2d, 71d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/OilPressure/oilpressure_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_gray_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), 287.3d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/OilPressure/oilpressure_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentPressure = new HeliosValue(this, BindingValue.Empty, "", "Oil Pressure", "Current pressure", "", BindingValueUnits.Numeric);
            _currentPressure.Execute += CurrentOil_Execute;
            Actions.Add(_currentPressure);
        }
Example #28
0
        public VVI()
            : base("VVI", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/VVI/vvi_faceplate.xaml", new Rect(32d, 38d, 300d, 300d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/Common/needle_a.xaml", new Point(182d, 188d), new Size(22, 165), new Point(11, 130), -90d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _verticalVelocity = new HeliosValue(this, new BindingValue(0d), "", "vertical velocity", "Veritcal velocity of the aircraft", "(-6,000 to 6,000)", BindingValueUnits.FeetPerMinute);
            _verticalVelocity.Execute += new HeliosActionHandler(VerticalVelocity_Execute);
            Actions.Add(_verticalVelocity);

            _calibrationPoints = new CalibrationPointCollectionDouble(-6000d, -169d, 6000d, 169d);
            _calibrationPoints.Add(new CalibrationPointDouble(-2000d, -81d));
            _calibrationPoints.Add(new CalibrationPointDouble(-1000d, -45d));
            _calibrationPoints.Add(new CalibrationPointDouble(0d, 0d));
            _calibrationPoints.Add(new CalibrationPointDouble(1000d, 45d));
            _calibrationPoints.Add(new CalibrationPointDouble(2000d, 81d));
        }
Example #29
0
        public EngineO2()
            : base("EngineO2", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 40d, 256.8d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 64.8d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 129d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 193d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/EngineO2/engine_o2_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/generic_small_gray_needle.xaml", center, new Size(32, 185), new Point(16, 127), 231.3);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _needleE          = new HeliosValue(this, BindingValue.Empty, "", "Engine O2", "Engine O2", "", BindingValueUnits.Numeric);
            _needleE.Execute += Eng_Execute;
            Actions.Add(_needleE);
        }
Example #30
0
        public Accelerometer()
            : base("Accelerometer", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            //accelerometer input min, deg, max, deg where i want the indicator to point
            _needleCalibration = new CalibrationPointCollectionDouble(-5d, -110d, 10d, 220d);
            _needleCalibration.Add(new CalibrationPointDouble(0d, 0d));
            _needleCalibration.Add(new CalibrationPointDouble(1d, 22d));
            _needleCalibration.Add(new CalibrationPointDouble(5d, 110d));
            _needleCalibration.Add(new CalibrationPointDouble(8d, 176d));
            //ACCELEROMETER.input = { -5.0, 1, 5, 8, 10.0 }
            //ACCELEROMETER.output = { -0.41, 0.096, 0.5, 0.81, 1 }

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Accelerometer/accelerometer_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _lowNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Accelerometer/accelerometer_limit_needleLow.xaml", center, new Size(32, 189), new Point(16, 161));
            Components.Add(_lowNeedle);

            _highNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Accelerometer/accelerometer_limit_needle.xaml", center, new Size(32, 189), new Point(16, 161));
            Components.Add(_highNeedle);

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Accelerometer/accelerometer_needle.xaml", center, new Size(32, 185), new Point(16, 127));
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Accelerometer/accelerometer_bezel.xaml", new Rect(0, 0, 340, 340)));

            _lowG          = new HeliosValue(this, BindingValue.Empty, "", "Low G", "Lowest G attained", "", BindingValueUnits.Numeric);
            _lowG.Execute += LowG_Execute;
            Actions.Add(_lowG);

            _highG          = new HeliosValue(this, BindingValue.Empty, "", "High G", "Highest G attained", "", BindingValueUnits.Numeric);
            _highG.Execute += HighG_Execute;
            Actions.Add(_highG);

            _currentG          = new HeliosValue(this, BindingValue.Empty, "", "Current G", "Current G", "", BindingValueUnits.Numeric);
            _currentG.Execute += CurrentG_Execute;
            Actions.Add(_currentG);
        }
Example #31
0
        public OilPressure()
            : base("OilPressure", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 4d, 89d);
            _needleCalibration.Add(new CalibrationPointDouble(0.8d, 17d));
            _needleCalibration.Add(new CalibrationPointDouble(1.6d, 35d));
            _needleCalibration.Add(new CalibrationPointDouble(2.4d, 53d));
            _needleCalibration.Add(new CalibrationPointDouble(3.2d, 71d));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/OilPressure/oilpressure_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/Common/generic_gray_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), 287.3d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/OilPressure/oilpressure_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentPressure          = new HeliosValue(this, BindingValue.Empty, "", "Oil Pressure", "Current pressure", "", BindingValueUnits.Numeric);
            _currentPressure.Execute += CurrentOil_Execute;
            Actions.Add(_currentPressure);
        }
Example #32
0
        public IAS()
            : base("Flight Instruments", new Size(300, 300))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/IAS/ias_faceplate.xaml", new Rect(0d, 0d, 300, 300)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 950d, 350d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 18d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 180d));
            _needle = new GaugeNeedle("{Helios}/Gauges/AV-8B/Common/needle_a.xaml", new Point(150d, 150d), new Size(30, 128), new Point(15, 113), 0d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));
            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/IAS/needle_mask.xaml", new Rect(130d, 34d, 73d, 98d)));
            //Components.Add(new GaugeImage("{AV-8B}/Images/WQHD/Panel/crystal_reflection_round.png", new Rect(0d, 0d, 300d, 300d)));
            GaugeImage _gauge = new GaugeImage("{AV-8B}/Images/WQHD/Panel/crystal_reflection_round.png", new Rect(0d, 0d, 300d, 300d));

            _gauge.Opacity = 0.4;
            Components.Add(_gauge);
            _indicatedAirSpeed          = new HeliosValue(this, new BindingValue(0d), "Flight Instruments", "indicated airspeed", "Current indicated airspeed of the aircraft.", "(0 - 950)", BindingValueUnits.Knots);
            _indicatedAirSpeed.Execute += new HeliosActionHandler(IndicatedAirSpeed_Execute);
            Actions.Add(_indicatedAirSpeed);
        }
Example #33
0
        public Accelerometer()
            : base("Accelerometer", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            //accelerometer input min, deg, max, deg where i want the indicator to point
            _needleCalibration = new CalibrationPointCollectionDouble(-5d, -110d, 10d, 220d);
            _needleCalibration.Add(new CalibrationPointDouble(0d, 0d));
            _needleCalibration.Add(new CalibrationPointDouble(1d, 22d));
            _needleCalibration.Add(new CalibrationPointDouble(5d, 110d));
            _needleCalibration.Add(new CalibrationPointDouble(8d, 176d));
            //ACCELEROMETER.input = { -5.0, 1, 5, 8, 10.0 } 
            //ACCELEROMETER.output = { -0.41, 0.096, 0.5, 0.81, 1 }

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Accelerometer/accelerometer_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _lowNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Accelerometer/accelerometer_limit_needleLow.xaml", center, new Size(32, 189), new Point(16, 161));
            Components.Add(_lowNeedle);

            _highNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Accelerometer/accelerometer_limit_needle.xaml", center, new Size(32, 189), new Point(16, 161));
            Components.Add(_highNeedle);

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Accelerometer/accelerometer_needle.xaml", center, new Size(32, 185), new Point(16, 127));
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Accelerometer/accelerometer_bezel.xaml", new Rect(0, 0, 340, 340)));

            _lowG = new HeliosValue(this, BindingValue.Empty, "", "Low G", "Lowest G attained", "", BindingValueUnits.Numeric);
            _lowG.Execute += LowG_Execute;
            Actions.Add(_lowG);

            _highG = new HeliosValue(this, BindingValue.Empty, "", "High G", "Highest G attained", "", BindingValueUnits.Numeric);
            _highG.Execute += HighG_Execute;
            Actions.Add(_highG);

            _currentG = new HeliosValue(this, BindingValue.Empty, "", "Current G", "Current G", "", BindingValueUnits.Numeric);
            _currentG.Execute += CurrentG_Execute;
            Actions.Add(_currentG);
        }
Example #34
0
        public VVI()
            : base("VVI", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(-30d, -180d, 30d, 180d);
            _needleCalibration.Add(new CalibrationPointDouble(-10d, -80d));
            _needleCalibration.Add(new CalibrationPointDouble(10d, 80d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 140d));
            _needleCalibration.Add(new CalibrationPointDouble(-20d, -140d));

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/VVI/vvi_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle = new GaugeNeedle("{Helios}/Gauges/KA-50/VVI/vvi_needle.xaml", center, new Size(19, 188), new Point(9.5, 139.25), -90d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/VVI/vvi_bezel.xaml", new Rect(0, 0, 340, 340)));

            _verticalVelocity          = new HeliosValue(this, BindingValue.Empty, "", "Vertical Velocity", "Current climb/descent velocity", "", BindingValueUnits.MetersPerSecond);
            _verticalVelocity.Execute += VerticalVelocity_Execute;
            Actions.Add(_verticalVelocity);
        }
Example #35
0
        public VVI()
            : base("VVI", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(-30d, -180d, 30d, 180d);
            _needleCalibration.Add(new CalibrationPointDouble(-10d, -80d));
            _needleCalibration.Add(new CalibrationPointDouble(10d, 80d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 140d));
            _needleCalibration.Add(new CalibrationPointDouble(-20d, -140d));

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/VVI/vvi_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle = new GaugeNeedle("{Helios}/Gauges/KA-50/VVI/vvi_needle.xaml", center, new Size(19, 188), new Point(9.5, 139.25), -90d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/VVI/vvi_bezel.xaml", new Rect(0, 0, 340, 340)));

            _verticalVelocity = new HeliosValue(this, BindingValue.Empty, "", "Vertical Velocity", "Current climb/descent velocity", "", BindingValueUnits.MetersPerSecond);
            _verticalVelocity.Execute += VerticalVelocity_Execute;
            Actions.Add(_verticalVelocity);
        }
Example #36
0
        public VVI() : base("VVI", new Size(364, 376))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/VVI/VVI_Faceplate.png", new Rect(32d, 38d, 300d, 300d)));
            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/Common/needle_a.xaml", new Point(182d, 188d), new Size(22, 165), new Point(11, 130), -90d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));
            _verticalVelocity          = new HeliosValue(this, new BindingValue(0d), "", "vertical velocity", "Veritcal velocity of the aircraft", "(-6,000 to 6,000)", BindingValueUnits.FeetPerMinute);
            _verticalVelocity.Execute += new HeliosActionHandler(VerticalVelocity_Execute);
            Actions.Add(_verticalVelocity);

            _calibrationPoints = new CalibrationPointCollectionDouble(-6000d, -169d, 6000d, 169d);
            _calibrationPoints.Add(new CalibrationPointDouble(0d, 0d));
        }
Example #37
0
        public RadarAltimeter()
            : base("Radar Altimeter", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 300d, 330d);
            _needleCalibration.Add(new CalibrationPointDouble(20d, 66d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 115d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 165d));
            _needleCalibration.Add(new CalibrationPointDouble(150d, 271d));
            _needleCalibration.Add(new CalibrationPointDouble(200, 300d));

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle = new GaugeNeedle("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_needle.xaml", center, new Size(32, 143), new Point(16, 127));
            Components.Add(_needle);

            _safeNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_safe_needle.xaml", center, new Size(13, 16), new Point(6.5, 151));
            Components.Add(_safeNeedle);

            _flagImage = new GaugeImage("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_flag.xaml", new Rect(280, 50, 32, 89));
            Components.Add(_flagImage);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_bezel.xaml", new Rect(0, 0, 340, 340)));

            _altitude = new HeliosValue(this, BindingValue.Empty, "", "Altitude", "Current altitude AGL", "", BindingValueUnits.Meters);
            _altitude.Execute += Altitude_Execute;
            Actions.Add(_altitude);

            _safeAltitude = new HeliosValue(this, BindingValue.Empty, "", "Safe Altitude", "Current safe altitude AGL", "", BindingValueUnits.Meters);
            _safeAltitude.Execute += SafeAltitude_Execute;
            Actions.Add(_safeAltitude);

            _flag = new HeliosValue(this, new BindingValue(false), "", "Failure flag", "Indicates altimeter is not functional failure.", "True if displayed.", BindingValueUnits.Boolean);
            _flag.Execute += Flag_Execute;
            Actions.Add(_flag);
        }
Example #38
0
        public RadarAltimeter()
            : base("Radar Altimeter", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 300d, 330d);
            _needleCalibration.Add(new CalibrationPointDouble(20d, 66d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 115d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 165d));
            _needleCalibration.Add(new CalibrationPointDouble(150d, 271d));
            _needleCalibration.Add(new CalibrationPointDouble(200, 300d));

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle = new GaugeNeedle("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_needle.xaml", center, new Size(32, 143), new Point(16, 127));
            Components.Add(_needle);

            _safeNeedle = new GaugeNeedle("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_safe_needle.xaml", center, new Size(13, 16), new Point(6.5, 151));
            Components.Add(_safeNeedle);

            _flagImage = new GaugeImage("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_flag.xaml", new Rect(280, 50, 32, 89));
            Components.Add(_flagImage);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/RadarAltimeter/radar_alt_bezel.xaml", new Rect(0, 0, 340, 340)));

            _altitude          = new HeliosValue(this, BindingValue.Empty, "", "Altitude", "Current altitude AGL", "", BindingValueUnits.Meters);
            _altitude.Execute += Altitude_Execute;
            Actions.Add(_altitude);

            _safeAltitude          = new HeliosValue(this, BindingValue.Empty, "", "Safe Altitude", "Current safe altitude AGL", "", BindingValueUnits.Meters);
            _safeAltitude.Execute += SafeAltitude_Execute;
            Actions.Add(_safeAltitude);

            _flag          = new HeliosValue(this, new BindingValue(false), "", "Failure flag", "Indicates altimeter is not functional failure.", "True if displayed.", BindingValueUnits.Boolean);
            _flag.Execute += Flag_Execute;
            Actions.Add(_flag);
        }
Example #39
0
        public RAltimeter()
            : base("RADAR Altimeter", new Size(420, 420))
        {
            //  The first three images are the default images which appear behind the indicators.
            Components.Add(new GaugeImage("{FA-18C}/Images/indicator_off.png", new Rect(108d, 177d, 50d, 50d)));
            Components.Add(new GaugeImage("{FA-18C}/Images/indicator_off.png", new Rect(260d, 177d, 50d, 50d)));
            Components.Add(new GaugeImage("{FA-18C}/Images/Radar Altimeter Blank.png", new Rect(179d, 288d, 56d, 22d)));

            _giRed = new GaugeImage("{FA-18C}/Images/indicator_red.png", new Rect(108d, 177d, 50d, 50d));
            Components.Add(_giRed);
            _redIndicator          = new HeliosValue(this, new BindingValue(0d), "", "RADAR Altimeter Red", "Red Indicator.", "", BindingValueUnits.Boolean);
            _redIndicator.Execute += new HeliosActionHandler(RedIndicator_Execute);
            Values.Add(_redIndicator);
            Actions.Add(_redIndicator);

            _giGreen = new GaugeImage("{FA-18C}/Images/indicator_green.png", new Rect(260d, 177d, 50d, 50d));
            Components.Add(_giGreen);
            _greenIndicator          = new HeliosValue(this, new BindingValue(0d), "", "RADAR Altimeter Green", "Green Indicator.", "", BindingValueUnits.Boolean);
            _greenIndicator.Execute += new HeliosActionHandler(GreenIndicator_Execute);
            Values.Add(_greenIndicator);
            Actions.Add(_greenIndicator);

            _giOff = new GaugeImage("{FA-18C}/Images/Radar Altimeter Off Flag.png", new Rect(179d, 287d, 56d, 24d));
            Components.Add(_giOff);
            _offIndicator          = new HeliosValue(this, new BindingValue(0d), "", "RADAR Altimeter Off", "Off Indicator.", "", BindingValueUnits.Boolean);
            _offIndicator.Execute += new HeliosActionHandler(OffIndicator_Execute);
            Values.Add(_offIndicator);
            Actions.Add(_offIndicator);

            Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/Altimeter/RADAR_Altimeter_Faceplate.png", new Rect(0d, 0d, 420d, 420d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0.048d, 0d, 1d, 330d);
            _needleCalibration.Add(new CalibrationPointDouble(0.000d, -12d));
            _needle = new GaugeNeedle("{Helios}/Gauges/FA-18C/Altimeter/altimeter_needle.xaml", new Point(210d, 210d), new Size(16d, 250d), new Point(8d, 200d), 0d);
            Components.Add(_needle);
            _minimum_needle = new GaugeNeedle("{Helios}/Gauges/FA-18C/Altimeter/RADAR_Altimeter_Min_Needle.xaml", new Point(210d, 210d), new Size(46d, 205d), new Point(23d, 205d), 0d);
            Components.Add(_minimum_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/Altimeter/RADAR_Altimeter_Cover.png", new Rect(94d, 11d, 89d, 88d)));  // this is the needle cover

            //Components.Add(new GaugeImage("{Helios}/Gauges/FA-18C/Common/engine_bezel.png", new Rect(0d, 0d, 400d, 400d)));

            _altitude          = new HeliosValue(this, new BindingValue(0d), "", "RADAR altitude", "Current RADAR altitude of the aircraft.", "", BindingValueUnits.Feet);
            _altitude.Execute += new HeliosActionHandler(Altitude_Execute);
            Actions.Add(_altitude);
            _min_altitude          = new HeliosValue(this, new BindingValue(0d), "", "RADAR Altimeter Minimum", "Minimum Altitude setting for the aricraft in feet.", "", BindingValueUnits.Feet);
            _min_altitude.Execute += new HeliosActionHandler(Min_Altitude_Execute);
            Actions.Add(_min_altitude);
        }
Example #40
0
        public DA200()
            : base("DA200", new Size(340, 340))
        {
            Point center = new Point(170, 170);
            Point bottomCenter = new Point(170, 240);
            Point veryBottomCenter = new Point(170, 310);

            _vvineedleCalibration = new CalibrationPointCollectionDouble(-400d, -135d, 400d, 135d);
            _vvineedleCalibration.Add(new CalibrationPointDouble(-200d, -121d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-100d, -102d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-50d, -80d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-20d, -70d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-10d, -35d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(0d, 0d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(10d, 35d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(20d, 70d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(50d, 80d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(100d, 102d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(200d, 121d));

            _vviNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/DA200/da200vvi_needle.xaml", center, new Size(32, 185), new Point(16, 127), 270);

            _slipBallCalibration = new CalibrationPointCollectionDouble(-1d, 57d, 1d, -57d);
            _slipBallCalibration.Add(new CalibrationPointDouble(0d, 0d));
            _slipBallNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/DA200/da200_slip_ball.xaml", bottomCenter, new Size(23, 23), new Point(11.5, 11.5));

            _turnneedleCalibration = new CalibrationPointCollectionDouble(-0.04433d, -26d, 0.04433d, 26d);
            _turnNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/DA200/da200bank_needle.xaml", veryBottomCenter, new Size(34, 218), new Point(17, 208));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/DA200/da200_faceplate.xaml", new Rect(0, 0, 340, 340)));
            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/DA200/da200slip_faceplate.xaml", new Rect(99, 222, 140, 36)));
            Components.Add(_slipBallNeedle);
            Components.Add(_turnNeedle);
            Components.Add(_vviNeedle);
            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _vviE = new HeliosValue(this, BindingValue.Empty, "", "VVI", "Velocity", "", BindingValueUnits.Numeric);
            _vviE.Execute += vvi_Execute;
            Actions.Add(_vviE);

            _slipBallE = new HeliosValue(this, BindingValue.Empty, "", "Slip", "Slip Ball", "", BindingValueUnits.Numeric);
            _slipBallE.Execute += SlipBall_Execute;
            Actions.Add(_slipBallE);

            _turnE = new HeliosValue(this, BindingValue.Empty, "", "Turn", "Turn", "", BindingValueUnits.Numeric);
            _turnE.Execute += turn_Execute;
            Actions.Add(_turnE);

        }
Example #41
0
        public DA200()
            : base("DA200", new Size(340, 340))
        {
            Point center           = new Point(170, 170);
            Point bottomCenter     = new Point(170, 240);
            Point veryBottomCenter = new Point(170, 310);

            _vvineedleCalibration = new CalibrationPointCollectionDouble(-400d, -135d, 400d, 135d);
            _vvineedleCalibration.Add(new CalibrationPointDouble(-200d, -121d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-100d, -102d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-50d, -80d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-20d, -70d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(-10d, -35d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(0d, 0d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(10d, 35d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(20d, 70d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(50d, 80d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(100d, 102d));
            _vvineedleCalibration.Add(new CalibrationPointDouble(200d, 121d));

            _vviNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/DA200/da200vvi_needle.xaml", center, new Size(32, 185), new Point(16, 127), 270);

            _slipBallCalibration = new CalibrationPointCollectionDouble(-1d, 57d, 1d, -57d);
            _slipBallCalibration.Add(new CalibrationPointDouble(0d, 0d));
            _slipBallNeedle = new GaugeNeedle("{Helios}/Gauges/MiG-21/DA200/da200_slip_ball.xaml", bottomCenter, new Size(23, 23), new Point(11.5, 11.5));

            _turnneedleCalibration = new CalibrationPointCollectionDouble(-0.04433d, -26d, 0.04433d, 26d);
            _turnNeedle            = new GaugeNeedle("{Helios}/Gauges/MiG-21/DA200/da200bank_needle.xaml", veryBottomCenter, new Size(34, 218), new Point(17, 208));

            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/DA200/da200_faceplate.xaml", new Rect(0, 0, 340, 340)));
            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/DA200/da200slip_faceplate.xaml", new Rect(99, 222, 140, 36)));
            Components.Add(_slipBallNeedle);
            Components.Add(_turnNeedle);
            Components.Add(_vviNeedle);
            Components.Add(new GaugeImage("{Helios}/Gauges/MiG-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _vviE          = new HeliosValue(this, BindingValue.Empty, "", "VVI", "Velocity", "", BindingValueUnits.Numeric);
            _vviE.Execute += vvi_Execute;
            Actions.Add(_vviE);

            _slipBallE          = new HeliosValue(this, BindingValue.Empty, "", "Slip", "Slip Ball", "", BindingValueUnits.Numeric);
            _slipBallE.Execute += SlipBall_Execute;
            Actions.Add(_slipBallE);

            _turnE          = new HeliosValue(this, BindingValue.Empty, "", "Turn", "Turn", "", BindingValueUnits.Numeric);
            _turnE.Execute += turn_Execute;
            Actions.Add(_turnE);
        }
        public PreviewTabViewModel(IEventAggregator eventAggregator, DisplayManager DisplayManager)
        {
            this.DisplayManager = DisplayManager;
            MonitorCollection mc = DisplayManager.Displays;

            Monitor = mc[0];


            ZoomCalibration = new CalibrationPointCollectionDouble(-10d, 0.1d, 2d, 2d);
            ZoomCalibration.Add(new CalibrationPointDouble(0d, 1d));

            this.eventAggregator = eventAggregator;
            this.eventAggregator.Subscribe(this);

            Title = "Preview";
        }
Example #43
0
        public FanRPM()
            : base("Fan RPM", new Size(360, 360))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/FanRPM/eng_fan_rpm_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 100d, 330d);
            _needleCalibration.Add(new CalibrationPointDouble(75d, 150d));
            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/Common/eng_needle.xaml", new Point(180d, 180d), new Size(69d, 161d), new Point(34.5d, 126.5d), 30d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _rpm          = new HeliosValue(this, new BindingValue(0d), "", "rpm", "Current RPM of the aircraft enigne fan.", "(0 - 100)", BindingValueUnits.RPMPercent);
            _rpm.Execute += new HeliosActionHandler(RPM_Execute);
            Actions.Add(_rpm);
        }
Example #44
0
        public Battery()
            : base("voltage", new Size(300, 300))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/AV-8B/Battery/battery_faceplate.xaml", new Rect(0d, 0d, 300d, 300d)));
            _needle = new GaugeNeedle("{Helios}/Gauges/AV-8B/Common/needle_a.xaml", new Point(150d, 150d), new Size(36, 154), new Point(18, 136), -90d);
            Components.Add(_needle);

            //Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _voltage          = new HeliosValue(this, new BindingValue(0d), "", "Battery Voltage", "This is the voltage of the battery in volts", "(15 to 30)", BindingValueUnits.Volts);
            _voltage.Execute += new HeliosActionHandler(voltage_Execute);
            Actions.Add(_voltage);

            _calibrationPoints = new CalibrationPointCollectionDouble(15d, 0d, 30d, 180d);
            _calibrationPoints.Add(new CalibrationPointDouble(0d, 0d));  // used to set an end stop at 15v
        }
Example #45
0
        public OxygenPressure()
            : base("Oxygen Supply Pressure", new Size(360, 360))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/OxygenPressure/oxygen_pressure_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 500d, 180d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 90d));
            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/OxygenPressure/oxygen_pressure_needle.xaml", new Point(180d, 180d), new Size(175d, 74d), new Point(138d, 37d), 0d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _liquidOxygen          = new HeliosValue(this, new BindingValue(0d), "", "oxygen supply pressure", "Current pressure in the oxygen system.", "(0-500)", BindingValueUnits.PoundsPerSquareInch);
            _liquidOxygen.Execute += new HeliosActionHandler(LiquidOxygen_Execute);
            Actions.Add(_liquidOxygen);
        }
Example #46
0
        public OxygenPressure()
            : base("Oxygen Supply Pressure", new Size(360, 360))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/OxygenPressure/oxygen_pressure_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 500d, 180d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 90d));
            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/OxygenPressure/oxygen_pressure_needle.xaml", new Point(180d, 180d), new Size(175d, 74d), new Point(138d, 37d), 0d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _liquidOxygen = new HeliosValue(this, new BindingValue(0d), "", "oxygen supply pressure", "Current pressure in the oxygen system.", "(0-500)", BindingValueUnits.PoundsPerSquareInch);
            _liquidOxygen.Execute += new HeliosActionHandler(LiquidOxygen_Execute);
            Actions.Add(_liquidOxygen);
        }
Example #47
0
        public FanRPM()
            : base("Fan RPM", new Size(360, 360))
        {
            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/FanRPM/eng_fan_rpm_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 100d, 330d);
            _needleCalibration.Add(new CalibrationPointDouble(75d, 150d));
            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/Common/eng_needle.xaml", new Point(180d, 180d), new Size(69d, 161d), new Point(34.5d, 126.5d), 30d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _rpm = new HeliosValue(this, new BindingValue(0d), "", "rpm", "Current RPM of the aircraft enigne fan.", "(0 - 100)", BindingValueUnits.RPMPercent);
            _rpm.Execute += new HeliosActionHandler(RPM_Execute);
            Actions.Add(_rpm);
        }
Example #48
0
        public RollTrim()
            : base("Trim", new Size(100, 200))
        {
            _needleCalibration = new CalibrationPointCollectionDouble(-0.5d, -90d, 0.5d, 90d);
            _needleCalibration.Add(new CalibrationPointDouble(60d, 108d));

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Trim/rolltrim_faceplate.xaml", new Rect(0d, 0d, 100d, 200d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/Trim/rolltrim_needle.xaml", new Point(93d, 100d), new Size(90d, 14d), new Point(83d, 7d));
            //_needle.Clip = new RectangleGeometry(new Rect(0d, 0d, 100d, 200d));
            Components.Add(_needle);

            _trim = new HeliosValue(this, new BindingValue(0d), "", "roll trim", "Current amount of roll trim currently set.", "(-0.5 to 0.5)", BindingValueUnits.Numeric);
            _trim.SetValue(new BindingValue(29.92), true);
            _trim.Execute += new HeliosActionHandler(Trim_Execute);
            Actions.Add(_trim);
        }
Example #49
0
        public RollTrim()
            : base("Trim", new Size(100, 200))
        {
            _needleCalibration = new CalibrationPointCollectionDouble(-0.5d, -90d, 0.5d, 90d);
            _needleCalibration.Add(new CalibrationPointDouble(60d, 108d));

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Trim/rolltrim_faceplate.xaml", new Rect(0d, 0d, 100d, 200d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/Trim/rolltrim_needle.xaml", new Point(93d, 100d), new Size(90d, 14d), new Point(83d, 7d));
            //_needle.Clip = new RectangleGeometry(new Rect(0d, 0d, 100d, 200d));
            Components.Add(_needle);

            _trim = new HeliosValue(this, new BindingValue(0d), "", "roll trim", "Current amount of roll trim currently set.", "(-0.5 to 0.5)", BindingValueUnits.Numeric);
            _trim.SetValue(new BindingValue(29.92), true);
            _trim.Execute += new HeliosActionHandler(Trim_Execute);
            Actions.Add(_trim);
        }
Example #50
0
        public RPM()
            : base("RPM", new Size(360, 360))
        {
            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 110d, 337.5d);
            _needleCalibration.Add(new CalibrationPointDouble(60d, 108d));

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/RPM/rpm_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/RPM/rpm_needle.xaml", new Point(180d, 180d), new Size(60d, 144d), new Point(30d, 114d));
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _rpm = new HeliosValue(this, new BindingValue(0d), "", "rpm", "Current RPM of the engine.", "", BindingValueUnits.RPMPercent);
            _rpm.SetValue(new BindingValue(29.92), true);
            _rpm.Execute += new HeliosActionHandler(RPM_Execute);
            Actions.Add(_rpm);
        }
Example #51
0
File: RPM.cs Project: Phar71/Helios
        public RPM()
            : base("RPM", new Size(360, 360))
        {
            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 110d, 337.5d);
            _needleCalibration.Add(new CalibrationPointDouble(60d, 108d));

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/RPM/rpm_faceplate.xaml", new Rect(30d, 30d, 300d, 300d)));

            _needle = new GaugeNeedle("{Helios}/Gauges/F-16/RPM/rpm_needle.xaml", new Point(180d, 180d), new Size(60d, 144d), new Point(30d, 114d));
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/F-16/Common/f16_engine_bezel.png", new Rect(0d, 0d, 360d, 360d)));

            _rpm = new HeliosValue(this, new BindingValue(0d), "", "rpm", "Current RPM of the engine.", "", BindingValueUnits.RPMPercent);
            _rpm.SetValue(new BindingValue(29.92), true);
            _rpm.Execute += new HeliosActionHandler(RPM_Execute);
            Actions.Add(_rpm);
        }
Example #52
0
        public AOA()
            : base("AOA", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(-0.1745d, -53d, 0.6108d, 195d);
            _needleCalibration.Add(new CalibrationPointDouble(0d, 0d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/AOA/aoa_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/Common/generic_needle.xaml", center, new Size(32, 185), new Point(16, 127), -154d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentAoa = new HeliosValue(this, BindingValue.Empty, "", "Current AOA", "Current AOA", "", BindingValueUnits.Numeric);
            _currentAoa.Execute += CurrentAoa_Execute;
            Actions.Add(_currentAoa);
        }
Example #53
0
        public IAS()
            : base("IAS", new Size(364, 376))
        {
            _tapeCalibration = new CalibrationPointCollectionDouble(0d, 0d, 100d, 346d);
            _tape = new GaugeNeedle("{Helios}/Gauges/A-10/IAS/ias_tape.xaml", new Point(137, 93), new Size(436, 42), new Point(0, 0));
            _tape.HorizontalOffset = -_tapeCalibration.Interpolate(0d);
            _tape.Clip = new RectangleGeometry(new Rect(137d, 93d, 90d, 42d));
            Components.Add(_tape);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/IAS/ias_faceplate.xaml", new Rect(32d, 38d, 300, 300)));

            _needleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 550d, 340d);
            _needleCalibration.Add(new CalibrationPointDouble(100d, 34d));
            _needle = new GaugeNeedle("{Helios}/Gauges/A-10/Common/needle_a.xaml", new Point(182d, 188d), new Size(22, 165), new Point(11, 130), 10d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/A-10/Common/gauge_bezel.png", new Rect(0d, 0d, 364d, 376d)));

            _indicatedAirSpeed = new HeliosValue(this, new BindingValue(0d), "", "indicated airspeed", "Current indicated airspeed of the aircraft.", "(0 - 550)", BindingValueUnits.Knots);
            _indicatedAirSpeed.Execute += new HeliosActionHandler(IndicatedAirSpeed_Execute);
            Actions.Add(_indicatedAirSpeed);
        }
Example #54
0
        public IAS()
            : base("IAS", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(20d, 5d, 35d, 345d);
            _needleCalibration.Add(new CalibrationPointDouble(50d, 95d));
            _needleCalibration.Add(new CalibrationPointDouble(100d, 145d));
            _needleCalibration.Add(new CalibrationPointDouble(150d, 185d));
            _needleCalibration.Add(new CalibrationPointDouble(200d, 225d));
            _needleCalibration.Add(new CalibrationPointDouble(250d, 265d));
            _needleCalibration.Add(new CalibrationPointDouble(300d, 305d));

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/IAS/ias_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _needle = new GaugeNeedle("{Helios}/Gauges/KA-50/IAS/ias_needle.xaml", center, new Size(40, 159), new Point(20, 139), 5d);
            Components.Add(_needle);

            Components.Add(new GaugeImage("{Helios}/Gauges/KA-50/IAS/ias_bezel.xaml", new Rect(0, 0, 340, 340)));

            _speed = new HeliosValue(this, BindingValue.Empty, "", "Indicated Airspeed", "Current indicated airspeed", "", BindingValueUnits.KilometersPerHour);
            _speed.Execute += Speed_Execute;
            Actions.Add(_speed);
        }
Example #55
0
        public RadioAltimeter()
            : base("RadioAltimeter", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _needleCalibration = new CalibrationPointCollectionDouble(0.0d, 0d, 1000d, 231d);
            _needleCalibration.Add(new CalibrationPointDouble(10d, 22.5d));
            _needleCalibration.Add(new CalibrationPointDouble(20d, 34.6d));
            _needleCalibration.Add(new CalibrationPointDouble(30d, 55.6d));
            _needleCalibration.Add(new CalibrationPointDouble(40d, 73.8d));
            _needleCalibration.Add(new CalibrationPointDouble(50d, 94.2d));
            _needleCalibration.Add(new CalibrationPointDouble(60d, 103.2d));
            _needleCalibration.Add(new CalibrationPointDouble(70d, 114.2d));
            _needleCalibration.Add(new CalibrationPointDouble(80d, 119.6d));
            _needleCalibration.Add(new CalibrationPointDouble(90d, 127d));
            _needleCalibration.Add(new CalibrationPointDouble(100d, 130.5d));
            _needleCalibration.Add(new CalibrationPointDouble(150d, 151.2d));
            _needleCalibration.Add(new CalibrationPointDouble(200d, 160.6d));
            _needleCalibration.Add(new CalibrationPointDouble(250d, 181.9d));
            _needleCalibration.Add(new CalibrationPointDouble(300d, 192.6d));
            _needleCalibration.Add(new CalibrationPointDouble(400d, 210.9d));
            _needleCalibration.Add(new CalibrationPointDouble(500d, 220.6d));
            _needleCalibration.Add(new CalibrationPointDouble(600d, 231d));

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/RadioAltimeter/radalt_faceplate.xaml", new Rect(0, 0, 340, 340)));

            _currentNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/RadioAltimeter/radalt_needle.xaml", center, new Size(69d, 178d), new Point(34.5d, 126.5d), -120d);
            Components.Add(_currentNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _currentRadAlt = new HeliosValue(this, BindingValue.Empty, "", "Current RadAlt", "Current RadAlt", "", BindingValueUnits.Numeric);
            _currentRadAlt.Execute += CurrentRadAlt_Execute;
            Actions.Add(_currentRadAlt);
        }
Example #56
0
        public BarometricAltimeter()
            : base("Barometric Altimeter", new Size(340, 340))
        {
            Point center = new Point(170, 170);

            _qfeCalibration = new CalibrationPointCollectionDouble(-1d, -135.5d, 1d, 45.5d);
            _qfeCalibration.Add(new CalibrationPointDouble(0.6223d, 30d));  
            _qfeCalibration.Add(new CalibrationPointDouble(0.3111d, 15d));  
            _qfeCalibration.Add(new CalibrationPointDouble(-0.0090d, 0d));  
            _qfeCalibration.Add(new CalibrationPointDouble(-0.1166d, -15d)); 
            _qfeCalibration.Add(new CalibrationPointDouble(-0.2246, -30d)); 
            _qfeCalibration.Add(new CalibrationPointDouble(-0.3362, -45d)); 
            _qfeCalibration.Add(new CalibrationPointDouble(-0.4501, -60d)); 
            _qfeCalibration.Add(new CalibrationPointDouble(-0.5577, -75d)); 
            _qfeCalibration.Add(new CalibrationPointDouble(-0.6715, -90d)); 
            _qfeCalibration.Add(new CalibrationPointDouble(-0.7793, -105d)); 
            _qfeCalibration.Add(new CalibrationPointDouble(-0.8899, -120d)); 

            _longneedleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 1000d, 360d);
            _longneedleCalibration.Add(new CalibrationPointDouble(200d, 74d));
            _longneedleCalibration.Add(new CalibrationPointDouble(400d, 146d));
            _longneedleCalibration.Add(new CalibrationPointDouble(600d, 220d));
            _longneedleCalibration.Add(new CalibrationPointDouble(800d, 293d));

            _shortneedleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 30000d, 340d);
            _kmTriangleneedleCalibration = new CalibrationPointCollectionDouble(0d, 0d, 30000d, 319d);

            _qfeCard = new GaugeNeedle("{Helios}/Gauges/Mig-21/BaroAltimeter/baro_alt_qfe_card.xaml", center, new Size(264, 264), new Point(132, 132), 150d);
            Components.Add(_qfeCard);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/BaroAltimeter/baro_alt_faceplate.xaml", new Rect(0, 0, 340, 340)));
            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/BaroAltimeter/baro_alt_innerfaceplate.xaml", new Rect(90, 90, 160, 160)));

            _mTriangleNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/BaroAltimeter/baro_alt_triangle_m.xaml", center, new Size(40, 222), new Point(20, 152));
            Components.Add(_mTriangleNeedle);

            _kmTriangleNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/BaroAltimeter/baro_alt_triangle_m.xaml", center, new Size(21, 110), new Point(10.5, 79));
            Components.Add(_kmTriangleNeedle);

            _shortNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/BaroAltimeter/baro_alt_short_needle.xaml", center, new Size(21, 110), new Point(10.5, 79));
            Components.Add(_shortNeedle);

            _longNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/BaroAltimeter/baro_alt_long_needle.xaml", center, new Size(40, 209), new Point(20, 139));
            Components.Add(_longNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/Common/generic_bezel.xaml", new Rect(0, 0, 340, 340)));

            _altitudeLong = new HeliosValue(this, BindingValue.Empty, "", "Altitude M", "Current barometric altitude M", "", BindingValueUnits.Meters);
            _altitudeLong.Execute += AltitudeLong_Execute;
            Actions.Add(_altitudeLong);

            _altitudeShort = new HeliosValue(this, BindingValue.Empty, "", "Altitude KM", "Current barometric altitude KM", "", BindingValueUnits.Meters);
            _altitudeShort.Execute += AltitudeShort_Execute;
            Actions.Add(_altitudeShort);

            _qfePressure = new HeliosValue(this, BindingValue.Empty, "", "QFE Pressure", "Use Altimeter pressure knob axis as input", "Use Altimeter pressure knob axis as input", BindingValueUnits.Numeric);
            _qfePressure.Execute += Pressure_Execute;
            Actions.Add(_qfePressure);

            _mTriangle = new HeliosValue(this, BindingValue.Empty, "", "Triangle  M", "Current Triangle altitude M", "", BindingValueUnits.Meters);
            _mTriangle.Execute += TriangleM_Execute;
            Actions.Add(_mTriangle);

            _kmTriangle = new HeliosValue(this, BindingValue.Empty, "", "Triangle  KM", "Current Triangle altitude KM", "", BindingValueUnits.Meters);
            _kmTriangle.Execute += TriangleKM_Execute;
            Actions.Add(_kmTriangle);
        }
Example #57
0
        public BlackSharkInterface()
            : base("DCS Black Shark")
        {
            #region Left Front Panel
            // Master Caution
            AddFunction(new IndicatorPushButton(this, SYST_CONTROLLER, BUTTON_1, "44", "System Controller", "Master Caution"));
            
            // Caution Lights
            AddFunction(new IndicatorPushButton(this, SYST_CONTROLLER, BUTTON_3, "46", "Caution", "Rotor RPM Indicator"));
            AddFunction(new FlagValue(this, "47", "Caution", "Under Fire Indicator", ""));
            AddFunction(new FlagValue(this, "48", "Caution", "Lower Gear Indicator", ""));
            AddFunction(new FlagValue(this, "78", "Caution", "Left Engine Max RPM Indicator", ""));
            AddFunction(new FlagValue(this, "79", "Caution", "Right Engine Max RPM Indicator", ""));
            AddFunction(new FlagValue(this, "80", "Caution", "Ny Max", ""));
            AddFunction(new FlagValue(this, "81", "Caution", "Left Engine Vibration Indicator", ""));
            AddFunction(new FlagValue(this, "82", "Caution", "Right Engine Vibration Indicator", ""));
            AddFunction(new FlagValue(this, "83", "Caution", "IAS Max Indicator", ""));
            AddFunction(new FlagValue(this, "84", "Caution", "Main Transmission Warning Indicator", ""));
            AddFunction(new FlagValue(this, "85", "Caution", "Fire Indicator", ""));
            AddFunction(new FlagValue(this, "86", "Caution", "IFF Failure Indicator", ""));

            // VVI
            AddFunction(new ScaledNetworkValue(this, "24", 30d, "VVI", "vertical velocity", "Current vertical velocity displayed on the VVI.", "(-30 to 30)", BindingValueUnits.MetersPerSecond));

            // ADI
            AddFunction(new ScaledNetworkValue(this, "100", 180d, "ADI", "roll", "Current roll displayed on the ADI.", "(-180 to 180)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "101", -90d, "ADI", "pitch", "Current pitch displayed on the ADI.", "(-90 to 90)", BindingValueUnits.Degrees));
            AddFunction(new FlagValue(this, "102", "ADI", "steering flag", "Indicates whether the steering flag is displayed on the ADI."));
            AddFunction(new FlagValue(this, "109", "ADI", "malfunction flag", "Indicates whether the attitude flag is displayed on the ADI."));
            AddFunction(new NetworkValue(this, "107", "ADI", "bank deviation", "Current amount of bank steering displayed on the ADI.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "106", "ADI", "pitch deviation", "Current amount of pitch steering displayed on the ADI.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "111", "ADI", "air speed deviation", "Current amount of deviation from assigned air speed displayed on the ADI.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "103", "ADI", "lateral deviation", "Current amount of deviation from assigned track displayed on the ADI.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "526", "ADI", "altitude deviation", "Current amount of deviation from assigned altitude displayed on the ADI.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "108", "ADI", "side slip", "Current amount of side slip displayed on the ADI.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new RotaryEncoder(this, ADI, BUTTON_1, "105", 0.001, "ADI", "Zero Pitch Trim"));
            AddFunction(new PushButton(this, ADI, BUTTON_3, "110", "ADI", "Test"));

            // Barometric Altimeter
            AddFunction(new ScaledNetworkValue(this, "87", 10000d, "Barometric Altimeter", "Altitude", "Barometric altitude.", "(0-10000)", BindingValueUnits.Meters));
            AddFunction(new ScaledNetworkValue(this, "88", 200d, "Barometric Altimeter", "QFE Pressure", "", "600-800", BindingValueUnits.MilimetersOfMercury, 600d, "%0.2f"));
            AddFunction(new ScaledNetworkValue(this, "89", 10000d, "Barometric Altimeter", "Commanded Altitude", "Commanded altitude.", "(0-10000)", BindingValueUnits.Meters));

            // HSI
            AddFunction(new ScaledNetworkValue(this, "112", 360d, "HSI", "Heading", "Current heading displayed on the HSI", "(0-360)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "118", 360d, "HSI", "Commaned Course", "Current commanded course on the HSI", "(0-360)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "124", 360d, "HSI", "Commanded Heading", "Current commanded heading on the HSI", "(0-360)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "115", 360d, "HSI", "Bearing", "Current bearing displayed on the HSI", "(0-360)", BindingValueUnits.Degrees));
            AddFunction(new FlagValue(this, "119", "HSI", "Heading Warning Flag", "Heading flag indicator."));
            AddFunction(new FlagValue(this, "114", "HSI", "Course Warning Flag", "Course warning flag indicator."));
            AddFunction(new FlagValue(this, "125", "HSI", "Glide Warning Flag", "Glide warning flag indicator."));
            AddFunction(new Functions.HSIRange(this));
            AddFunction(new NetworkValue(this, "127", "HSI", "Longitudinal deviation", "Longitudinal deviation", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "128", "HSI", "Lateral deviation", "Lateral deviation", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new FlagValue(this, "116", "HSI", "Range flag", "Range unavailable flag"));
            AddFunction(new FlagValue(this, "121", "HSI", "Course flag", "Course unavailable flag"));
            AddFunction(new RotaryEncoder(this, HSI, BUTTON_1, "126", 0.001d, "HSI", "Commanded course rotary"));
            AddFunction(new RotaryEncoder(this, HSI, BUTTON_2, "129", 0.001d, "HSI", "Commanded heading rotary"));
            AddFunction(new PushButton(this, HSI, BUTTON_3, "113", "HSI", "Test button"));
            AddFunction(Switch.CreateToggleSwitch(this, HSI, BUTTON_4, "54", "1", "Manual", "0", "Auto", "HSI", "HSI DTA Desired Heading", "%1d"));

            // Laser RangeFinder
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, LASERRANGER, BUTTON_3, "56", BUTTON_2, "57", "1", "0", "0", "Norm", "1", "Stand By", "Laser Ranger", "Mode Switch", "%1d"));
            AddFunction(new PushButton(this, LASERRANGER, BUTTON_4, "55", "Laser Ranger", "Designator Reset"));
            
            // Blade Angle
            AddFunction(new ScaledNetworkValue(this, "53", 15d, "Rotor", "Pitch", "Current pitch of the rotor blades", "(0-15)", BindingValueUnits.Degrees));

            // Rotor RPM
            AddFunction(new ScaledNetworkValue(this, "52", 110d, "Rotor", "RPM", "Rotor RPM", "(0-110)", BindingValueUnits.RPMPercent));

            // Radar Altimeter
            CalibrationPointCollectionDouble radarAltScale = new CalibrationPointCollectionDouble(0.0d, 0.0d, 1.0d, 350d);
            radarAltScale.Add(new CalibrationPointDouble(0.1838d, 20d));
            radarAltScale.Add(new CalibrationPointDouble(0.4631d, 50d));
            radarAltScale.Add(new CalibrationPointDouble(0.7541d, 150d));
            radarAltScale.Add(new CalibrationPointDouble(0.8330d, 200d));
            radarAltScale.Add(new CalibrationPointDouble(0.9329d, 300d));
            AddFunction(new ScaledNetworkValue(this, "94", radarAltScale, "Radar Altimeter", "Altitude", "", "0-300", BindingValueUnits.Meters));
            AddFunction(new ScaledNetworkValue(this, "93", radarAltScale, "Radar Altimeter", "Dangerouse Altitude Index", "", "0-300", BindingValueUnits.Meters));
            AddFunction(new FlagValue(this, "95", "Radar Altimeter", "Warning Flag", "Flag displayed when radar altimeter is not functioning."));
            AddFunction(new RotaryEncoder(this, RADAR_ALTIMETER, BUTTON_1, "91", 0.1d, "Radar Altimeter", "Dangerous RALT set rotary"));
            AddFunction(new FlagValue(this, "92", "Radar Altimeter", "Dangerous altitude indicator", ""));
            AddFunction(new PushButton(this, RADAR_ALTIMETER, BUTTON_2, "96", "Radar Altimeter", "Test Button"));

            // Indicator Air Speed
            AddFunction(new ScaledNetworkValue(this, "51", 350d, "IAS", "Indicated Airspeed", "Airspeed gauge", "", BindingValueUnits.KilometersPerHour));

            // Accelerometer
            AddFunction(new ScaledNetworkValue(this, "97", 6d, "Accelerometer", "Acceleration", "Current gs", "", BindingValueUnits.Numeric, -2d, "%0.2f"));
            AddFunction(new ScaledNetworkValue(this, "98", 6d, "Accelerometer", "Maxium acceleration", "Max Gs attained.", "", BindingValueUnits.Numeric, -2d, "%0.2f"));
            AddFunction(new ScaledNetworkValue(this, "99", 6d, "Accelerometer", "Minimum acceleration", "Min Gs attained.", "", BindingValueUnits.Numeric, -2d, "%0.2f"));
            AddFunction(new PushButton(this, CPT_MECH, BUTTON_6, "572", "Accelerometer", "Reset"));

            // Lamp Test Button
            AddFunction(new PushButton(this, SYST_CONTROLLER, BUTTON_2, "45", "System Controller", "Lamp Test"));

            // Clock
            AddFunction(new ScaledNetworkValue(this, "68", 12d, "Clock", "Current Time Hours", "Current hour of the simulation time of day.", "", BindingValueUnits.Numeric));
            AddFunction(new ScaledNetworkValue(this, "69", 60d, "Clock", "Current Time Minutes", "Current minute of the simulation time of day.", "", BindingValueUnits.Numeric));
            AddFunction(new ScaledNetworkValue(this, "70", 60d, "Clock", "Current Time Seconds", "Current seconds of the simulation time of day.", "", BindingValueUnits.Numeric));
            AddFunction(new FlagValue(this, "75", "Clock", "Flight Time Indicator", "Indicator light determining whether flight time is engaged."));
            AddFunction(new ScaledNetworkValue(this, "72", 12d, "Clock", "Flight Time Hours", "Current hour of the simulation flight time.", "", BindingValueUnits.Numeric));
            AddFunction(new ScaledNetworkValue(this, "531", 60d, "Clock", "Flight Time Minutes", "Current minute of the simulation flight time.", "", BindingValueUnits.Numeric));
            AddFunction(new ScaledNetworkValue(this, "73", 30d, "Clock", "Stop Watch Minutes", "Current minute of the stop watch.", "", BindingValueUnits.Numeric));
            AddFunction(new ScaledNetworkValue(this, "532", 30d, "Clock", "Stop Watch Seconds", "Current seconds of the stop watch.", "", BindingValueUnits.Numeric));
            #endregion

            #region Right Front Panel
            // EKRAN
            AddFunction(new Text(this, "2004", "EKRAN", "Message", "EKRAN Message Text"));

            // Backup ADI
            AddFunction(new ScaledNetworkValue(this, "142", 180d, "Backup ADI", "roll", "Current roll displayed on the AGR-81 backup ADI.", "(-180 to 180)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "143", -90d, "Backup ADI", "pitch", "Current pitch displayed on the AGR-81 backup ADI.", "(-90 to 90)", BindingValueUnits.Degrees));
            AddFunction(new NetworkValue(this, "144", "Backup ADI", "side slip", "Current amount of side slip displayed on the AGR-81 backup ADI.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new FlagValue(this, "145", "Backup ADI", "warning flag", "Indicates whether the warning flag is displayed on the AGR-81 backup ADI."));
            AddFunction(new RotaryEncoder(this, STBY_ADI, BUTTON_3, "597", 1d, "Backup ADI", "Cage"));
            AddFunction(Switch.CreateToggleSwitch(this, STBY_ADI, BUTTON_4, "230", "1", "On", "0", "Off", "Backup ADI", "Power", "%1d"));

            // Exhaust Gas Test Buttons
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_22, "131", "Engine", "Running EGT Test Button"));
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_23, "132", "Engine", "Stopped EGT Test Button"));

            // Exhaust Gas Gauge
            AddFunction(new ScaledNetworkValue(this, "133", 1200d, "Engine", "Left Engine EGT", "Left engine exhaust gas temperature.", "(0-1200)", BindingValueUnits.Celsius));
            AddFunction(new ScaledNetworkValue(this, "134", 1200d, "Engine", "Right Engine EGT", "Right engine exhaust gas temperature.", "(0-1200)", BindingValueUnits.Celsius));

            // Engine RPM
            AddFunction(new ScaledNetworkValue(this, "135", 110d, "Engine", "Left Engine RPM", "Left engine RPM.", "(0-110%) 100% = 19,537RPM", BindingValueUnits.RPMPercent));
            AddFunction(new ScaledNetworkValue(this, "136", 110d, "Engine", "Right Engine RPM", "Right engine RPM.", "(0-110%) 100% = 19,537RPM", BindingValueUnits.RPMPercent));

            // Fuel Gauge
            AddFunction(new ScaledNetworkValue(this, "138", 800d, "Fuel System", "Forward Tank Fuel Quantity", "Forward tank quantity.", "Max 705kg", BindingValueUnits.Kilograms));
            AddFunction(new ScaledNetworkValue(this, "137", 800d, "Fuel System", "Rear Tank Fuel Quantity", "Rear tank quantity.", "Max 745kg", BindingValueUnits.Kilograms));
            AddFunction(new FlagValue(this, "139", "Fuel System", "Forward Tank Lamp", "Forward Tank Indicator Lamp"));
            AddFunction(new FlagValue(this, "140", "Fuel System", "Rear Tank Lamp", "Rear Tank Indicator Lamp"));
            AddFunction(new PushButton(this, FUELSYS_INTERFACE, BUTTON_14, "616", "Fuel System", "Self Test Button"));

            // ABRIS
            AddFunction(new PushButton(this, ABRIS, BUTTON_1, "512", "ABRIS", "Button 1"));
            AddFunction(new PushButton(this, ABRIS, BUTTON_2, "513", "ABRIS", "Button 2"));
            AddFunction(new PushButton(this, ABRIS, BUTTON_3, "514", "ABRIS", "Button 3"));
            AddFunction(new PushButton(this, ABRIS, BUTTON_4, "515", "ABRIS", "Button 4"));
            AddFunction(new PushButton(this, ABRIS, BUTTON_5, "516", "ABRIS", "Button 5"));
            AddFunction(new PushButton(this, ABRIS, BUTTON_7, "523", "ABRIS", "Cursor Select"));
            AddFunction(new RotaryEncoder(this, ABRIS, BUTTON_6, "518", 0.04, "ABRIS", "Cursor"));
            AddFunction(new Axis(this, ABRIS, BUTTON_8, "517", 0.05, 0, 1, "ABRIS", "Brightness"));
            AddFunction(new Switch(this, ABRIS, "130", new SwitchPosition[] { new SwitchPosition("1", "On", "3009"), new SwitchPosition("0", "Off", "3009") }, "ABRIS", "Power", "%0.1f"));
            #endregion

            #region Center Panel
            // HUD
            AddFunction(new Axis(this, HUD, BUTTON_1, "8", 0.05d, 0d, 1d, "HUD", "Brightness"));
            AddFunction(new Switch(this, HUD, "9", new SwitchPosition[] { new SwitchPosition("-1", "Night", BUTTON_2), new SwitchPosition("0", "Day", BUTTON_2), new SwitchPosition("1", "Standby", BUTTON_2) }, "HUD", "Modes", "%1d"));
            AddFunction(new PushButton(this, HUD, BUTTON_3, "7", "HUD", "Test"));
            AddFunction(new Switch(this, HUD, "510", new SwitchPosition[] { new SwitchPosition("1", "On", "3004"), new SwitchPosition("0", "Off", "3004") }, "HUD", "Filter", "%0.1f"));

            // PUI-800
            AddFunction(new Switch(this, WEAP_INTERFACE, "387", new SwitchPosition[] { new SwitchPosition("1", "Armed", BUTTON_1), new SwitchPosition("0", "Disarmed", BUTTON_1) }, "PUI-800", "Master Arm", "%1d"));
            AddFunction(new PushButton(this, WEAP_INTERFACE, BUTTON_3, "402", "PUI-800", "External Stores Jettison"));
            AddFunction(new Switch(this, WEAP_INTERFACE, "396", new SwitchPosition[] { new SwitchPosition("1", "Armed", "3022"), new SwitchPosition("0", "Disarmed", "3022") }, "PUI-800", "Jettison Arm Mode", "%1d"));
            AddFunction(new Switch(this, WEAP_INTERFACE, "403", new SwitchPosition[] { new SwitchPosition("1", "Manual", "3005"), new SwitchPosition("0", "Auto", "3005") }, "PUI-800", "Weapon Control Mode", "%1d"));
            AddFunction(new Switch(this, WEAP_INTERFACE, "399", new SwitchPosition[] { new SwitchPosition("1", "HE", "3006"), new SwitchPosition("0", "AP", "3006") }, "PUI-800", "Cannon Round Select", "%1d"));
            AddFunction(new Switch(this, WEAP_INTERFACE, "400", new SwitchPosition[] { new SwitchPosition("0.2", "Long", "3004"), new SwitchPosition("0.1", "Medium", "3004"), new SwitchPosition("0.0", "Short", "3004") }, "PUI-800", "Weapon Burst Length", "%0.1f"));
            AddFunction(new Switch(this, WEAP_INTERFACE, "398", new SwitchPosition[] { new SwitchPosition("1", "Low", "3020"), new SwitchPosition("0", "High", "3020") }, "PUI-800", "Cannon Rate of Fire", "%1d"));
            AddFunction(new PushButton(this, WEAP_INTERFACE, BUTTON_21, "397", "PUI-800", "Emergency ATGM launch"));
            AddFunction(new FlagValue(this, "392", "PUI-800", "Station 1 Present Lamp", ""));
            AddFunction(new FlagValue(this, "393", "PUI-800", "Station 2 Present Lamp", ""));
            AddFunction(new FlagValue(this, "394", "PUI-800", "Station 3 Present Lamp", ""));
            AddFunction(new FlagValue(this, "395", "PUI-800", "Station 4 Present Lamp", ""));
            AddFunction(new FlagValue(this, "388", "PUI-800", "Station 1 Ready Lamp", ""));
            AddFunction(new FlagValue(this, "389", "PUI-800", "Station 2 Ready Lamp", ""));
            AddFunction(new FlagValue(this, "390", "PUI-800", "Station 3 Ready Lamp", ""));
            AddFunction(new FlagValue(this, "391", "PUI-800", "Station 4 Ready Lamp", ""));
            AddFunction(new NetworkValue(this, "2001", "PUI-800", "Selected Station Type", "Indicates what type of weapon is on the currently selected stations", "", BindingValueUnits.Text, null));
            AddFunction(new NetworkValue(this, "2002", "PUI-800", "Selected Station Count", "Indicates the number of remaining stores on the currently selected stations", "", BindingValueUnits.Numeric, null));
            AddFunction(new NetworkValue(this, "2003", "PUI-800", "Cannon Rounds", "Indicates the number of remaining cannon rounds for the currently selected ammo type", "", BindingValueUnits.Numeric, null));

            // Targeting Display Control Panel
            AddFunction(new Switch(this, SHKVAL, "404", new SwitchPosition[] { new SwitchPosition("1", "Black", BUTTON_1), new SwitchPosition("0", "White", BUTTON_1) }, "Shkval", "Shkval Inidication Polarity", "%1d"));
            AddFunction(new Axis(this, SHKVAL, BUTTON_2, "406", 0.05d, 0d, 1d, "Shkval", "Brightness"));
            AddFunction(new Axis(this, SHKVAL, BUTTON_3, "407", 0.05d, 0d, 1d, "Shkval", "Contrast"));
            AddFunction(new Axis(this, HELMET, BUTTON_1, "405", 0.05d, 0d, 1d, "HMS", "Brightness"));
            AddFunction(new Switch(this, WEAP_INTERFACE, "408", new SwitchPosition[] { new SwitchPosition("0.0", "1", "3007"), new SwitchPosition("0.1", "2", "3007"), new SwitchPosition("0.2", "3", "3007") }, "Laser", "Laser Code", "%0.1f"));
            AddFunction(new Switch(this, MISC_SYSTEMS_INTERFACE, "409", new SwitchPosition[] { new SwitchPosition("1", "Declutter", BUTTON_1), new SwitchPosition("0", "Full Data", BUTTON_1) }, "Misc", "HUD/TV Declutter", "%1d"));

            // Landing Lights and Voice Warning Control Panel
            AddFunction(new Switch(this, SPOTLIGHT_SYSTEM, "382", new SwitchPosition[] { new SwitchPosition("1.0", "On", BUTTON_1), new SwitchPosition("0.5", "Off", BUTTON_1), new SwitchPosition("0.0", "Retract", BUTTON_1) }, "Landing Light", "On/Off/Retract", "%0.1f"));
            AddFunction(new Switch(this, SPOTLIGHT_SYSTEM, "383", new SwitchPosition[] { new SwitchPosition("0", "Backup", BUTTON_2), new SwitchPosition("1", "Primary", BUTTON_2) }, "Landing Light", "Primary/Backup Select", "%1d"));
            AddFunction(new Switch(this, ARK_22, "381", new SwitchPosition[] { new SwitchPosition("1.0", "Inner", BUTTON_3), new SwitchPosition("0.5", "Auto", BUTTON_3), new SwitchPosition("0.0", "Outer", BUTTON_3) }, "ARK 22", "NDB Select", "%0.2f"));
            AddFunction(new PushButton(this, VMS, BUTTON_1, "384", "VMS", "Cease Message"));
            AddFunction(new PushButton(this, VMS, BUTTON_3, "385", "VMS", "Repeat Message"));
            AddFunction(new Switch(this, VMS, "386", new SwitchPosition[] { new SwitchPosition("1", "Normal", BUTTON_2), new SwitchPosition("0", "Emergency", BUTTON_2) }, "VMS", "Emergency Mode Switch", "%0.1f"));
            AddFunction(new PushButton(this, VMS, BUTTON_4, "442", "VMS", "BIT"));
            #endregion

            #region Landing Gear Panel
            AddFunction(Switch.CreateToggleSwitch(this, CPT_MECH, BUTTON_1, "65", "0", "Up", "1", "Down", "Mechanical", "Gear Lever", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, CPT_MECH, BUTTON_4, "66", BUTTON_5, "67", "1", "0", "0", "Common", "1", "Main", "Mechanical", "Emergency Gear Hydraulic Selector", "%1d"));
            AddFunction(new FlagValue(this, "63", "Mechanical", "Nose Gear Up Indicator", "Lit when the nose gear is in the up position."));
            AddFunction(new FlagValue(this, "64", "Mechanical", "Nose Gear Down Indicator", "Lit whent henose gear is extended."));
            AddFunction(new FlagValue(this, "61", "Mechanical", "Right Gear Up Indicator", "Lit when the nose gear is in the up position."));
            AddFunction(new FlagValue(this, "62", "Mechanical", "Right Gear Down Indicator", "Lit whent henose gear is extended."));
            AddFunction(new FlagValue(this, "59", "Mechanical", "Left Gear Up Indicator", "Lit when the nose gear is in the up position."));
            AddFunction(new FlagValue(this, "60", "Mechanical", "Left Gear Down Indicator", "Lit whent henose gear is extended."));
            #endregion

            #region Overhead Panel Left
            AddFunction(new Switch(this, NAVLIGHT_SYSTEM, "146", new SwitchPosition[] { new SwitchPosition("0.0", "Off", BUTTON_4), new SwitchPosition("0.1", "10%", BUTTON_4), new SwitchPosition("0.2", "30%", BUTTON_4), new SwitchPosition("0.3", "100%", BUTTON_4), new SwitchPosition("0.4", "Signal", BUTTON_5, BUTTON_5, "0.4") }, "Navigation Light System", "Brightness", "%0.1f"));
            AddFunction(new Switch(this, CPT_MECH, "147", new SwitchPosition[] { new SwitchPosition("0.0", "Off", BUTTON_7), new SwitchPosition("0.1", "Fast", BUTTON_7), new SwitchPosition("0.2", "Speed 1", BUTTON_7), new SwitchPosition("0.3", "Speed 2", BUTTON_7), new SwitchPosition("0.4", "Return", BUTTON_8, BUTTON_8, "0.4") }, "Mechanical", "Windshield Wiper Switch", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, CPT_MECH, BUTTON_9, "539", "0", "On", "1", "Off", "Mechanical", "Pitot Static Port and AoA Heat Switch", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, CPT_MECH, BUTTON_10, "151", "0", "On", "1", "Off", "Mechanical", "Pitot Ram Air and Clock Heat Switch", "%1d"));
            AddFunction(new FlagValue(this, "170", "Left Warning Panel", "R-Alt Hold Indicator", "Radar altitude-hold autopilot mode on"));
            AddFunction(new FlagValue(this, "175", "Left Warning Panel", "Auto Hover", "Hover autopilot mode is on"));
            AddFunction(new FlagValue(this, "172", "Left Warning Panel", "Auto Descent", "Controlled descent autopilot mode is on"));
            AddFunction(new FlagValue(this, "165", "Left Warning Panel", "ENR Nav On", "Route navigation with direct flight to steerpoint is enabled"));
            AddFunction(new FlagValue(this, "171", "Left Warning Panel", "ENR Course", "Route navigation with course following is enabled"));
            AddFunction(new FlagValue(this, "176", "Left Warning Panel", "Next WP", "Notification of passing one waypoint and advancing on to the next"));
            AddFunction(new FlagValue(this, "166", "Left Warning Panel", "ENR End", "Last waypoint reached notification; end of fligh plan"));
            AddFunction(new FlagValue(this, "164", "Left Warning Panel", "AC-POS Cal. Data", "Aircraft position is roughly calculated using air data systems information"));
            AddFunction(new FlagValue(this, "178", "Left Warning Panel", "Weap. Arm", "Weapons armed"));
            AddFunction(new FlagValue(this, "173", "Left Warning Panel", "Cannon", "Cannon has been slewed away from boresight position."));
            AddFunction(new FlagValue(this, "177", "Left Warning Panel", "Cannon <>", "Cannon has been slewed downward away from boresight position"));
            AddFunction(new FlagValue(this, "211", "Left Warning Panel", "X-Feed VLV Open", "Fuel is shared between tanks (crossfeed on)"));
            AddFunction(new FlagValue(this, "187", "Left Warning Panel", "Turbo Gear", "Accessory gearbox disconnected from rotor drive"));
            AddFunction(new FlagValue(this, "204", "Left Warning Panel", "AGB Oil Press", "Gearbox oil pressure normal (before start)"));
            AddFunction(new FlagValue(this, "213", "Left Warning Panel", "SL Hook Open", "Sling load lock (hook) is open"));
            #endregion

            #region Magnetic Compass
            AddFunction(new ScaledNetworkValue(this, "11", 360d, "Magnetic Compass", "Course", "Current course displayed on the magnetic compass.", "-360 - 360", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "12", 90d, "Magnetic Compass", "Pitch", "Current pitch of the magnetic compass card.", "-90 - 90", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "14", 180d, "Magnetic Compass", "Bank", "Current bank displayed on the magnetic compass card.", "-180 - 180", BindingValueUnits.Degrees));
            #endregion

            #region Overhad Panel Right
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE_INTERFACE, BUTTON_13, "153", "0", "On", "1", "Off", "Engine", "Rotor De-icing system", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, ENGINE_INTERFACE, BUTTON_14, "154", "1.0", "De-ice", "0.5", "Off", "0.0", "Dust Protection", "Engine", "Enginges De-icing / dust-protection system", "%0.1f"));
            AddFunction(new PushButton(this, CPT_MECH, BUTTON_11, "156", "Mechanical", "Pitot heat system test."));
            AddFunction(new FlagValue(this, "167", "Right Warning Panel", "Master Arm On", "Master is is on"));
            AddFunction(new FlagValue(this, "180", "Right Warning Panel", "Weapon Training", "Training mode for guided weapons is on."));
            AddFunction(new FlagValue(this, "179", "Right Warning Panel", "HMS Fail", "Helment-Mounted Sight malfunction detected."));
            AddFunction(new FlagValue(this, "188", "Right Warning Panel", "HUD Not Ready", "HUD failure or not ready"));
            AddFunction(new FlagValue(this, "189", "Right Warning Panel", "Computer Diagnose", "Onboard computers running in diagnostic mode"));
            AddFunction(new FlagValue(this, "206", "Right Warning Panel", "Computer Fail", "Failure of one or more central computers"));
            AddFunction(new FlagValue(this, "212", "Right Warning Panel", "Inverter On", "Electrical DC/AC inverter is on"));
            AddFunction(new FlagValue(this, "205", "Right Warning Panel", "Shkval Fail", "Shkval targeting system failure detected"));
            AddFunction(new FlagValue(this, "181", "Right Warning Panel", "LH Eng Anti-Ice", "Left enginge de-icing active"));
            AddFunction(new FlagValue(this, "190", "Right Warning Panel", "LH Eng Dust-Prot", "Left enginge dust protection is active"));
            AddFunction(new FlagValue(this, "207", "Right Warning Panel", "LH Power Set Lim", "Left engine has over-speed and was limited by electronic engine governor"));
            AddFunction(new FlagValue(this, "183", "Right Warning Panel", "Rotor Anti-Ice", "Rotor de-icing is active"));
            AddFunction(new FlagValue(this, "182", "Right Warning Panel", "RH Eng Anti-Ice", "Right enginge de-icing active"));
            AddFunction(new FlagValue(this, "191", "Right Warning Panel", "RH Eng Dust-Prot", "Right enginge dust protection is active"));
            AddFunction(new FlagValue(this, "208", "Right Warning Panel", "RH Power Set Lim", "Right engine has over-speed and was limited by electronic engine governor"));
            AddFunction(new FlagValue(this, "184", "Right Warning Panel", "Windshield Heater On", "Windshield heater is on"));
            AddFunction(new FlagValue(this, "200", "Right Warning Panel", "Fwd Tank Pump On", "Forward fuel tank has pressure"));
            AddFunction(new FlagValue(this, "209", "Right Warning Panel", "LH VLV Closed", "Left engine fuel valve is closed"));
            AddFunction(new FlagValue(this, "185", "Right Warning Panel", "LH Outer Tank Pump", "Left outer fuel tank has pressure"));
            AddFunction(new FlagValue(this, "202", "Right Warning Panel", "LH Inner Tank Pump", "Left inner fueld tank has pressure"));
            AddFunction(new FlagValue(this, "201", "Right Warning Panel", "Aft Tank Pump On", "Aft fuel tank has pressure"));
            AddFunction(new FlagValue(this, "210", "Right Warning Panel", "RH VLV Closed", "Right engine fuel valve is closed"));
            AddFunction(new FlagValue(this, "186", "Right Warning Panel", "RH Outer Tank Pump", "Right outer fuel tank has pressure"));
            AddFunction(new FlagValue(this, "203", "Right Warning Panel", "RH Inner Tank Pump", "Right inner fueld tank has pressure"));
            #endregion

            #region Data Link
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_1, "159", "Datalink", "Send/Memory"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_2, "150", "Datalink", "Ingress to Target"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_3, "161", "Datalink", "Erase"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_4, "15", "Datalink", "Blank Button"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_5, "16", "Datalink", "To All"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_6, "17", "Datalink", "To Wingman 1"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_7, "18", "Datalink", "To Wingman 2"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_8, "19", "Datalink", "To Wingman 3"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_9, "20", "Datalink", "To Wingman 4"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_10, "21", "Datalink", "Target #1/Vehicle"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_11, "22", "Datalink", "Target #2/SAM"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_12, "23", "Datalink", "Target #3/Other"));
            AddFunction(new IndicatorPushButton(this, DATALINK, BUTTON_13, "50", "Datalink", "Ingress Point"));
            #endregion

            #region Laser Warning Receiver
            AddFunction(new PushButton(this, LASER_WARNING_SYSTEM, BUTTON_1, "35", "Laser Warning Receiver", "Reset Button"));
            AddFunction(new FlagValue(this, "25", "Laser Warning Receiver", "Bearing Forward", "On when laser energy is detect from forwad of the aircaft"));
            AddFunction(new FlagValue(this, "28", "Laser Warning Receiver", "Bearing Right", "On when laser energy is detect from right of the aircaft"));
            AddFunction(new FlagValue(this, "26", "Laser Warning Receiver", "Bearing Aft", "On when laser energy is detect from aft of the aircaft"));
            AddFunction(new FlagValue(this, "27", "Laser Warning Receiver", "Bearing Left", "On when laser energy is detect from left of the aircaft"));
            AddFunction(new FlagValue(this, "31", "Laser Warning Receiver", "Hemisphere Above", "On when laser energy is detect from above of the aircaft"));
            AddFunction(new FlagValue(this, "32", "Laser Warning Receiver", "Hemisphere Below", "On when laser energy is detect from below of the aircaft"));
            AddFunction(new FlagValue(this, "33", "Laser Warning Receiver", "Range Finder", "On if laster is of sufficient strength for range"));
            AddFunction(new FlagValue(this, "34", "Laser Warning Receiver", "Guidance", "On when laser energy is detected to being guided to the aircraft"));
            AddFunction(Switch.CreateToggleSwitch(this, LASER_WARNING_SYSTEM, BUTTON_2, "583", "1", "On", "0", "Off", "Laser Warning Receiver", "Power", "%1d"));
            AddFunction(new PushButton(this, LASER_WARNING_SYSTEM, BUTTON_3, "584", "Laser Warning Receiver", "Self Test Button"));
            AddFunction(new FlagValue(this, "582", "Laser Warning Receiver", "Ready Lamp", "Lit when LWS is warmed up and operating."));
            #endregion

            #region Countermeasures
            AddFunction(Switch.CreateThreeWaySwitch(this, UV_26, BUTTON_1, "36", "0.0", "Left", "0.1", "Both", "0.2", "Right", "UV-26 CMD", "Release Select Switch", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, UV_26, BUTTON_3, "37", "0.0", "Remaining", "0.1", "Program", "UV-26 CMD", "Display Switch", "%0.1f"));
            AddFunction(new PushButton(this, UV_26, BUTTON_4, "38", "UV-26 CMD", "Num of sequences"));
            AddFunction(new PushButton(this, UV_26, BUTTON_5, "39", "UV-26 CMD", "Num in sequence"));
            AddFunction(new PushButton(this, UV_26, BUTTON_6, "41", "UV-26 CMD", "Dispence interval"));
            AddFunction(new PushButton(this, UV_26, BUTTON_7, "43", "UV-26 CMD", "Start dispense"));
            AddFunction(new PushButton(this, UV_26, BUTTON_8, "42", "UV-26 CMD", "Reset to default program"));
            AddFunction(new PushButton(this, UV_26, BUTTON_9, "40", "UV-26 CMD", "Stop dispense"));
            AddFunction(new FlagValue(this, "541", "UV-26 CMD", "Left Dispense Lamp", "Lit when set to dispense from left dispenser"));
            AddFunction(new FlagValue(this, "542", "UV-26 CMD", "Right Dispense Lamp", "Lit when set to dispense from right dispenser"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, UV_26, BUTTON_10, "496", BUTTON_11, "497", "1", "0", "1", "On", "0", "Off", "UV-26 CMD", "Power", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, UV_26, BUTTON_12, "498", BUTTON_13, "499", "1", "0", "1", "On", "0", "Off", "UV-26 CMD", "Test", "%1d"));
            #endregion

            #region PVI-800
            AddFunction(new PushButton(this, PVI, BUTTON_1, "312", "PVI-800 Control Panel", "0", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_2, "303", "PVI-800 Control Panel", "1", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_3, "304", "PVI-800 Control Panel", "2", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_4, "305", "PVI-800 Control Panel", "3", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_5, "306", "PVI-800 Control Panel", "4", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_6, "307", "PVI-800 Control Panel", "5", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_7, "308", "PVI-800 Control Panel", "6", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_8, "309", "PVI-800 Control Panel", "7", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_9, "310", "PVI-800 Control Panel", "8", "0.2", "0.0", "%0.1f"));
            AddFunction(new PushButton(this, PVI, BUTTON_10, "311", "PVI-800 Control Panel", "9", "0.2", "0.0", "%0.1f"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_11, "315", "PVI-800 Control Panel", "Waypoints"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_12, "519", "PVI-800 Control Panel", "INU Realignment"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_13, "316", "PVI-800 Control Panel", "Fixpoints"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_14, "520", "PVI-800 Control Panel", "Precise INU Alignment"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_15, "317", "PVI-800 Control Panel", "Airfields"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_16, "521", "PVI-800 Control Panel", "Normal INU Alignment"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_17, "318", "PVI-800 Control Panel", "Targets"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_18, "313", "PVI-800 Control Panel", "Enter"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_19, "314", "PVI-800 Control Panel", "Cancel"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_20, "522", "PVI-800 Control Panel", "Initial Nav Points"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_21, "319", "PVI-800 Control Panel", "Self coordinates"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_22, "320", "PVI-800 Control Panel", "Course Deviation/Time/Range"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_23, "321", "PVI-800 Control Panel", "Wind Heading/Speed"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_24, "322", "PVI-800 Control Panel", "True Heading/Time/Range"));
            AddFunction(new IndicatorPushButton(this, PVI, BUTTON_25, "323", "PVI-800 Control Panel", "Bearing/Range"));
            AddFunction(new Switch(this, PVI, "324", new SwitchPosition[] { new SwitchPosition("0.0", "Off", BUTTON_26), new SwitchPosition("0.1", "Verification", BUTTON_26), new SwitchPosition("0.2", "Edit", BUTTON_26), new SwitchPosition("0.3", "Operation", BUTTON_26), new SwitchPosition("0.4", "Simulate", BUTTON_26), new SwitchPosition("0.5", "K-1", BUTTON_26), new SwitchPosition("0.6", "K-2", BUTTON_26) }, "PVI-800 Control Panel", "Master Mode", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, PVI, BUTTON_28, "325", "1", "Shkval", "1", "Fly Over", "PVI-800 Control Panel", "INU fixtaking method", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, PVI, BUTTON_29, "326", "1", "On", "0", "Off", "PVI-800 Control Panel", "Datalink power", "%1d"));
            AddFunction(new Axis(this, PVI, BUTTON_29, "327", 0.001, 0d, 1d, "PVI-800 Control Panel", "Brightness"));
            #endregion

            #region PVTz-800 Data Link Mode Panel
            AddFunction(new Switch(this, DATALINK, "328", new SwitchPosition[] { new SwitchPosition("0.0", "1", BUTTON_14), new SwitchPosition("0.1", "2", BUTTON_14), new SwitchPosition("0.2", "3", BUTTON_14), new SwitchPosition("0.3", "4", BUTTON_14) }, "PVTz-800 Data Link", "Self Id", "%0.1f"));
            AddFunction(new Switch(this, DATALINK, "329", new SwitchPosition[] { new SwitchPosition("0.0", "Disable", BUTTON_15), new SwitchPosition("0.1", "Receive", BUTTON_15), new SwitchPosition("0.2", "Wingman", BUTTON_15), new SwitchPosition("0.3", "Commander", BUTTON_15) }, "PVTz-800 Data Link", "Data Mode", "%0.1f"));
            #endregion

            #region Autopilot Panel
            AddFunction(new IndicatorPushButton(this, AUTOPILOT, BUTTON_1, "330", "Autopilot", "Bank Hold"));
            AddFunction(new IndicatorPushButton(this, AUTOPILOT, BUTTON_2, "332", "Autopilot", "Heading Hold"));
            AddFunction(new IndicatorPushButton(this, AUTOPILOT, BUTTON_3, "331", "Autopilot", "Pitch Hold"));
            AddFunction(new IndicatorPushButton(this, AUTOPILOT, BUTTON_4, "333", "Autopilot", "Altitude hold"));
            AddFunction(new IndicatorPushButton(this, AUTOPILOT, BUTTON_5, "334", "Autopilot", "Flight Director"));
            AddFunction(Switch.CreateThreeWaySwitch(this, AUTOPILOT, BUTTON_6, "335", "0.0", "Barometric", "0.5", "N/A", "1.0", "Radar", "Autopilot", "Altitude Source", "%0.1f"));
            AddFunction(Switch.CreateThreeWaySwitch(this, AUTOPILOT, BUTTON_7, "336", "0.0", "Desired Heading", "0.5", "N/A", "1.0", "Desired Track", "Autopilot", "Autopilot Heading/Course", "%0.1f"));
            #endregion

            #region ADF ARK-22
            AddFunction(new PushButton(this, ARK_22, BUTTON_7, "355", "ARK 22", "Test Button"));
            AddFunction(Switch.CreateToggleSwitch(this, ARK_22, BUTTON_5, "354", "0", "Telephone", "1", "Telegraph", "ARK 22", "NDB Mode Switch", "%1d"));
            AddFunction(new Axis(this, ARK_22, BUTTON_7, "353", 0.05, 0d, 1d, "ARK 22", "Volume"));
            AddFunction(Switch.CreateToggleSwitch(this, ARK_22, BUTTON_4, "356", "0", "Compass", "1", "Antenna", "ARK 22", "ADF Mode", "%1d"));
            AddFunction(new Switch(this, ARK_22, "357", new SwitchPosition[] { new SwitchPosition("0.0", "1", BUTTON_2), new SwitchPosition("0.1", "2", BUTTON_2), new SwitchPosition("0.2", "3", BUTTON_2), new SwitchPosition("0.3", "4", BUTTON_2), new SwitchPosition("0.4", "5", BUTTON_2), new SwitchPosition("0.5", "6", BUTTON_2), new SwitchPosition("0.6", "7", BUTTON_2), new SwitchPosition("0.7", "8", BUTTON_2), new SwitchPosition("0.8", "9", BUTTON_2), new SwitchPosition("0.9", "10", BUTTON_2) }, "ARK 22", "Channel", "%0.1f"));
            #endregion

            #region R-828
            AddFunction(new Switch(this, R_828, "371", new SwitchPosition[] { new SwitchPosition("0.0", "1", BUTTON_1), new SwitchPosition("0.1", "2", BUTTON_1), new SwitchPosition("0.2", "3", BUTTON_1), new SwitchPosition("0.3", "4", BUTTON_1), new SwitchPosition("0.4", "5", BUTTON_1), new SwitchPosition("0.5", "6", BUTTON_1), new SwitchPosition("0.6", "7", BUTTON_1), new SwitchPosition("0.7", "8", BUTTON_1), new SwitchPosition("0.8", "9", BUTTON_1), new SwitchPosition("0.9", "10", BUTTON_1) }, "R-828 VHF-1 Radio", "Channel", "%0.1f"));
            AddFunction(new Axis(this, R_828, BUTTON_2, "372", 0.05d, 0d, 1d, "R-828 VHF-1 Radio", "Volume"));
            AddFunction(new PushButton(this, R_828, BUTTON_3, "373", "R-828 VHF-1 Radio", "Tuner Button"));
            AddFunction(Switch.CreateToggleSwitch(this, R_828, BUTTON_4, "374", "1", "On", "0", "Off", "R-828 VHF-1 Radio", "Squelch", "%1d"));
            AddFunction(new FlagValue(this, "375", "R-828 VHF-1 Radio", "Tuner Lamp", "Lit if R828 is under power and the automatic tuner button is pressed and radio has not been tuned."));
            #endregion

            #region Signal Flares
            AddFunction(new PushButton(this, SIGNAL_FLARE_DISPENSER, BUTTON_2, "376", "Signal Flares", "Fire Red"));
            AddFunction(new PushButton(this, SIGNAL_FLARE_DISPENSER, BUTTON_1, "377", "Signal Flares", "Fire Green"));
            AddFunction(new PushButton(this, SIGNAL_FLARE_DISPENSER, BUTTON_3, "378", "Signal Flares", "Fire White"));
            AddFunction(new PushButton(this, SIGNAL_FLARE_DISPENSER, BUTTON_4, "379", "Signal Flares", "Fire Yellow"));
            AddFunction(Switch.CreateToggleSwitch(this, SIGNAL_FLARE_DISPENSER, BUTTON_5, "380", "1", "On", "0", "Off", "Signal Flares", "Power", "%1d"));
            #endregion

            #region R-800 Panel
            AddFunction(new FlagValue(this, "419", "R-800 VHF-2 Radio", "Test Lamp", "Lit while test button is held down."));
            AddFunction(new PushButton(this, R_800, BUTTON_1, "418", "R-800 VHF-2 Radio", "Test Button"));
            AddFunction(Switch.CreateToggleSwitch(this, R_800, BUTTON_2, "417", "1", "AM", "0", "FM", "R-800 VHF-2 Radio", "AM/FM Switch", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, R_800, BUTTON_3, "421", "1", "Emergency", "0", "Normal", "R-800 VHF-2 Radio", "Emergency Mode", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, R_800, BUTTON_4, "422", "1", "ADF", "0", "Normal", "R-800 VHF-2 Radio", "ADF Switch", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, R_800, BUTTON_5, "420", "1", "100", "0", "50", "R-800 VHF-2 Radio", "Data Rate Switch", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, R_800, BUTTON_6, "423", "1", "On", "0", "Off", "R-800 VHF-2 Radio", "Squelch", "%1d"));
            AddFunction(new RotaryEncoder(this, R_800, BUTTON_7, "-1", 1, "R-800 VHF-2 Radio", "1st Rotary"));
            AddFunction(new RotaryEncoder(this, R_800, BUTTON_8, "-1", 1, "R-800 VHF-2 Radio", "2nd Rotary"));
            AddFunction(new RotaryEncoder(this, R_800, BUTTON_9, "-1", 1, "R-800 VHF-2 Radio", "3rd Rotary"));
            AddFunction(new RotaryEncoder(this, R_800, BUTTON_10, "-1", 1, "R-800 VHF-2 Radio", "4th Rotary"));
            AddFunction(new Functions.VHF2Rotary1(this, "577", "R-800 VHF-2 Radio", "1st Rotary Window"));
            AddFunction(new Functions.VHF2Rotary23(this, "574", "R-800 VHF-2 Radio", "2nd Rotoary Window"));
            AddFunction(new Functions.VHF2Rotary23(this, "575", "R-800 VHF-2 Radio", "3rd Rotoary Window"));
            AddFunction(new Functions.VHF2Rotary4(this, "576", "R-800 VHF-2 Radio", "4th Rotary Window"));
            #endregion

            #region Targeting Mode Control Panel
            AddFunction(Switch.CreateToggleSwitch(this, WEAP_INTERFACE, BUTTON_9, "432", "1", "Training", "0", "Off", "Targeting Mode Control", "Training Mode", "%1d"));
            AddFunction(new IndicatorPushButton(this, WEAP_INTERFACE, BUTTON_10, "437", "Targeting Mode Control", "Automatic Turn on Target"));
            AddFunction(new IndicatorPushButton(this, WEAP_INTERFACE, BUTTON_11, "438", "Targeting Mode Control", "Airborne Target"));
            AddFunction(new IndicatorPushButton(this, WEAP_INTERFACE, BUTTON_12, "439", "Targeting Mode Control", "Head On Airborne Target"));
            AddFunction(new IndicatorPushButton(this, WEAP_INTERFACE, BUTTON_13, "440", "Targeting Mode Control", "Moving Ground Target"));
            AddFunction(new Switch(this, WEAP_INTERFACE, "431", new SwitchPosition[] { new SwitchPosition("0.0", "Moving Cannon", BUTTON_14), new SwitchPosition("0.1", "Fixed Cannon", BUTTON_14), new SwitchPosition("0.2", "Backup/Manual", BUTTON_14), new SwitchPosition("0.3", "Backup  Navigation", BUTTON_14), new SwitchPosition("0.4", "Backup Combat", BUTTON_14) }, "Targeting Control Mode", "Weapons System Mode", "%0.1f"));
            AddFunction(new IndicatorPushButton(this, WEAP_INTERFACE, BUTTON_16, "441", "Targeting Mode Control", "Mode Reset"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAP_INTERFACE, BUTTON_17, "436", "1", "Automatic", "0", "Gun sight", "Targeting Mode Control", "Tracking mode", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, K041, BUTTON_2, "433", "1", "On", "0", "Off", "Targeting Mode Control", "K-041 Power", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, LASERRANGER, BUTTON_1, "435", "1", "On", "0", "Off", "Targeting Mode Control", "Laser standby", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, HELMET, BUTTON_2, "434", "1", "On", "0", "Off", "Targeting Mode Control", "HMS Power", "%1d"));
            #endregion

            #region Engine/APU Start-Up
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_5, "412", "Engine", "Start Selected Engine"));
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_6, "413", "Engine", "Interrupt start-up"));
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_7, "414", "Engine", "Stop APU"));
            AddFunction(Switch.CreateThreeWaySwitch(this, ENGINE_INTERFACE, BUTTON_12, "415", "0.0", "Start", "0.1", "Crank", "0.2", "False Start", "Engine", "Start-up Mode", "%0.1f"));
            AddFunction(new Switch(this, ENGINE_INTERFACE, "416", new SwitchPosition[] { new SwitchPosition("0.0", "APU", BUTTON_8), new SwitchPosition("0.1", "Left Engine", BUTTON_8), new SwitchPosition("0.2", "Right Engine", BUTTON_8), new SwitchPosition("0.3", "Turbo Gear", BUTTON_8) }, "Engine", "Engine Selector", "%0.1f"));
            AddFunction(new FlagValue(this, "163", "Engine", "Start Valve Lamp", "Lit when the start valve of the engine air-start is open."));
            #endregion

            #region Intercom Panel
            AddFunction(Switch.CreateRotarySwitch(this, SPU_9, BUTTON_2, "428", "SPU-9 Intercom", "Source Select", "%0.2f", new string[] { "0.00", "VHF-2", "0.11", "VHF-1", "0.22", "SW", "0.33", "Ground" }));
            #endregion

            #region APU Panel
            AddFunction(new FlagValue(this, "162", "APU", "Valve Open Indicator", "Lit when APU fuel shoutoff valve is open"));
            AddFunction(new FlagValue(this, "168", "APU", "Oil Pressure Indicator", "Lit when APU oil pressure is within acceptable limits"));
            AddFunction(new FlagValue(this, "169", "APU", "Stopped By RPM Indicator", "Lit when APU has shutdown due to over-revvign state."));
            AddFunction(new FlagValue(this, "174", "APU", "Operate Inddicator", "Lit when the APU has been started successfully."));
            AddFunction(new ScaledNetworkValue(this, "6", 900d, "APU", "Temperature", "Exhaust gas temperature of the APU", "0-900", BindingValueUnits.Celsius));
            #endregion

            #region Misc Engine Stuff
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE_INTERFACE, BUTTON_9, "554", "1", "Open", "0", "Closed", "Engine", "Left engine cut-off valve", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE_INTERFACE, BUTTON_10, "555", "1", "Open", "0", "Closed", "Engine", "Right engine cut-off valve", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE_INTERFACE, BUTTON_11, "556", "1", "On", "0", "Off", "Engine", "Rotor Brake", "%1d"));
            #endregion

            #region Misc Stuff
            AddFunction(Switch.CreateRotarySwitch(this, SHKVAL, BUTTON_6, "301", "Shkval", "Scan Rate", "%0.1f", new string[] { "0.0", "0.25", "0.1", "0.5", "0.2", "0.75", "0.3", "1.0", "0.4", "1.5", "0.5", "2.0", "0.6", "2.5", "0.7", "3" }));
            AddFunction(new PushButton(this, SHKVAL, BUTTON_7, "224", "Shkval", "Wiper"));
            #endregion

            #region Ground Power Indicators
            AddFunction(new FlagValue(this, "586", "Electrical", "AC Ground Power Indicator", "Lit when AC Ground power is on."));
            AddFunction(new FlagValue(this, "261", "Electrical", "DC Ground Power Indicator", "Lit when DC Ground power is on."));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, ELEC_INTERFACE, BUTTON_1, "262", BUTTON_2, "263", "1", "0", "1", "On", "0", "Off", "Electrical", "Ground DC Power", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, ELEC_INTERFACE, BUTTON_3, "543", BUTTON_4, "544", "1", "0", "1", "On", "0", "Off", "Electrical", "Battery 2", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, ELEC_INTERFACE, BUTTON_5, "264", BUTTON_6, "265", "1", "0", "1", "On", "0", "Off", "Electrical", "Battery 1", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ELEC_INTERFACE, BUTTON_7, "267", "1", "On", "0", "Off", "Electrical", "AC Ground Power", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ELEC_INTERFACE, BUTTON_8, "268", "1", "On", "0", "Off", "Electrical", "AC Left Generator", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ELEC_INTERFACE, BUTTON_9, "269", "1", "On", "0", "Off", "Electrical", "AC Right Generator", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, ELEC_INTERFACE, BUTTON_10, "270", "0.2", "Auto", "0.1", "Off", "0.0", "Manual", "Electrical", "DC/AC Inverter", "%01.f"));
            #endregion

            #region Fuel Pumps
            AddFunction(Switch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_1, "271", "1", "On", "0", "Off", "Fuel System", "Forward Fuel Tank Pumps", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_2, "272", "1", "On", "0", "Off", "Fuel System", "Rear Fuel Tank Pumps", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_3, "273", "1", "On", "0", "Off", "Fuel System", "Inner External Fuel Tank Pumps", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_4, "274", "1", "On", "0", "Off", "Fuel System", "Outer External Fuel Tank Pumps", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_5, "275", "1", "On", "0", "Off", "Fuel System", "Fuel Meter power", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_6, "276", BUTTON_7, "277", "1", "0", "1", "On", "0", "Off", "Fuel System", "Left Engine Fuel Shutoff Valve", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_8, "278", BUTTON_9, "279", "1", "0", "1", "On", "0", "Off", "Fuel System", "Right Engine Fuel Shutoff Valve", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_10, "280", BUTTON_11, "281", "1", "0", "1", "On", "0", "Off", "Fuel System", "APU Fuel Shutoff Valve", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, FUELSYS_INTERFACE, BUTTON_12, "282", BUTTON_13, "283", "1", "0", "1", "On", "0", "Off", "Fuel System", "Fuel Crossfeed Valve", "%1d"));
            #endregion

            #region Comms Power
            AddFunction(Switch.CreateToggleSwitch(this, SPU_9, BUTTON_1, "284", "1", "On", "0", "Off", "SPU-9 Intercom", "Power", "%1d"));
            //elements["COMM-PWR-UKV-1-PTR"]		= {class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("VHF-1 (R828) power switch"), device = devices.R_828, action = {device_commands.Button_5,device_commands.Button_5}, arg = {285,285}, arg_value = {-direction*1.0,direction*1.0}, arg_lim =  {{0, 1},{0, 1}}, use_OBB = true, updatable = true}
            AddFunction(Switch.CreateToggleSwitch(this, R_828, BUTTON_5, "285", "1", "On", "0", "Off", "R-828 VHF-1 Radio", "Power", "%1d"));
            // elements["COMM-PWR-UKV-2-PTR"]		= {class = {class_type.TUMB,class_type.TUMB}, hint = LOCALIZE("VHF-2 (R-800) power switch"), device = devices.R_800, action = {device_commands.Button_11,device_commands.Button_11}, arg = {286,286}, arg_value = {-direction*1.0,direction*1.0}, arg_lim = {{0, 1},{0, 1}}, use_OBB = true, updatable = true}
            AddFunction(Switch.CreateToggleSwitch(this, R_800, BUTTON_11, "286", "1", "On", "0", "Off", "R-800 VHF-2 Radio", "Power", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, DATALINK, BUTTON_17, "287", "1", "On", "0", "Off", "Datalink", "TLK Power", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, DATALINK, BUTTON_18, "288", "1", "On", "0", "Off", "Datalink", "UHF TLK Power", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, "0", BUTTON_7, "289", "1", "On", "0", "Off", "Datalink", "SA-TLF Power", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, WEAP_INTERFACE, BUTTON_18, "547", BUTTON_19, "548", "1", "0", "1", "On", "0", "Off", "Weapon System", "Power", "%1d"));
            #endregion

            #region Ejection System
            AddFunction(Switch.CreateToggleSwitch(this, EJECT_SYS_INTERFACE, BUTTON_1, "214", "0", "On", "1", "Off", "Ejection System", "Power 1", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, EJECT_SYS_INTERFACE, BUTTON_2, "215", "0", "On", "1", "Off", "Ejection System", "Power 2", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, EJECT_SYS_INTERFACE, BUTTON_3, "216", "0", "On", "1", "Off", "Ejection System", "Power 3", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, EJECT_SYS_INTERFACE, BUTTON_4, "217", "0", "Up", "1", "Down", "Ejection System", "Power Cover", "%1d"));
            AddFunction(Switch.CreateRotarySwitch(this, EJECT_SYS_INTERFACE, BUTTON_5, "462", "Ejection System", "Circuit Selector", "%0.1f", new string[] { "0.0", "1", "0.1", "2", "0.2", "3", "0.3", "4", "0.4", "5", "0.5", "6", "0.6", "7" }));
            AddFunction(new PushButton(this, EJECT_SYS_INTERFACE, BUTTON_6, "460", "Ejection System", "Circuit Test"));
            AddFunction(new FlagValue(this, "461", "Ejection System", "Check Lamp", "")); 
            #endregion

            #region Misc Power
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, HYDRO_SYS_INTERFACE, BUTTON_1, "220", BUTTON_2, "221", "1", "0", "1", "On", "0", "Off", "Hydraulics", "Power", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, IFF, BUTTON_1, "218", BUTTON_2, "219", "1", "0", "1", "On", "0", "Off", "IFF", "Power", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, K041, BUTTON_1, "222", "1", "On", "0", "Off", "Navigation System", "Power", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, NAV_INTERFACE, BUTTON_1, "229", "0.0", "Gyro", "0.1", "Magnetic", "0.2", "Manual", "Navigation System", "Heading Source", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, NAVLIGHT_SYSTEM, BUTTON_3, "228", "1", "On", "0", "Off", "Navigation Light System", "Anti-Collision Beacon", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, NAVLIGHT_SYSTEM, BUTTON_1, "296", "1", "On", "0", "Off", "Navigation Light System", "Rotor Tip Lights", "%1d"));
            AddFunction(new Switch(this, NAVLIGHT_SYSTEM, "297", new SwitchPosition[] { new SwitchPosition("0.0", "Off", BUTTON_2), new SwitchPosition("0.1", "10%", BUTTON_2), new SwitchPosition("0.2", "30%", BUTTON_2), new SwitchPosition("0.3", "100%", BUTTON_2) }, "Navigation Light System", "Formation Lights", "%0.1f")); 
            #endregion

            #region Engines
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, ENGINE_INTERFACE, BUTTON_1, "290", BUTTON_2, "291", "1", "0", "1", "On", "0", "Off", "Engine", "Left EEG", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, ENGINE_INTERFACE, BUTTON_3, "292", BUTTON_4, "293", "1", "0", "1", "On", "0", "Off", "Engine", "Right EEG", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, ENGINE_INTERFACE, BUTTON_15, "294", BUTTON_16, "569", "1", "0", "1", "Test", "0", "Operate", "Engine", "EEG Gas Generator Test", "%1d"));
            AddFunction(GuardedSwitch.CreateThreeWaySwitch(this, ENGINE_INTERFACE, BUTTON_17, "295", BUTTON_18, "570", "1", "0", "0.2", "PT-2 Test", "0.1", "Operate", "0.0", "PT-1 Test", "Engine", "EEG Power Turbine Test", "%0.1f"));
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_19, "457", "Engine", "Left EGT Governor Button"));
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_20, "458", "Engine", "Right EGT Governor Button"));
            AddFunction(new PushButton(this, ENGINE_INTERFACE, BUTTON_21, "459", "Engine", "Vibrations Monitoring System Button"));
            AddFunction(Switch.CreateToggleSwitch(this, ILLUMINATION_INTERFACE, BUTTON_1, "300", "1", "On", "0", "Off", "Lighting", "Panel Lights", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ILLUMINATION_INTERFACE, BUTTON_7, "299", "1", "On", "0", "Off", "Lighting", "Night Vision Lighting", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ILLUMINATION_INTERFACE, BUTTON_3, "298", "1", "On", "0", "Off", "Lighting", "ADI & SAI Lights", "%1d"));
            #endregion

            #region Fire Extinguishers Controls
            AddFunction(new PushButton(this, FIRE_EXTING_INTERFACE, BUTTON_1, "236", "Fire Extinguishers", "Left Engine"));
            AddFunction(new PushButton(this, FIRE_EXTING_INTERFACE, BUTTON_2, "238", "Fire Extinguishers", "APU"));
            AddFunction(new PushButton(this, FIRE_EXTING_INTERFACE, BUTTON_3, "240", "Fire Extinguishers", "Right Engine"));
            AddFunction(new PushButton(this, FIRE_EXTING_INTERFACE, BUTTON_4, "242", "Fire Extinguishers", "Ventilator"));
            AddFunction(GuardedSwitch.CreateThreeWaySwitch(this, FIRE_EXTING_INTERFACE, BUTTON_5, "248", BUTTON_7, "249", "1", "0", "0.2", "Work", "0.1", "Off", "0.0", "Test", "Fire Extinguishers", "Work/Off/Test", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, FIRE_EXTING_INTERFACE, BUTTON_8, "250", "1", "Warn", "0", "Off", "Fire Extinguishers", "Signaling", "%1d"));
            AddFunction(GuardedSwitch.CreateToggleSwitch(this, FIRE_EXTING_INTERFACE, BUTTON_9, "246", BUTTON_10, "247", "1", "0", "0", "Manual", "1", "Auto", "Fire Extinguishers", "Mode Select", "%1d"));
            AddFunction(new FlagValue(this, "237", "Fire Extinguishers", "Left Engine Fire Indicator", "Lit when a fire has been detected in the left enigne bay."));
            AddFunction(new FlagValue(this, "239", "Fire Extinguishers", "APU Fire Indicator", "Lit when a fire has been detected in the APU bay."));
            AddFunction(new FlagValue(this, "568", "Fire Extinguishers", "Hydraulics Fire Indicator", "Lit when a high temperature has been detected in the hydraulics bay."));
            AddFunction(new FlagValue(this, "241", "Fire Extinguishers", "Right Engine Fire Indicator", "Lit when a fire has been detected in the right engine bay."));
            AddFunction(new FlagValue(this, "243", "Fire Extinguishers", "Ventilator Fire Indicator", "Lit if a high temperature has been detected in the oil-coolers compartment."));
            AddFunction(new FlagValue(this, "244", "Fire Extinguishers", "Bottle 1 Indicator", "Lit when bottle 1 is charged and ready for use."));
            AddFunction(new FlagValue(this, "245", "Fire Extinguishers", "Bottle 2 Indicator", "Lit when bottle 2 is charged and ready for use."));
            AddFunction(new PushButton(this, FIRE_EXTING_INTERFACE, BUTTON_11, "251", "Fire Extinguishers", "Test Indicator Group 1", "0.1", "0.0", null));
            AddFunction(new PushButton(this, FIRE_EXTING_INTERFACE, BUTTON_12, "251", "Fire Extinguishers", "Test Indicator Group 2", "0.2", "0.0", null));
            AddFunction(new PushButton(this, FIRE_EXTING_INTERFACE, BUTTON_13, "251", "Fire Extinguishers", "Test Indicator Group 3", "0.3", "0.0", null));
            #endregion

            // TODO Misc
            AddFunction(new Switch(this, ENGINE_INTERFACE, "258", new SwitchPosition[] { new SwitchPosition("0.0", "Left Hand", BUTTON_24, BUTTON_25, "0.1"), new SwitchPosition("0.1", "Center", null), new SwitchPosition("0.2", "Right Hand", BUTTON_24, BUTTON_25, "0.1") }, "Engine", "GearBox Reducing Oil Pressure Indicator", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, MISC_SYSTEMS_INTERFACE, BUTTON_4, "259", "1", "Auto", "0", "Manual", "Misc", "Sling Load Auto/Manual", "%1d"));

            #region Read Pre-flight Panel
            AddFunction(Switch.CreateRotarySwitch(this, PPK, BUTTON_1, "483", "PPK", "ATGM Temperature Selector", "%0.1f", new string[] {"0.0", "0", "0.1", "1", "0.2", "2",
                "0.3", "3", "0.4", "4", "0.5", "5", "0.6", "6", "0.7", "7", "0.8", "8", "0.9", "9", "1.0", "10" }));
            AddFunction(Switch.CreateRotarySwitch(this, WEAP_INTERFACE, BUTTON_23, "484", "PUI-800", "Unguided Ballistics Selector", "%0.1f", new string[] {"0.0", "0", "0.1", "1", "0.2", "2",
                "0.3", "3", "0.4", "4", "0.5", "5", "0.6", "6", "0.7", "7", "0.8", "8", "0.9", "9", "1.0", "10" }));
            AddFunction(Switch.CreateToggleSwitch(this, PPK, BUTTON_3, "485", "1", "On", "0", "Off", "PPK", "Systems BIT Selector", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, PPK, BUTTON_4, "486", "1", "On", "0", "Off", "PPK", "Computer BIT Selector", "%1d"));
            AddFunction(new PushButton(this, PPK, BUTTON_7, "489", "PPK", "Self Test Button"));
            AddFunction(Switch.CreateToggleSwitch(this, PPK, BUTTON_8, "490", "1", "On", "0", "Off", "PPK", "Emergency INU Alignment", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, PPK, BUTTON_9, "491", "1", "On", "0", "Off", "PPK", "Stabilization and indication of hanger cable switch", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, PPK, BUTTON_10, "492", "1", "On", "0", "Off", "PPK", "Video Tape Recorder Switch", "%1d"));

            AddFunction(Switch.CreateToggleSwitch(this, C061K, BUTTON_1, "487", "1", "On", "0", "Off", "INU", "Power", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, C061K, BUTTON_2, "488", "1", "On", "0", "Off", "INU", "Heater Power", "%1d"));

            AddFunction(GuardedSwitch.CreateToggleSwitch(this, CPT_MECH, BUTTON_2, "452", BUTTON_3, "453", "1", "0", "1", "On", "0", "Off", "Mechanical", "Hydraulics/EKRAN Self Test Switch", "%1d"));
            #endregion

            // Engines Power Indicator Mode
            AddFunction(new NetworkValue(this, "592", "Engine Power Indicator", "Power Indicator Mode", "Central Index position on engine power indicator", "0-1", BindingValueUnits.Numeric));
            AddFunction(new ScaledNetworkValue(this, "234", 5d, "Engine Power Indicator", "Left Engine Marker", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter, 5d, "%0.2f"));
            AddFunction(new ScaledNetworkValue(this, "235", 5d, "Engine Power Indicator", "Right Engine Marker", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter, 5d, "%0.2f"));

            // Oil Pressure/Temp Gauges
            AddFunction(new ScaledNetworkValue(this, "252", 8d, "Engine", "Left Engine Oil Pressure", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter));
            AddFunction(new ScaledNetworkValue(this, "253", 8d, "Engine", "Right Engine Oil Pressure", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter));
            AddFunction(new ScaledNetworkValue(this, "254", 8d, "Engine", "Gearbox Oil Pressure", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter));
            CalibrationPointCollectionDouble engineOilTempScale = new CalibrationPointCollectionDouble(0, -60d, 1, 180d);
            AddFunction(new ScaledNetworkValue(this, "255", engineOilTempScale, "Engine", "Left Engine Oil Temperature", "", "", BindingValueUnits.Celsius));
            AddFunction(new ScaledNetworkValue(this, "256", engineOilTempScale, "Engine", "Right Engine Oil Temperature", "", "", BindingValueUnits.Celsius));
            CalibrationPointCollectionDouble gearboxOilTempScale = new CalibrationPointCollectionDouble(0, -50d, 1, 150d);
            AddFunction(new ScaledNetworkValue(this, "257", gearboxOilTempScale, "Engine", "Gearbox Oil Temperature", "", "", BindingValueUnits.Celsius));

            // Hydraulics Indicators
            AddFunction(new FlagValue(this, "469", "Hydraulics", "Valve 1 Indicator", ""));
            AddFunction(new FlagValue(this, "470", "Hydraulics", "Valve 2 Indicator", ""));
            AddFunction(new ScaledNetworkValue(this, "471", 100d, "Hydraulics", "Common Pressure", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter));
            AddFunction(new ScaledNetworkValue(this, "472", 100d, "Hydraulics", "Main Pressure", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter));
            AddFunction(new ScaledNetworkValue(this, "473", 100d, "Hydraulics", "Accumulators Pressure", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter));
            AddFunction(new ScaledNetworkValue(this, "474", 100d, "Hydraulics", "Wheel Brake Pressure", "", "", BindingValueUnits.KilgramsForcePerSquareCentimenter));
            AddFunction(new ScaledNetworkValue(this, "475", gearboxOilTempScale, "Hydraulics", "Common Temperature", "", "", BindingValueUnits.Celsius));
            AddFunction(new ScaledNetworkValue(this, "476", gearboxOilTempScale, "Hydraulics", "Main Temperature", "", "", BindingValueUnits.Celsius));

            // Mag Variation Panel
            AddFunction(new Axis(this, PShk_7, BUTTON_1, "340", 0.12, 0, 1, "PShK-7 Latitude Entry", "Latitude Correction"));
            AddFunction(Switch.CreateToggleSwitch(this, PShk_7, BUTTON_2, "341", "1", "North", "0", "South", "PShK-7 Latitude Entry", "Latitidue Correction Switch", "%1d"));
            AddFunction(new FlagValue(this, "342", "PShK-7 Latitude Entry", "Auto Lamp", ""));
            AddFunction(new Functions.LatitudeEntry(this));
            AddFunction(new Axis(this, ZMS_3, BUTTON_1, "338", 0.12, 0, 1, "ZMS-3 Magnetic Variation", "Magnetic variatoin selection"));
            AddFunction(new Functions.MagVariation(this));
        }
        public HeliosVisualContainerEditor()
        {
            Focusable = true;

            _view = new HeliosVisualView();
            _view.IgnoreHidden = true;
            _view.DisplayRotation = false;
            AddVisualChild(_view);

            SelectedItems = new HeliosVisualCollection();
            _zoomCalibration = new CalibrationPointCollectionDouble(-4d, 0.25d, 4d, 4d);
            _zoomCalibration.Add(new CalibrationPointDouble(0d, 1d));
            SelectedItems.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(SelectedItems_CollectionChanged);

            DrawingGroup checkerGroup = new DrawingGroup();
            checkerGroup.Children.Add(new GeometryDrawing(Brushes.White, null, new RectangleGeometry(new Rect(0, 0, 100, 100))));

            DrawingGroup grayGroup = new DrawingGroup();
            grayGroup.Children.Add(new GeometryDrawing(Brushes.LightGray, null, new RectangleGeometry(new Rect(0, 0, 50, 50))));
            grayGroup.Children.Add(new GeometryDrawing(Brushes.LightGray, null, new RectangleGeometry(new Rect(50, 50, 50, 50))));

            checkerGroup.Children.Add(grayGroup);
            checkerGroup.Freeze();

            _checkerBrush = new DrawingBrush(checkerGroup);
            _checkerBrush.Viewport = new Rect(0, 0, 10, 10);
            _checkerBrush.ViewportUnits = BrushMappingMode.Absolute;
            _checkerBrush.TileMode = TileMode.Tile;
            _checkerBrush.Freeze();
        }
Example #59
0
        public Mig21Interface()
            : base("DCS Mig21")
        {
            #region DragChute
            AddFunction(new PushButton(this, CHUTE, DRAGCHUTE, "298", "Chute", "Release Drop Chute"));
            AddFunction(new PushButton(this, CHUTE, DRAGCHUTE_DISCONNECT, "305", "Chute", "Disconnect Drop Chute"));
            AddFunction(Switch.CreateToggleSwitch(this, CHUTE, DRAGCHUTE_SAFTEY_COVER, "304", "1", "Open", "0", "Closed", "Chute", "Saftey Cover", "%1d"));
            #endregion

            #region Radio
            AddFunction(Switch.CreateToggleSwitch(this, RADIO, RADIO_ON, "173", "1", "On", "0", "Off", "Radio", "Radio On", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, RADIO, RADIO_COMPASS_SOUND, "208", "1", "Radio", "0", "Compass", "Radio", "Radio/Compass Sound", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, RADIO, SQUELCH, "209", "1", "On", "0", "Off", "Radio", "Squelch On/Off", "%1d"));
            //works great with potentiometer
            AddFunction(new Axis(this, RADIO, RADIO_VOLUME, "210", 0.1d, 0d, 1d, "Radio", "Radio Volume"));
            //works better this way instead of axis to get the output
            AddFunction(new Switch(this, RADIO, RADIO_CHANNEL, new SwitchPosition[] { new SwitchPosition("0", "Channel 0", RADIO_CHANNEL), 
                new SwitchPosition("0.05", "Channel 1", RADIO_CHANNEL), new SwitchPosition("0.1", "Channel 2", RADIO_CHANNEL), new SwitchPosition("0.15", "Channel 3", RADIO_CHANNEL), 
                new SwitchPosition("0.2", "Channel 4", RADIO_CHANNEL), new SwitchPosition("0.25", "Channel 5", RADIO_CHANNEL), new SwitchPosition("0.3", "Channel 6", RADIO_CHANNEL), 
                new SwitchPosition("0.35", "Channel 7", RADIO_CHANNEL), new SwitchPosition("0.4", "Channel 8", RADIO_CHANNEL) , new SwitchPosition("0.45", "Channel 9", RADIO_CHANNEL),
                new SwitchPosition("0.5", "Channel 10", RADIO_CHANNEL), new SwitchPosition("0.55", "Channel 11", RADIO_CHANNEL) , new SwitchPosition("0.66", "Channel 12", RADIO_CHANNEL),
                new SwitchPosition("0.65", "Channel 13", RADIO_CHANNEL), new SwitchPosition("0.7", "Channel 14", RADIO_CHANNEL) , new SwitchPosition("0.75", "Channel 15", RADIO_CHANNEL),
                new SwitchPosition("0.8", "Channel 16", RADIO_CHANNEL), new SwitchPosition("0.85", "Channel 17", RADIO_CHANNEL) , new SwitchPosition("0.9", "Channel 18", RADIO_CHANNEL),
                new SwitchPosition("0.95", "Channel 19", RADIO_CHANNEL), new SwitchPosition("1", "Channel 20", RADIO_CHANNEL)}, "Radio", "Radio Channel Selector", "%0.1f"));
            AddFunction(new PushButton(this, INTERCOM, RADIO_INTERCOM, "315", "Radio", "Intercom pushbutton"));
            // potentiometer with initial 0, min0, max 20, step 1 works perfect with it.
            AddFunction(new ScaledNetworkValue(this, "211", 20d, "Radio Channel Display", "Radio Channel output for display", "Current channel", "use potentiometer with initial 0, min0, max 20, step 1", BindingValueUnits.Numeric, 0d, "%.4f"));          
            #endregion

            #region DC & AC buses & giro devices
            AddFunction(Switch.CreateToggleSwitch(this, DC_BUS, BATTERY_ON, "165", "1", "On", "0", "Off", "AC DC Buses", "Battery On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, DC_BUS, BATTERY_HEAT, "155", "1", "On", "0", "Off", "AC DC Buses", "Battery Heat On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, DC_BUS, DC_GENERATOR, "166", "1", "On", "0", "Off", "AC DC Buses", "DC Generator On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, AC_BUS, AC_GENERATOR, "169", "1", "On", "0", "Off", "AC DC Buses", "AC Generator On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, AC_BUS, PO7501, "153", "1", "On", "0", "Off", "AC DC Buses", "PO-750 Inverter #1 On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, AC_BUS, PO7502, "154", "1", "On", "0", "Off", "AC DC Buses", "PO-750 Inverter #2 On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, AC_BUS, EMERGENCY_INVERTER, "164", "1", "On", "0", "Off", "AC DC Buses", "Emergency Inverter On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, GYRO_DEVICES, GIRO_1, "162", "1", "On", "0", "Off", "Giro Devices", "Giro, NPP, SAU, RLS Signal, KPP Power On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, GYRO_DEVICES, GIRO_2, "163", "1", "On", "0", "Off", "Giro Devices", "DA-200 Signal, Giro, NPP, RLS, SAU Power On/Off", "%1d"));
            #endregion

            #region FUEL_PUMPS & FUEL_SYSTEM
            AddFunction(Switch.CreateToggleSwitch(this, FUEL_PUMPS, PUMP_3, "159", "1", "Open", "0", "Closed", "Fuel Tanks 3rd Group", "Fuel Pump On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FUEL_PUMPS, PUMP_1, "160", "1", "Open", "0", "Closed", "Fuel Tanks 1st Group", "Fuel Pump On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FUEL_PUMPS, PUMP_RASHOD, "161", "1", "Open", "0", "Closed", "Drain Fuel Tank", "Fuel Pump On/Off", "%1d"));
            //used potentiometer with step value of 0.2 and lower sensitivity (acts same in cockpit its either up or down fully practically)
            //elements["PNT_274"] = default_axis(LOCALIZE("Fuel Quantity Set"),devices.FUEL_SYSTEM, device_commands.FuelQt,274, 0.0, 0.02, true, false)
            AddFunction(new Axis(this, FUEL_SYSTEM, FUEL_QT, "274", 0.1d, 0d, 0.2d, "Fuel System", "Fuel Qt"));
            #endregion

            #region Engine Start Device
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE_START_DEVICE, ZAZIG, "302", "1", "Open", "0", "Closed", "Engine Start Device", "APU On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE_START_DEVICE, HOTSTART, "288", "1", "Open", "0", "Closed", "Engine Start Device", "Engine Cold / Normal Start", "%1d"));
            AddFunction(new PushButton(this, ENGINE_START_DEVICE, START_BUTTON, "289", "Engine Start Device", "Start Engine Button"));
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE_START_DEVICE, AIRSTART, "301", "1", "Open", "0", "Closed", "Engine Start Device", "Engine Emergency Air Start on/off", "%1d"));
            AddFunction(new PushButton(this, ENGINE_START_DEVICE, RUD_STOP_LOCK, "616", "Engine Start Device", "Engine Stop/Lock"));
            #endregion

            #region Pitot Tubes
            AddFunction(Switch.CreateToggleSwitch(this, PITOT_TUBES, PITO_SELECT, "229", "1", "Open", "0", "Closed", "Pitot Tubes", "Pitot tube Selector Main/Emergency", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, PITOT_TUBES, PITO_HEAT_MAIN, "279", "1", "Open", "0", "Closed", "Pitot Tubes", "Pitot tube/Periscope/Clock Heat", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, PITOT_TUBES, PITOT_HEAT_AUX, "280", "1", "Open", "0", "Closed", "Pitot Tubes", "Secondary Pitot Tube Heat", "%1d"));
            #endregion

            #region DA200 (Variometer)
            AddFunction(new Axis(this, DA_200, DA200_SET, "261", 0.1d, 0d, 1d, "DA200", "DA200 Set")); //perfect with potentiometer
            #endregion

            #region Engine
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE, SURGE_DOORS, "308", "0", "Open", "1", "Closed", "Engine", "Anti surge doors - Auto/Manual", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE, FORS_MAX, "300", "1", "Open", "0", "Closed", "Engine", "Afterburner/Maximum Off/On", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ENGINE, CHR, "320", "1", "Open", "0", "Closed", "Engine", "Emergency Afterburner Off/On", "%1d"));
            #endregion

            #region Fire Extinguisher
            AddFunction(Switch.CreateToggleSwitch(this, FIRE_EXTINGUISHER, POZAR_OBORUD, "303", "1", "Open", "0", "Closed", "Fire Extinguisher", "Fire Extinguisher Off/On", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FIRE_EXTINGUISHER, POZAR_SAFETY_COVER, "324", "1", "Open", "0", "Closed", "Fire Extinguisher", "Fire Extinguisher Cover", "%1d"));
            AddFunction(new PushButton(this, FIRE_EXTINGUISHER, OGNETUSHITEL, "325", "Fire Extinguisher", "Fire Extinguisher Button"));
            #endregion

            #region Lights
            AddFunction(new Axis(this, LIGHTS, TEXT_BACKLIGHT_AXIS, "612", 0.1d, 0d, 1d, "Lights", "Cockpit Texts Back-light"));
            AddFunction(new Axis(this, LIGHTS, INSTRUMENTS_BACKLIGHT_AXIS, "156", 0.1d, 0d, 1d, "Lights", "Instruments Back-light"));
            AddFunction(new Axis(this, LIGHTS, RED_LIGHTS_MAIN_AXIS, "157", 0.1d, 0d, 1d, "Lights", "Main Red Lights"));
            AddFunction(new Axis(this, LIGHTS, WHITE_LIGHTS_MAIN_AXIS, "222", 0.1d, 0d, 1d, "Lights", "Main White Lights"));
            AddFunction(new Switch(this, LIGHTS, NAV_LIGHTS, new SwitchPosition[] { new SwitchPosition("0.00", "Off ", NAV_LIGHTS),
                new SwitchPosition("0.33", "Min", NAV_LIGHTS), new SwitchPosition("0.66", "Med", NAV_LIGHTS),new SwitchPosition("0.99", "Max", NAV_LIGHTS)},
                "Lights", "Navlights", "%0.1f"));
            AddFunction(Switch.CreateThreeWaySwitch(this, LIGHTS, LANDING_LIGHTS, "323", "1.0", "Off", "0.5", "Taxi", "0.0", "Land", "Lights", "Off/Taxi/Land Lights", "%0.1f"));
            #endregion

            #region Lights Warning
            //both push button and axis work perfect. Its a rotary with a pushbutton in game.
            AddFunction(new PushButton(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS10, "369", "Lights Warning", "Check Warning Lights 195"));
            AddFunction(new Axis(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS11, "195", 0.1d, 0d, 1d, "Lights Warning", "Set  Warning Lights 195"));
            AddFunction(new PushButton(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS20, "370", "Lights Warning", "Check Warning Lights 196"));
            AddFunction(new Axis(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS21, "196", 0.1d, 0d, 1d, "Lights Warning", "Set Warning Lights 196"));
            AddFunction(new PushButton(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS30, "371", "Lights Warning", "Check Warning Lights 273"));
            AddFunction(new Axis(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS31, "273", 0.1d, 0d, 1d, "Lights Warning", "Set Warning Lights 273"));
            AddFunction(new PushButton(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS40, "372", "Lights Warning", "Check Warning Lights 282"));
            AddFunction(new Axis(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS41, "282", 0.1d, 0d, 1d, "Lights Warning", "Set Warning Lights 282"));
            AddFunction(new PushButton(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS50, "373", "Lights Warning", "Check Warning Lights 283"));
            AddFunction(new Axis(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS51, "283", 0.1d, 0d, 1d, "Lights Warning", "Set Warning Lights 283"));
            AddFunction(new PushButton(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS60, "374", "Lights Warning", "Check Warning Lights 322"));
            AddFunction(new Axis(this, LIGHTS_WARNING, CHECK_WARNING_LIGHTS61, "322", 0.1d, 0d, 1d, "Lights Warning", "Set Warning Lights 322"));
            AddFunction(new PushButton(this, LIGHTS_WARNING, SORC, "255", "Lights Warning", "Sorc Check Warning Lights "));
            AddFunction(new Axis(this, LIGHTS_WARNING, SORC_NIGHT_DAY, "657", 0.1d, 0d, 1d, "Sorc", "Sorc Set Night Day Warning Lights "));
            #endregion

            #region ARK
            AddFunction(Switch.CreateToggleSwitch(this, ARK, ARK_ON, "174", "1", "Open", "0", "Closed", "ARK", "ARK On/Off", "%1d"));
            AddFunction(new Axis(this, ARK, ARK_SOUND, "198", 0.1d, 0d, 1d, "ARK", "ARK Sound"));
            AddFunction(new PushButton(this, ARK, ARK_PEREK_LUCENIE, "212", "ARK", "ARK Change"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "213", "ARK", "ARK 1", "0.1", "0.1", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "214", "ARK", "ARK 2", "0.2", "0.2", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "215", "ARK", "ARK 3", "0.3", "0.3", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "216", "ARK", "ARK 4", "0.4", "0.4", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "217", "ARK", "ARK 5", "0.5", "0.5", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "218", "ARK", "ARK 6", "0.6", "0.6", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "219", "ARK", "ARK 7", "0.7", "0.7", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "220", "ARK", "ARK 8", "0.8", "0.8", "0.1d"));
            AddFunction(new PushButton(this, ARK, ARK_CHANNEL, "221", "ARK", "ARK 9", "0.9", "0.9", "0.1d"));
            //perfect with rotary switch. could also use a potentiometer as long as in profile you set min ie 0 max 8 and step 1.. might be handy for 100 position later
            AddFunction(new Switch(this, ARK, ARK_ZONE, new SwitchPosition[] { new SwitchPosition("0.0", "1 1", ARK_ZONE), new SwitchPosition("0.14", "1 11", ARK_ZONE), 
                new SwitchPosition("0.28", "2 1", ARK_ZONE), new SwitchPosition("0.42", "2 11", ARK_ZONE), new SwitchPosition("0.56", "3 1", ARK_ZONE), 
                new SwitchPosition("0.70", "3 11", ARK_ZONE), new SwitchPosition("0.84", "4 1", ARK_ZONE), new SwitchPosition("0.98", "4 11", ARK_ZONE) 
                }, "ARK", "Ark Zone Selector", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, ARK, ARK_ANTENA_COMPASS, "197", "1", "Open", "0", "Closed", "ARK", "ARK Mode - Antenna / Compass", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ARK, ARK_FAR_NEAR, "254", "1", "Open", "0", "Closed", "ARK", "Marker Far/Near", "%1d"));
            #endregion

            #region RSBN
            AddFunction(Switch.CreateToggleSwitch(this, RSBN, RSBN_ON, "176", "1", "Open", "0", "Closed", "RSBN", "RSBN On/Off", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, RSBN, RSBN_MODE, "240", "1.0", "Land", "0.5", "Navigation", "0.0", "Descend", "RSBN", "Land/Navigation/Descend", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, RSBN, RSBN_ARK, "340", "1", "Open", "0", "Closed", "RSBN", "RSBN / ARK", "%1d"));
            AddFunction(new PushButton(this, RSBN, RSBN_IDENT, "294", "RSBN", "RSBN Identify"));
            AddFunction(new PushButton(this, RSBN, RSBN_TEST, "347", "RSBN", "RSBN Test"));
            #endregion

            #region RSBN Panel
            AddFunction(new Axis(this, RSBN, RSBN_SOUND, "345", 0.1d, 0d, 1d, "RSBN", "RSBN Sound"));
            //use potentiometer with 100 position min1 max99 step1. 0-100 below. Works a treat for both below
            AddFunction(new Switch(this, RSBN, RSBN_NAV, new SwitchPosition[] { new SwitchPosition("0.00", "0", RSBN_NAV)
                ,new SwitchPosition("0.01", "1", RSBN_NAV), new SwitchPosition("0.02", "2", RSBN_NAV), new SwitchPosition("0.03", "3", RSBN_NAV)
                ,new SwitchPosition("0.04", "4", RSBN_NAV), new SwitchPosition("0.05", "5", RSBN_NAV), new SwitchPosition("0.06", "6", RSBN_NAV)
                ,new SwitchPosition("0.07", "7", RSBN_NAV), new SwitchPosition("0.08", "8", RSBN_NAV), new SwitchPosition("0.09", "9", RSBN_NAV)
                ,new SwitchPosition("0.10", "10", RSBN_NAV), new SwitchPosition("0.11", "11", RSBN_NAV), new SwitchPosition("0.12", "12", RSBN_NAV)
                ,new SwitchPosition("0.13", "13", RSBN_NAV), new SwitchPosition("0.14", "14", RSBN_NAV), new SwitchPosition("0.15", "15", RSBN_NAV)            
                ,new SwitchPosition("0.16", "16", RSBN_NAV), new SwitchPosition("0.17", "17", RSBN_NAV), new SwitchPosition("0.18", "18", RSBN_NAV)            
                ,new SwitchPosition("0.19", "19", RSBN_NAV), new SwitchPosition("0.20", "20", RSBN_NAV), new SwitchPosition("0.21", "21", RSBN_NAV)            
                ,new SwitchPosition("0.22", "22", RSBN_NAV), new SwitchPosition("0.23", "23", RSBN_NAV), new SwitchPosition("0.24", "24", RSBN_NAV)             
                ,new SwitchPosition("0.25", "25", RSBN_NAV), new SwitchPosition("0.26", "26", RSBN_NAV), new SwitchPosition("0.27", "27", RSBN_NAV)
                ,new SwitchPosition("0.28", "28", RSBN_NAV), new SwitchPosition("0.29", "29", RSBN_NAV), new SwitchPosition("0.30", "30", RSBN_NAV)
                ,new SwitchPosition("0.31", "31", RSBN_NAV), new SwitchPosition("0.32", "32", RSBN_NAV), new SwitchPosition("0.33", "33", RSBN_NAV)
                ,new SwitchPosition("0.34", "34", RSBN_NAV), new SwitchPosition("0.35", "35", RSBN_NAV), new SwitchPosition("0.36", "36", RSBN_NAV)
                ,new SwitchPosition("0.37", "37", RSBN_NAV), new SwitchPosition("0.38", "38", RSBN_NAV), new SwitchPosition("0.39", "39", RSBN_NAV)
                ,new SwitchPosition("0.40", "40", RSBN_NAV), new SwitchPosition("0.41", "41", RSBN_NAV), new SwitchPosition("0.42", "42", RSBN_NAV)
                ,new SwitchPosition("0.43", "43", RSBN_NAV), new SwitchPosition("0.44", "44", RSBN_NAV), new SwitchPosition("0.45", "45", RSBN_NAV)
                ,new SwitchPosition("0.46", "46", RSBN_NAV), new SwitchPosition("0.47", "47", RSBN_NAV), new SwitchPosition("0.48", "48", RSBN_NAV)
                ,new SwitchPosition("0.49", "49", RSBN_NAV), new SwitchPosition("0.50", "50", RSBN_NAV), new SwitchPosition("0.51", "51", RSBN_NAV)
                ,new SwitchPosition("0.52", "52", RSBN_NAV), new SwitchPosition("0.53", "53", RSBN_NAV), new SwitchPosition("0.54", "54", RSBN_NAV)
                ,new SwitchPosition("0.55", "55", RSBN_NAV), new SwitchPosition("0.56", "56", RSBN_NAV), new SwitchPosition("0.57", "57", RSBN_NAV)
                ,new SwitchPosition("0.58", "58", RSBN_NAV), new SwitchPosition("0.59", "59", RSBN_NAV), new SwitchPosition("0.60", "60", RSBN_NAV)
                ,new SwitchPosition("0.61", "61", RSBN_NAV), new SwitchPosition("0.62", "62", RSBN_NAV), new SwitchPosition("0.63", "63", RSBN_NAV)
                ,new SwitchPosition("0.64", "64", RSBN_NAV), new SwitchPosition("0.65", "65", RSBN_NAV), new SwitchPosition("0.66", "66", RSBN_NAV)
                ,new SwitchPosition("0.67", "67", RSBN_NAV), new SwitchPosition("0.68", "68", RSBN_NAV), new SwitchPosition("0.69", "69", RSBN_NAV)
                ,new SwitchPosition("0.70", "70", RSBN_NAV), new SwitchPosition("0.71", "71", RSBN_NAV), new SwitchPosition("0.72", "72", RSBN_NAV)
                ,new SwitchPosition("0.73", "73", RSBN_NAV), new SwitchPosition("0.74", "74", RSBN_NAV), new SwitchPosition("0.75", "75", RSBN_NAV)
                ,new SwitchPosition("0.76", "76", RSBN_NAV), new SwitchPosition("0.77", "77", RSBN_NAV), new SwitchPosition("0.78", "78", RSBN_NAV)
                ,new SwitchPosition("0.79", "79", RSBN_NAV), new SwitchPosition("0.80", "80", RSBN_NAV), new SwitchPosition("0.81", "81", RSBN_NAV)
                ,new SwitchPosition("0.82", "82", RSBN_NAV), new SwitchPosition("0.83", "83", RSBN_NAV), new SwitchPosition("0.84", "84", RSBN_NAV)
                ,new SwitchPosition("0.85", "85", RSBN_NAV), new SwitchPosition("0.86", "86", RSBN_NAV), new SwitchPosition("0.87", "87", RSBN_NAV)
                ,new SwitchPosition("0.88", "88", RSBN_NAV), new SwitchPosition("0.89", "89", RSBN_NAV), new SwitchPosition("0.90", "90", RSBN_NAV)
                ,new SwitchPosition("0.91", "91", RSBN_NAV), new SwitchPosition("0.92", "92", RSBN_NAV), new SwitchPosition("0.93", "93", RSBN_NAV)
                ,new SwitchPosition("0.94", "94", RSBN_NAV), new SwitchPosition("0.95", "95", RSBN_NAV), new SwitchPosition("0.96", "96", RSBN_NAV)
                ,new SwitchPosition("0.97", "97", RSBN_NAV), new SwitchPosition("0.98", "98", RSBN_NAV), new SwitchPosition("0.99", "99", RSBN_NAV)
                }, "RSBN", "RSBN NAV", "%0.01f"));
            //The following Axis is now crashing the game... need to investigate, remove from pull until fixed
            //RSBN_LAND value, as soon as you use it game crashes now... need to investigate
            //tried axis but RSBN_LAND value still used and does the same thing.
            //AddFunction(new Switch(this, RSBN, RSBN_LAND, new SwitchPosition[] { new SwitchPosition("0.00", "0", RSBN_LAND)
            //    ,new SwitchPosition("0.01", "1", RSBN_LAND), new SwitchPosition("0.02", "2", RSBN_LAND), new SwitchPosition("0.03", "3", RSBN_LAND)
            //    ,new SwitchPosition("0.04", "4", RSBN_LAND), new SwitchPosition("0.05", "5", RSBN_LAND), new SwitchPosition("0.06", "6", RSBN_LAND)
            //    ,new SwitchPosition("0.07", "7", RSBN_LAND), new SwitchPosition("0.08", "8", RSBN_LAND), new SwitchPosition("0.09", "9", RSBN_LAND)
            //    ,new SwitchPosition("0.10", "10", RSBN_LAND), new SwitchPosition("0.11", "11", RSBN_LAND), new SwitchPosition("0.12", "12", RSBN_LAND)
            //    ,new SwitchPosition("0.13", "13", RSBN_LAND), new SwitchPosition("0.14", "14", RSBN_LAND), new SwitchPosition("0.15", "15", RSBN_LAND)            
            //    ,new SwitchPosition("0.16", "16", RSBN_LAND), new SwitchPosition("0.17", "17", RSBN_LAND), new SwitchPosition("0.18", "18", RSBN_LAND)            
            //    ,new SwitchPosition("0.19", "19", RSBN_LAND), new SwitchPosition("0.20", "20", RSBN_LAND), new SwitchPosition("0.21", "21", RSBN_LAND)            
            //    ,new SwitchPosition("0.22", "22", RSBN_LAND), new SwitchPosition("0.23", "23", RSBN_LAND), new SwitchPosition("0.24", "24", RSBN_LAND)             
            //    ,new SwitchPosition("0.25", "25", RSBN_LAND), new SwitchPosition("0.26", "26", RSBN_LAND), new SwitchPosition("0.27", "27", RSBN_LAND)
            //    ,new SwitchPosition("0.28", "28", RSBN_LAND), new SwitchPosition("0.29", "29", RSBN_LAND), new SwitchPosition("0.30", "30", RSBN_LAND)
            //    ,new SwitchPosition("0.31", "31", RSBN_LAND), new SwitchPosition("0.32", "32", RSBN_LAND), new SwitchPosition("0.33", "33", RSBN_LAND)
            //    ,new SwitchPosition("0.34", "34", RSBN_LAND), new SwitchPosition("0.35", "35", RSBN_LAND), new SwitchPosition("0.36", "36", RSBN_LAND)
            //    ,new SwitchPosition("0.37", "37", RSBN_LAND), new SwitchPosition("0.38", "38", RSBN_LAND), new SwitchPosition("0.39", "39", RSBN_LAND)
            //    ,new SwitchPosition("0.40", "40", RSBN_LAND), new SwitchPosition("0.41", "41", RSBN_LAND), new SwitchPosition("0.42", "42", RSBN_LAND)
            //    ,new SwitchPosition("0.43", "43", RSBN_LAND), new SwitchPosition("0.44", "44", RSBN_LAND), new SwitchPosition("0.45", "45", RSBN_LAND)
            //    ,new SwitchPosition("0.46", "46", RSBN_LAND), new SwitchPosition("0.47", "47", RSBN_LAND), new SwitchPosition("0.48", "48", RSBN_LAND)
            //    ,new SwitchPosition("0.49", "49", RSBN_LAND), new SwitchPosition("0.50", "50", RSBN_LAND), new SwitchPosition("0.51", "51", RSBN_LAND)
            //    ,new SwitchPosition("0.52", "52", RSBN_LAND), new SwitchPosition("0.53", "53", RSBN_LAND), new SwitchPosition("0.54", "54", RSBN_LAND)
            //    ,new SwitchPosition("0.55", "55", RSBN_LAND), new SwitchPosition("0.56", "56", RSBN_LAND), new SwitchPosition("0.57", "57", RSBN_LAND)
            //    ,new SwitchPosition("0.58", "58", RSBN_LAND), new SwitchPosition("0.59", "59", RSBN_LAND), new SwitchPosition("0.60", "60", RSBN_LAND)
            //    ,new SwitchPosition("0.61", "61", RSBN_LAND), new SwitchPosition("0.62", "62", RSBN_LAND), new SwitchPosition("0.63", "63", RSBN_LAND)
            //    ,new SwitchPosition("0.64", "64", RSBN_LAND), new SwitchPosition("0.65", "65", RSBN_LAND), new SwitchPosition("0.66", "66", RSBN_LAND)
            //    ,new SwitchPosition("0.67", "67", RSBN_LAND), new SwitchPosition("0.68", "68", RSBN_LAND), new SwitchPosition("0.69", "69", RSBN_LAND)
            //    ,new SwitchPosition("0.70", "70", RSBN_LAND), new SwitchPosition("0.71", "71", RSBN_LAND), new SwitchPosition("0.72", "72", RSBN_LAND)
            //    ,new SwitchPosition("0.73", "73", RSBN_LAND), new SwitchPosition("0.74", "74", RSBN_LAND), new SwitchPosition("0.75", "75", RSBN_LAND)
            //    ,new SwitchPosition("0.76", "76", RSBN_LAND), new SwitchPosition("0.77", "77", RSBN_LAND), new SwitchPosition("0.78", "78", RSBN_LAND)
            //    ,new SwitchPosition("0.79", "79", RSBN_LAND), new SwitchPosition("0.80", "80", RSBN_LAND), new SwitchPosition("0.81", "81", RSBN_LAND)
            //    ,new SwitchPosition("0.82", "82", RSBN_LAND), new SwitchPosition("0.83", "83", RSBN_LAND), new SwitchPosition("0.84", "84", RSBN_LAND)
            //    ,new SwitchPosition("0.85", "85", RSBN_LAND), new SwitchPosition("0.86", "86", RSBN_LAND), new SwitchPosition("0.87", "87", RSBN_LAND)
            //    ,new SwitchPosition("0.88", "88", RSBN_LAND), new SwitchPosition("0.89", "89", RSBN_LAND), new SwitchPosition("0.90", "90", RSBN_LAND)
            //    ,new SwitchPosition("0.91", "91", RSBN_LAND), new SwitchPosition("0.92", "92", RSBN_LAND), new SwitchPosition("0.93", "93", RSBN_LAND)
            //    ,new SwitchPosition("0.94", "94", RSBN_LAND), new SwitchPosition("0.95", "95", RSBN_LAND), new SwitchPosition("0.96", "96", RSBN_LAND)
            //    ,new SwitchPosition("0.97", "97", RSBN_LAND), new SwitchPosition("0.98", "98", RSBN_LAND), new SwitchPosition("0.99", "99", RSBN_LAND)
            //    }, "RSBN", "RSBN PRMG LAND", "%0.01f"));
            AddFunction(new PushButton(this, RSBN, RSBN_RESET, "366", "RSBN", "RSBN Reset"));
            AddFunction(Switch.CreateToggleSwitch(this, RSBN, RSBN_BEARING, "367", "1", "Open", "0", "Closed", "RSBN", "RSBN Bearing", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, RSBN, RSBN_FAR, "368", "1", "Open", "0", "Closed", "RSBN", "RSBN Distance", "%1d"));
            #endregion

            #region SAU
            AddFunction(Switch.CreateToggleSwitch(this, SAU, SAU_ON, "179", "1", "Open", "0", "Closed", "SAU", "SAU on/off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SAU, SAU_PITCH_ON, "180", "1", "Open", "0", "Closed", "SAU", "SAU Pitch on/off", "%1d"));
            AddFunction(new PushButton(this, SAU, SAU_STABIL, "343", "SAU", "SAU - Stabilize"));
            AddFunction(new PushButton(this, SAU, SAU_CANCEL, "376", "SAU", "SAU - cancel current mode"));
            AddFunction(new PushButton(this, SAU, SAU_PRIVEDENIE, "377", "SAU", "SAU - Recovery - stick"));
            AddFunction(Switch.CreateToggleSwitch(this, SAU, SAU_LOW_ALT_ON, "344", "1", "Open", "0", "Closed", "SAU", "SAU Preset - Limit Altitude", "%1d"));
            AddFunction(new PushButton(this, SAU, SAU_LANDING_CONTROL_COMMAND, "341", "SAU", "SAU - Landing - Command"));
            AddFunction(new PushButton(this, SAU, SAU_LANDING_CONTROL_AUTO, "342", "SAU", "SAU - Landing - Auto"));
            AddFunction(new PushButton(this, SAU, SAU_RESET_OFF, "348", "SAU", "SAU Reset/Off"));
            #endregion

            #region SPO
            AddFunction(Switch.CreateToggleSwitch(this, SPO, SPO_ON, "202", "1", "Open", "0", "Closed", "SPO", "SPO-10 RWR On/Off", "%1d"));
            AddFunction(new PushButton(this, SPO, SPO_TEST, "226", "SPO", "SPO-10 Test"));
            AddFunction(Switch.CreateToggleSwitch(this, SPO, SPO_DAY_NIGHT, "227", "1", "Open", "0", "Closed", "SPO", "SPO-10 Night / Day", "%1d"));
            AddFunction(new Axis(this, SPO, SPO_VOLUME, "225", 0.1d, 0d, 1d, "SPO", "SPO-10 Volume"));
            #endregion

            #region SRZO IFF (not implemented in game)
            //all of these recieve but dont send into cockpit.... though not implemented in game i did hope it would switch them..
            //will look into more closely if Leatherneck implement it in game.
            //AddFunction(Switch.CreateToggleSwitch(this, SRZO, SRZO_VOPROS, "188", "1", "Open", "0", "Closed", "SRZO", "SRZO IFF Coder/Decoder On/Off", "%1d"));
            //AddFunction(new Switch(this, SRZO, SRZO_CODES, new SwitchPosition[] { new SwitchPosition("0.00", "0", SRZO_CODES)
            //    ,new SwitchPosition("0.08", "1", SRZO_CODES), new SwitchPosition("0.16", "2", SRZO_CODES), new SwitchPosition("0.24", "3", SRZO_CODES)
            //    ,new SwitchPosition("0.32", "4", SRZO_CODES), new SwitchPosition("0.4", "5", SRZO_CODES), new SwitchPosition("0.48", "6", SRZO_CODES)
            //    ,new SwitchPosition("0.56", "7", SRZO_CODES), new SwitchPosition("0.64", "8", SRZO_CODES), new SwitchPosition("0.72", "9", SRZO_CODES)
            //    ,new SwitchPosition("0.8", "10", SRZO_CODES), new SwitchPosition("0.88", "11", SRZO_CODES)
            //     }, "SRZO", "SRZO Codes", "%0.01f"));        
            //AddFunction(Switch.CreateToggleSwitch(this, SRZO, SRZO_ON, "346", "1", "Open", "0", "Closed", "SRZO", "IFF System 'Type 81' On/Off", "%1d"));
            //AddFunction(Switch.CreateToggleSwitch(this, SRZO, EMERG_TRANSMIT_SAFETY_COVER, "190", "1", "Open", "0", "Closed", "SRZO", "Emergency Transmitter Cover", "%1d"));
            //AddFunction(Switch.CreateToggleSwitch(this, SRZO, EMERG_TRANSMIT_ON, "191", "1", "Open", "0", "Closed", "SRZO", "Emergency Transmitter On/Off", "%1d"));
            //AddFunction(Switch.CreateToggleSwitch(this, SRZO, SRZO_DESTR_COVER, "427", "1", "Open", "0", "Closed", "SRZO", "SRZO Self Destruct Cover", "%1d"));
            //AddFunction(new PushButton(this, SRZO, SRZO_DESTR, "428", "SRZO", "SRZO Self Destruct"));
            #endregion

            #region SOD
            AddFunction(Switch.CreateToggleSwitch(this, SOD, SOD_ON, "200", "1", "Open", "0", "Closed", "SOD", "SOD IFF On/Off", "%1d"));
            AddFunction(new PushButton(this, SOD, SOD_IDENT, "199", "SOD", "SOD Identify"));
            AddFunction(Switch.CreateThreeWaySwitch(this, SOD, SOD_VOLNI, "201", "1.0", "3", "0.5", "1", "0.0", "2", "SOD", "Wave Selector 3/1/2", "%0.1f"));
            AddFunction(new Switch(this, SOD, SOD_MODE, new SwitchPosition[] { new SwitchPosition("0.00", "Fine", SOD_MODE)
                ,new SwitchPosition("0.25", "Course", SOD_MODE), new SwitchPosition("0.50", "Off", SOD_MODE), new SwitchPosition("0.75", "Single", SOD_MODE)
                , new SwitchPosition("1.0", "Group", SOD_MODE)   
                }, "SOD", "SOD Modes", "%0.01f"));
            #endregion

            #region RADAR
            AddFunction(Switch.CreateThreeWaySwitch(this, RADAR, RADAR_ON, "205", "1.0", "Off", "0.5", "Prep", "0.0", "On", "RADAR", "Radar Off/Prep/On", "%0.1f"));
            AddFunction(Switch.CreateThreeWaySwitch(this, RADAR, RADAR_LOW_ALT, "206", "1.0", "Off", "0.5", "Comp", "0.0", "On", "RADAR", "Radar Off/Comp/on", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, RADAR, RADAR_FIX_BEAM, "207", "1", "Open", "0", "Closed", "RADAR", "Locked Beam On/Off", "%1d"));
            AddFunction(new PushButton(this, RADAR, RADAR_MGN_STIR, "266", "RADAR", "Radar Screen Magnetic Reset"));
            AddFunction(new PushButton(this, RADAR, RADAR_JAM_CONT, "330", "RADAR", "Radar Interferes - Continues"));
            AddFunction(new PushButton(this, RADAR, RADAR_JAM_TMP, "331", "RADAR", "Radar Interferes - Temporary"));
            AddFunction(new PushButton(this, RADAR, RADAR_JAM_PASS, "332", "RADAR", "Radar Interferes - Passive"));
            AddFunction(new PushButton(this, RADAR, RADAR_JAM_METEO, "333", "RADAR", "Radar Interferes - Weather"));
            AddFunction(new PushButton(this, RADAR, RADAR_VOPROS, "334", "RADAR", "Radar Interferes - IFF"));
            AddFunction(new PushButton(this, RADAR, RADAR_JAM_LOW_SPEED, "335", "RADAR", "Radar Interferes - Low Speed"));
            AddFunction(new PushButton(this, RADAR, RADAR_KONTROL, "336", "RADAR", "Radar Interferes - Self-test"));
            AddFunction(new PushButton(this, RADAR, RADAR_RESET, "337", "RADAR", "Radar Interferes - Reset"));
            AddFunction(new PushButton(this, RADAR, ZAHVAT, "378", "RADAR", "Lock Target - stick"));
            AddFunction(new Axis(this, RADAR, RADAR_FILTER, "623", 0.1d, 0d, 1d, "RADAR", "Radar Filter"));
            #endregion

            #region SPRD
            AddFunction(Switch.CreateToggleSwitch(this, SPRD, SPRD_START_ON, "167", "1", "Open", "0", "Closed", "SPRD", "SPRD (RATO) System On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SPRD, SPRD_DROP_ON, "168", "1", "Open", "0", "Closed", "SPRD", "SPRD (RATO) Drop System On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SPRD, SPRD_START_SAFETY_COVER, "252", "1", "Open", "0", "Closed", "SPRD", "SPRD (RATO) Start Cover", "%1d"));
            AddFunction(new PushButton(this, SPRD, SPRD_START, "253", "SPRD", "SPRD (RATO) Start"));
            AddFunction(Switch.CreateToggleSwitch(this, SPRD, SPRD_DROP_SAFETY_COVER, "317", "1", "Open", "0", "Closed", "SPRD", "SPRD (RATO)t Drop Cover", "%1d"));
            AddFunction(new PushButton(this, SPRD, SPRD_DROP, "318", "SPRD", "SPRD (RATO) Drop"));
            #endregion

            #region SPS
            AddFunction(Switch.CreateToggleSwitch(this, SPS, SPS_ON, "293", "1", "Open", "0", "Closed", "SPS", "SPS System Off/On", "%1d"));
            #endregion

            #region ARU
            AddFunction(Switch.CreateToggleSwitch(this, ARU, ARU_MAN_AUTO, "295", "1", "Open", "0", "Closed", "ARU", "ARU System - Manual/Auto", "%1d"));
            //the spring loaded part is taken care of in the profile editor.2 device commands...
            //just using high speed works perfect, dont need the low speed part
            //elements["PNT_296"]	= default_springloaded_3pos_switch(LOCALIZE("ARU System - Low Speed/Neutral/High Speed"), devices.ARU, device_commands.ARUhighSpeed, device_commands.ARUlowSpeed, 1, 0, -1, 296)				 
            AddFunction(Switch.CreateThreeWaySwitch(this, ARU, ARU_HIGH_SPEED, "296", "-1.0", "Low", "0.0", "Neutral", "1.0", "High", "ARU", "Low/Neutral/High hs", "%0.1f"));
            #endregion

            #region Airbrake
            AddFunction(Switch.CreateToggleSwitch(this, AIRBRAKE, AIRBRAKES, "316", "1", "Open", "0", "Closed", "Airbrake", "Airbrakes", "%1d"));
            #endregion

            #region GearBrakes
            AddFunction(Switch.CreateToggleSwitch(this, GEAR_BRAKES, ABS_ON, "299", "1", "Open", "0", "Closed", "Gear Brakes", "ABS off/on", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, GEAR_BRAKES, NOSEGEAR_BRAKE, "238", "1", "Open", "0", "Closed", "Gear Brakes", "Nosegear Brake Off/On", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, GEAR_BRAKES, EMERG_BRAKES, "237", "0", "Closed", "1", "Open", "Gear Brakes", "Emergency brake", "%1d"));
            #endregion

            #region Gears
            AddFunction(Switch.CreateToggleSwitch(this, GEARS, GEAR_HANDLE_FIXATOR, "326", "1", "Open", "0", "Closed", "Gears", "Gear Handle Fixator", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, GEARS, GEAR_LEVER, "327", "1.0", "Up", "0.0", "Neutral", "-1.0", "Down", "Gears", "Up/Neutral/Down", "%0.1f"));
            AddFunction(new Axis(this, GEARS, EMERG_GEARS_MAIN, "223", 0.1d, 0d, 1d, "Gears", "Emergency Gears Main"));
            AddFunction(Switch.CreateToggleSwitch(this, GEARS, EMERG_GEARS_NOSE, "281", "0", "Open", "1", "Closed", "Gears", "Nose Gear Emergency Release Handle", "%1d"));
            #endregion

            #region Flaps
            AddFunction(Switch.CreateToggleSwitch(this, FLAPS, FLAPS_0, "311", "0", "Open", "1", "Closed", "Flaps", "Flaps Neutral", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FLAPS, FLAPS_25, "312", "0", "Open", "1", "Closed", "Flaps", "Flaps Take-Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, FLAPS, FLAPS_45, "313", "0", "Open", "1", "Closed", "Flaps", "Flaps Landing", "%1d"));
            AddFunction(new PushButton(this, FLAPS, FLAPS_RESET, "314", "Flaps", "Flaps Reset"));
            #endregion

            #region TRIMER
            AddFunction(Switch.CreateToggleSwitch(this, TRIMER, TRIMMER_ON, "172", "1", "On", "0", "Off", "Trimmer", "Trimmer On/Off", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, TRIMER, TRIMMER_BTN_UP, "379", "1.0", "Up", "0.0", "Neutral", "-1.0", "Down", "Trimmer", "Trimmer Up/Neutral/Down", "%0.1f"));
            #endregion

            #region SOPLO aka engine nozzle
            AddFunction(Switch.CreateToggleSwitch(this, SOPLO, SOPLO2X_POZ, "291", "1", "Open", "0", "Closed", "Engine Nozzle", "2 Position Emergency Control", "%1d"));
            #endregion

            #region MAIN_HYDRO and BUSTER_HYDRO
            AddFunction(Switch.CreateToggleSwitch(this, MAIN_HYDRO, NR27_ON, "171", "1", "On", "0", "Off", "Hydro", "Emergency Hydraulic Pump On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, MAIN_HYDRO, AILERON_BOOSTERS, "319", "1", "On", "0", "Off", "Hydro", "Aileron Booster - Off/On", "%1d"));
            #endregion

            #region KPP
            AddFunction(Switch.CreateToggleSwitch(this, KPP, KPP_ON, "177", "1", "On", "0", "Off", "KPP", "KPP Main/Emergency", "%1d"));
            AddFunction(new PushButton(this, KPP, KPP_ARRETIR, "259", "KPP", "KPP Cage"));
            AddFunction(new Axis(this, KPP, KPP_SET_PITCH, "260", 0.01d, -1d, 1d, "KPP", "KPP set")); //works
            #endregion

            #region IAS / TAS / KSI (NPP)
            AddFunction(Switch.CreateToggleSwitch(this, KSI, NPP_ON, "178", "1", "On", "0", "Off", "NPP", "NPP On/Off", "%1d"));
            AddFunction(new PushButton(this, KSI, NPP_NASTROJKA, "258", "NPP", "NPP Adjust"));
            //use rotary encoder in profile
            AddFunction(new Axis(this, KSI, NPP_SET_COURSE, "263", 0.1d, -1d, 1d, "NPP", "NPP Course set"));
            #endregion

            #region RADIO ALTIMETER
            AddFunction(Switch.CreateToggleSwitch(this, RADIO_ALTIMETER, RADIO_ALT_ON, "175", "1", "On", "0", "Off", "Radio Altimeter", "Radio Altimeter/Marker On/Off", "%1d"));
            AddFunction(new Switch(this, RADIO_ALTIMETER, DANGER_ALT_SELECT, new SwitchPosition[] { new SwitchPosition("0.00", "Off", DANGER_ALT_SELECT)
                ,new SwitchPosition("0.14", "50", DANGER_ALT_SELECT), new SwitchPosition("0.28", "100", DANGER_ALT_SELECT), new SwitchPosition("0.42", "150", DANGER_ALT_SELECT)
                ,new SwitchPosition("0.56", "200", DANGER_ALT_SELECT), new SwitchPosition("0.70", "250", DANGER_ALT_SELECT), new SwitchPosition("0.84", "300", DANGER_ALT_SELECT)
                , new SwitchPosition("0.98", "400", DANGER_ALT_SELECT)   
                }, "Radio Altimeter", "Danger Alt Select", "%0.01f"));
           #endregion

            #region OXYGENE_SYSTEM
            AddFunction(Switch.CreateToggleSwitch(this, OXYGENE_SYSTEM, HELMET_AIR_CONDITION, "285", "1", "On", "0", "Off", "Oxygen System", "Helmet Air Condition Off/On", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, OXYGENE_SYSTEM, EMERG_OXYGENE, "286", "1", "On", "0", "Off", "Oxygen System", "Emergency Oxygen Off/On", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, OXYGENE_SYSTEM, MIXTURE_OXYGENE_SELECT, "287", "1", "On", "0", "Off", "Oxygen System", "Mixture/Oxygen Select", "%1d"));
            #endregion

            #region CANOPY
            AddFunction(Switch.CreateToggleSwitch(this, CANOPY, CANOPY_HERMET_HANDLE, "328", "1", "On", "0", "Off", "Canopy", "Hermetize Canopy", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, CANOPY, CANOPY_LOCK_HANDLE, "329", "1", "On", "0", "Off", "Canopy", "Secure Canopy - Canopy Lock Handle", "%1d"));
            AddFunction(new PushButton(this, CANOPY, CANOPY_OPEN, "375", "Canopy", "Canopy Open"));
            AddFunction(new PushButton(this, CANOPY, CANOPY_CLOSE, "385", "Canopy", "Canopy Close"));
            AddFunction(new PushButton(this, CANOPY, CANOPY_ANTI_ICE, "239", "Canopy", "Canopy Anti Ice"));
            AddFunction(Switch.CreateToggleSwitch(this, CANOPY, CANOPY_EMERG_RELEASE, "224", "1", "On", "0", "Off", "Canopy", "Canopy Emergency Release Handle", "%1d"));
            AddFunction(new Axis(this, CANOPY, CANOPY_VENT_SYSTEM, "649", 0.1d, 0d, 1d, "Canopy", "Canopy Vent System"));
            #endregion

            #region ASP Gunsight
            AddFunction(Switch.CreateToggleSwitch(this, ASP, ASP_ON, "186", "1", "On", "0", "Off", "ASP", "ASP Optical sight On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ASP, ASP_MAN_AUTO_SELECT, "241", "1", "On", "0", "Off", "ASP", "ASP Main Mode - Manual/Auto", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ASP, ASP_BOMB_STRELB_SELECT, "242", "1", "On", "0", "Off", "ASP", "ASP Mode - Bombardment/Shooting", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ASP, ASP_MISSILE_GUN_SELECT, "243", "1", "On", "0", "Off", "ASP", "ASP Mode - Missiles-Rockets/Gun", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ASP, ASP_SS_GIRO_SELECT, "244", "1", "On", "0", "Off", "ASP", "ASP Mode - Giro/Missile", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ASP, ASP_PIPPER_ON, "249", "1", "On", "0", "Off", "ASP", "ASP Pipper On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, ASP, ASP_NET_ON, "250", "1", "On", "0", "Off", "ASP", "ASP Fix net On/Off", "%1d"));
            //rem reduce increments in profile for these two targe size and intercept angle
            AddFunction(new Axis(this, ASP, ASP_TARGET_SIZE, "245", 0.01d, 0d, 1d, "ASP", "ASP Target Size"));
            AddFunction(new Axis(this, ASP, ASP_INTERCEPT_ANGLE, "246", 0.01d, 0d, 1d, "ASP", "ASP Intercept Angle"));
            AddFunction(new Axis(this, ASP, ASP_SCALE_LIGHT, "247", 0.1d, 0d, 1d, "ASP", "ASP Scale Light"));
            AddFunction(new Axis(this, ASP, ASP_PIPPER_LIGHT, "248", 0.1d, 0d, 1d, "ASP", "ASP Pipper Light Control"));
            AddFunction(new Axis(this, ASP, ASP_NET_LIGHT, "251", 0.1d, 0d, 1d, "ASP", "ASP Fix Net light control"));
            AddFunction(new Axis(this, ASP, RU_DOBLOG_AXIS, "384", 0.1d, 0d, 1d, "ASP", "TDC Range / Pipper Span control"));
            #endregion

            #region WEAPON_CONTROL
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, OBOGREV, "181", "1", "On", "0", "Off", "Weapon Control", "Missiles - Rockets Heat On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, PUSK, "182", "1", "On", "0", "Off", "Weapon Control", "Missiles - Rockets Launch On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, PITANIE_12, "183", "1", "On", "0", "Off", "Weapon Control", "Pylon 1-2 Power On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, PITANIE_34, "184", "1", "On", "0", "Off", "Weapon Control", "Pylon 3-4 Power On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, GS23, "185", "1", "On", "0", "Off", "Weapon Control", "GS-23 Gun On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, FKP, "187", "1", "On", "0", "Off", "Weapon Control", "Guncam On/Off", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, TAKT_SBROS_SAFETY_COVER, "227", "1", "On", "0", "Off", "Weapon Control", "Tactical Drop Cover", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, TAKT_SBROS, "278", "1", "On", "0", "Off", "Weapon Control", "Tactical Drop Switch", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, AVAR_PUSK_SAFETY_COVER, "275", "1", "On", "0", "Off", "Weapon Control", "Emergency Missile/Rocket Launcher Cover", "%1d"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, AVAR_PUSK, "276", "Weapon Control", "Emergency Missile/Rocket Launcher"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, SBROS_KRIL_BAKOV_SAFETY_COVER, "256", "1", "On", "0", "Off", "Weapon Control", "Drop Wing Fuel Tanks Cover", "%1d"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, SBROS_KRIL_BAKOV, "257", "Weapon Control", "Drop Wing Fuel Tanks"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, SBROS_PODV_BAKOV, "386", "Weapon Control", "Drop Center Fuel Tank"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, SBROS_VNESN_SAFETY_COVER, "269", "1", "On", "0", "Off", "Weapon Control", "Drop Payload - Outer Pylons Cover", "%1d"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, SBROS_VNESN, "270", "Weapon Control", "Drop Payload - Outer Pylon"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, SBROS_VNUTR_SAFETY_COVER, "271", "1", "On", "0", "Off", "Weapon Control", "Drop Payload - Inner Pylons Cover", "%1d"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, SbROS_VNUTR, "272", "Weapon Control", "Drop Payload - Inner Pylons"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, ASP_VOZDUH_ZEMLJA, "230", "1", "Air", "0", "Ground", "Weapon Control", "Weapon Mode - Air/Ground", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, WEAPON_CONTROL, ASP_SS_NEUTR_RNS, "231", "1.0", "IR Missile", "0.5", "Neutral", "0.0", "SAR Missile", "Weapon Control", "IR/Neutral/SAR", "%0.1f"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, ASP_GUN_RELOAD_1, "232", "Weapon Control", "Activate Gun Loading Pyro - 1"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, ASP_GUN_RELOAD_2, "233", "Weapon Control", "Activate Gun Loading Pyro - 2"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, ASP_GUN_RELOAD_3, "234", "Weapon Control", "Activate Gun Loading Pyro - 3"));
            AddFunction(new Switch(this, WEAPON_CONTROL, ASP_LAUNCHER_SELECT, new SwitchPosition[] { new SwitchPosition("0.0", "0", ASP_LAUNCHER_SELECT), new SwitchPosition("0.1", "1", ASP_LAUNCHER_SELECT), 
                new SwitchPosition("0.2", "2", ASP_LAUNCHER_SELECT), new SwitchPosition("0.3", "3", ASP_LAUNCHER_SELECT), new SwitchPosition("0.4", "4", ASP_LAUNCHER_SELECT), 
                new SwitchPosition("0.5", "5", ASP_LAUNCHER_SELECT), new SwitchPosition("0.6", "6", ASP_LAUNCHER_SELECT), new SwitchPosition("0.7", "7", ASP_LAUNCHER_SELECT), 
                new SwitchPosition("0.8", "8", ASP_LAUNCHER_SELECT), new SwitchPosition("0.9", "9", ASP_LAUNCHER_SELECT), new SwitchPosition("1.0", "10", ASP_LAUNCHER_SELECT) 
                }, "Weapon Control", "ASP Launch Selector", "%0.1f"));
            AddFunction(new Axis(this, WEAPON_CONTROL, MISSILE_SOUND, "297", 0.1d, 0d, 1d, "Weapon Control", "Missile Seeker Sound"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, GUN_FIRE_BTN, "381", "Weapon Control", "Fire Gun"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, PUSK_BTN, "382", "Weapon Control", "Release Weapon"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, PUSK_BTN_SAFETY_COVER, "383", "1", "On", "0", "Off", "Weapon Control", "Release Weapon Cover", "%1d"));
            #endregion

            #region HELMET_VISOR
            AddFunction(Switch.CreateToggleSwitch(this, HELMET_VISOR, HELMET_HEAT_MAN_AUT, "306", "1", "Manual", "0", "Auto", "Helmet Visor", "Helmet Heat - Manual/Auto", "%1d"));
            AddFunction(new PushButton(this, HELMET_VISOR, HELMET_QUICK_HEAT, "310", "Helmet Visor", "Helmet Quick Heat"));
            AddFunction(Switch.CreateToggleSwitch(this, HELMET_VISOR, HELMET_VISOR_EXTRA, "369", "1", "On", "0", "Off", "Helmet Visor", "Helmet visor - off/on", "%1d"));
            #endregion

            #region AIR CONDITIONING
            AddFunction(new Switch(this, AIR_CONDITIONING, AIR_CONDITION_SELECT, new SwitchPosition[] { 
                new SwitchPosition("0.00", "Off", AIR_CONDITION_SELECT), new SwitchPosition("0.33", "Cold", AIR_CONDITION_SELECT), 
                new SwitchPosition("0.66", "Auto", AIR_CONDITION_SELECT),new SwitchPosition("0.99", "Warm", AIR_CONDITION_SELECT)},
                "Air Conditioning", "Off/Cold/Auto/Warm", "%0.1f"));
            #endregion

            #region SARPP
            AddFunction(Switch.CreateToggleSwitch(this, SARPP, SARPP_EXTRA, "193", "1", "On", "0", "Off", "SARPP-12", "Flight Data Recorder On/Off", "%1d"));
            #endregion

            #region avAChS
            AddFunction(Switch.CreateThreeWaySwitch(this, avAChS, ACHS_LEFT_PULL, "265", "1.0", "In", "0.0", "Neutral", "-1.0", "Out", "avAChS", "Clock left push/pull springloaded", "%0.1f"));
            AddFunction(new Axis(this, avAChS, ACHS_LEFT_ROTATE, "264", 0.1d, -1d, 1d, "avAChS", "Clock left rotate"));
            AddFunction(Switch.CreateThreeWaySwitch(this, avAChS, ACHS_RIGHT_PUSH, "268", "-1.0", "Up", "0.0", "Neutral", "1.0", "Down", "avAChS", "Clock right push 3way", "%0.1f"));
            AddFunction(new PushButton(this, avAChS, ACHS_RIGHT_PUSH, "268", "avAChS", "Clock right push button"));
            AddFunction(new Axis(this, avAChS, ACHS_RIGHT_ROTATE, "267", 0.1d, 0d, 1d, "avAChS", "Clock right rotate"));
            #endregion

            #region Dummy buttons/switches
            //these 4 are now implemented by leatherneck
            AddFunction(Switch.CreateToggleSwitch(this, RADAR, MISL_MODE_COVER, "632", "1", "Open", "0", "Closed", "Radar", "Radar emission - Cover", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, RADAR, MISL_MODE_ACT_TRAIN, "633", "1", "Combat", "0", "Training", "Radar", "Radar emission - Combat/Training", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, KONUS, AIRDUCT_TEST_COVER, "638", "1", "Open", "0", "Closed", "Mach", "1.7 Mach Test Button - Cover", "%1d"));
            AddFunction(new PushButton(this, KONUS, AIRDUCT_TEST, "639", "Mach", "1.7 Mach Test Button"));
            //not implemented in game
            //AddFunction(new Axis(this, UNCLASSIFIED, GSUIT_MAX_MIN, "634", 0.1d, 0d, 1d, "Unclassified", "G-Suit Max/Min valve"));
            //AddFunction(Switch.CreateToggleSwitch(this, UNCLASSIFIED, SINA_NR_1_COVER, "635", "1", "Open", "0", "Closed", "Unclassified", "Electric Bus Nr.1 - Cover", "%1d"));
            //AddFunction(Switch.CreateToggleSwitch(this, UNCLASSIFIED, SINA_NR_1, "636", "1", "On", "0", "Off", "Unclassified", "Electric Bus Nr.1", "%1d"));
            //AddFunction(Switch.CreateToggleSwitch(this, UNCLASSIFIED, SINA_NR_2, "637", "1", "On", "0", "Off", "Unclassified", "Electric Bus Nr.2", "%1d"));
            //AddFunction(new PushButton(this, UNCLASSIFIED, BU45_BUSTER, "640", "Unclassified", "BU-45 Buster System Separation"));
            //AddFunction(new PushButton(this, UNCLASSIFIED, SODPBU_1, "642", "Unclassified", "SOD Control PBU-1"));
            //AddFunction(new PushButton(this, UNCLASSIFIED, SODPBU_2, "641", "Unclassified", "SOD Control PBU-2"));
            //AddFunction(new PushButton(this, UNCLASSIFIED, EJECT_EJECT_EJECT, "643", "Unclassified", "Eject"));
            //AddFunction(Switch.CreateToggleSwitch(this, UNCLASSIFIED, EMER_OXY, "644", "1", "On", "0", "Off", "Unclassified", "Ejection Seat Emergency Oxygen", "%1d"));
            //AddFunction(Switch.CreateToggleSwitch(this, UNCLASSIFIED, UK_2_MML, "645", "1", "On", "0", "Off", "Unclassified", "UK-2M Mic Amplifier M/L", "%1d"));
            //AddFunction(Switch.CreateToggleSwitch(this, UNCLASSIFIED, UK_2_MGs_KM, "646", "1", "On", "0", "Off", "Unclassified", "UK-2M Mic Amplifier GS/KM", "%1d"));
            //AddFunction(new Axis(this, UNCLASSIFIED, SUIT_VENT, "647", 0.1d, 0d, 1d, "Unclassified", "Suit Ventilation"));
            //AddFunction(Switch.CreateToggleSwitch(this, UNCLASSIFIED, HARNESS, "648", "1", "Open", "0", "Closed", "Unclassified", "Harness Separation", "%1d"));
            //elements["PNT_448"] = default_axis_limited(LOCALIZE("Harness Loose/Tight"),devices.UNCLASSIFIED, device_commands.HarnessLooseTight,650, 0.2, false, false, {0.0, 1.0})
            //elements["PNT_449"] = default_axis_limited(LOCALIZE("Throttle Fixation"),devices.UNCLASSIFIED, device_commands.RUDFixator,651, 0.2, false, false, {0.0, 1.0})
            #endregion

            #region IAB PBK-3 (Nuke control)
            AddFunction(Switch.CreateToggleSwitch(this, NUKE_CONTROL, IAB_AVAR_SBROS, "387", "1", "On", "0", "Off", "Nuke Control", "Emergency Jettison", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, NUKE_CONTROL, IAB_AVAR_SBROS_VZR, "388", "1", "Armed", "0", "Not Armed", "Nuke Control", "Emergency Jettison Armed / Not Armed", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, NUKE_CONTROL, IAB_BOEVOJ_SBROS, "389", "1", "On", "0", "Off", "Nuke Control", "Tactical Jettison", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, NUKE_CONTROL, IAB_SPEC_AB, "390", "1", "Special AB", "0", "Missile-Rocket-Bombs-Cannon", "Nuke Control", "Special AB / Missile-Rocket-Bombs-Cannon", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, NUKE_CONTROL, IAB_TORMOZ, "391", "1", "On", "0", "Off", "Nuke Control", "Brake Chute", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, NUKE_CONTROL, IAB_VOZDUH, "392", "1", "Air", "0", "Ground", "Nuke Control", "Detonation Air / Ground", "%1d"));
            #endregion

            #region SPS 141-100
            AddFunction(Switch.CreateToggleSwitch(this, SPS_CONTROL, SPS_ON_OFF, "393", "1", "On", "0", "Off", "SPS Control", "Detonation Air / Ground", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SPS_CONTROL, SPS_TRANSMIT, "394", "1", "Transmit", "0", "Receive", "SPS Control", "Transmit / Receive", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SPS_CONTROL, SPS_PROGRAM, "395", "1", "Prog 1", "0", "Prog 2", "SPS Control", "Program I / II", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SPS_CONTROL, SPS_CONTINOUS, "396", "1", "Continuous", "0", "Continuous", "SPS Control", "Continuous / Continuous", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SPS_CONTROL, SPS_TEST, "397", "1", "On", "0", "Off", "SPS Control", "Test", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, SPS_CONTROL, SPS_DISPENSE, "398", "1", "Auto", "0", "Manual", "SPS Control", "Dispenser Auto / Manual", "%1d"));
            AddFunction(Switch.CreateThreeWaySwitch(this, SPS_CONTROL, SPS_OFF_PARAL_FULL, "399", "0.0", "Off", "0.5", "Parallel", "1.0", "Full", "SPS", "Off/Parallel/Full", "%0.1f"));
            AddFunction(Switch.CreateToggleSwitch(this, SPS_CONTROL, SPS_COVER, "400", "1", "Open", "0", "Closed", "SPS Control", "Manual Activation button - Cover", "%1d"));
            AddFunction(new PushButton(this, SPS_CONTROL, SPS_PUSH, "401", "SPS Control", "Manual Activation button"));
            #endregion

            #region GUV Control Box -/N/ GUV is useless, it's mostly anti-infantry weapon
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, GUV_ON_OFF, "420", "1", "On", "0", "Off", "Weapon Control GUV", "Manual Activation button - Cover", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, WEAPON_CONTROL, GUV_POD_MAIN, "421", "1", "Main", "0", "UPK", "Weapon Control GUV", "MAIN GUN / UPK Guns", "%1d"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, GUV_ARM_1, "422", "Weapon Control GUV", "LOAD 1"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, GUV_ARM_2, "425", "Weapon Control GUV", "LOAD 2"));
            AddFunction(new PushButton(this, WEAPON_CONTROL, GUV_ARM_3, "424", "Weapon Control GUV", "LOAD 3"));
            #endregion

            #region Warning Lights
            AddFunction(new FlagValue(this, "541", "Warning Lights", "Canopy Warning light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "542", "Warning Lights", "SORC light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "407", "Warning Lights", "Check state", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "516", "Warning Lights", "Marker light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "518", "Warning Lights", "Stabilizator light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "520", "Warning Lights", "Check gear light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "521", "Warning Lights", "Flaps light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "522", "Warning Lights", "Airbrake light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "523", "Warning Lights", "Central Pylon light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "524", "Warning Lights", "Rato L light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "525", "Warning Lights", "Rato R light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "526", "Warning Lights", "Pylon 1 On light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "527", "Warning Lights", "Pylon 2 On light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "528", "Warning Lights", "Pylon 3 On light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "529", "Warning Lights", "Pylon 4 On light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "530", "Warning Lights", "Pylon 1 Off light", "Indicator lit when off"));
            AddFunction(new FlagValue(this, "531", "Warning Lights", "Pylon 2 Off light", "Indicator lit when off"));
            AddFunction(new FlagValue(this, "532", "Warning Lights", "Pylon 3 Off light", "Indicator lit when off"));
            AddFunction(new FlagValue(this, "533", "Warning Lights", "Pylon 4 Off light", "Indicator lit when off"));
            #endregion

            #region in cockpit indicators
            AddFunction(new FlagValue(this, "9", "Cockpit Indicators", "Gear Nose Up Light", "Indicator lit when up"));
            AddFunction(new FlagValue(this, "12", "Cockpit Indicators", "Gear Nose Down Light", "Indicator lit when down"));
            AddFunction(new FlagValue(this, "10", "Cockpit Indicators", "Gear Left Up Light", "Indicator lit when up"));
            AddFunction(new FlagValue(this, "13", "Cockpit Indicators", "Gear Left Down Light", "Indicator lit when down"));
            AddFunction(new FlagValue(this, "11", "Cockpit Indicators", "Gear Right Up Light", "Indicator lit when up"));
            AddFunction(new FlagValue(this, "14", "Cockpit Indicators", "Gear Right Down Light", "Indicator lit when down"));

            AddFunction(new FlagValue(this, "548", "Cockpit Indicators", "RSBN azimuth correction light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "549", "Cockpit Indicators", "RSBN range correction light", "Indicator lit when on"));

            AddFunction(new FlagValue(this, "500", "Cockpit Indicators", "Low alt light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "537", "Cockpit Indicators", "AOA warning light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "535", "Cockpit Indicators", "KPP Arrested light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "519", "Cockpit Indicators", "Trimmer light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "510", "Cockpit Indicators", "DC Gen light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "511", "Cockpit Indicators", "AC Gen light", "Indicator lit when on"));

            AddFunction(new FlagValue(this, "501", "Cockpit Indicators", "Fuel PODC light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "502", "Cockpit Indicators", "Fuel 1GR light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "503", "Cockpit Indicators", "Fuel 450 light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "504", "Cockpit Indicators", "Fuel 3GR light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "505", "Cockpit Indicators", "Fuel PODW light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "506", "Cockpit Indicators", "Fuel Expence light", "Indicator lit when on"));

            AddFunction(new FlagValue(this, "509", "Cockpit Indicators", "Start Device Doused light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "507", "Cockpit Indicators", "Afterburner 1 light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "508", "Cockpit Indicators", "Afterburner 2 light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "512", "Cockpit Indicators", "Nozzle light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "517", "Cockpit Indicators", "Cone light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "513", "Cockpit Indicators", "Oil light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "534", "Cockpit Indicators", "Fire light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "515", "Cockpit Indicators", "Check Hydraulic pressure light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "514", "Cockpit Indicators", "Check Buster pressure light", "Indicator lit when on"));

            AddFunction(new FlagValue(this, "539", "Cockpit Indicators", "ASP Target acquired light", "Indicator lit when acquired"));
            AddFunction(new FlagValue(this, "581", "Cockpit Indicators", "IAB light 1", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "582", "Cockpit Indicators", "IAB light 2", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "583", "Cockpit Indicators", "IAB light 3", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "593", "Cockpit Indicators", "SPS Illumination", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "546", "Cockpit Indicators", "SAU Stabilisation light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "547", "Cockpit Indicators", "SAU feeding light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "544", "Cockpit Indicators", "SAU landing command light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "545", "Cockpit Indicators", "SAU landing auto light", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "550", "Cockpit Indicators", "GUN gotovn LIGHT", "Indicator lit when on"));

            AddFunction(new FlagValue(this, "601", "Cockpit Indicators", "SPO LF", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "602", "Cockpit Indicators", "SPO RF", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "603", "Cockpit Indicators", "SPO RB", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "604", "Cockpit Indicators", "SPO LB", "Indicator lit when on"));
            AddFunction(new FlagValue(this, "605", "Cockpit Indicators", "SPO Muted", "Indicator lit when up"));

            #endregion


            /******************************************************
             * ******************GAUGES BELOW**********************
             * ****************************************************/

            #region Accelerometer
            CalibrationPointCollectionDouble accelerometerScale = new CalibrationPointCollectionDouble(-0.41d, -5, 1.0d, 10d);
            accelerometerScale.Add(new CalibrationPointDouble(0.096d, 1d));
            accelerometerScale.Add(new CalibrationPointDouble(0.5d, 5d));
            accelerometerScale.Add(new CalibrationPointDouble(0.81d, 8d));
            AddFunction(new ScaledNetworkValue(this, "110", accelerometerScale, "Accelerometer", "Acceleration", "Current gs", "", BindingValueUnits.Numeric, "%0.2f"));
            AddFunction(new ScaledNetworkValue(this, "113", 9d, "Accelerometer", "Maxium acceleration", "Max Gs attained.", "", BindingValueUnits.Numeric, 1d, "%0.2f"));
            AddFunction(new ScaledNetworkValue(this, "114", 6d, "Accelerometer", "Minimum acceleration", "Min Gs attained.", "", BindingValueUnits.Numeric, -5d, "%0.2f"));
            AddFunction(new PushButton(this, ACCELEROMETER, ACCEL_RESET, "228", "Accelerometer", "Accelerometer Reset buton"));
            #endregion

            #region IAS
            AddFunction(new ScaledNetworkValue(this, "100", 555.55d, "IAS", "IAS", "Current ias", "", BindingValueUnits.Numeric, 0d, "%0.4f"));
            #endregion

            #region TAS
            CalibrationPointCollectionDouble tasScale = new CalibrationPointCollectionDouble(0.20d, 167d, 1.0d, 833d);
            tasScale.Add(new CalibrationPointDouble(0.309d, 278d));
            tasScale.Add(new CalibrationPointDouble(0.49d, 417d));
            tasScale.Add(new CalibrationPointDouble(0.67d, 555d));
            AddFunction(new ScaledNetworkValue(this, "101", tasScale, "TAS", "TAS", "Current tas", "", BindingValueUnits.Numeric, "%0.4f"));

            CalibrationPointCollectionDouble mScale = new CalibrationPointCollectionDouble(0d, 0d, 1.0d, 3.0d);
            mScale.Add(new CalibrationPointDouble(0.202d, 0.6d));
            mScale.Add(new CalibrationPointDouble(0.312d, 1.0d));
            mScale.Add(new CalibrationPointDouble(0.6d, 1.8d));
            mScale.Add(new CalibrationPointDouble(0.66d, 2.0d));
            AddFunction(new ScaledNetworkValue(this, "102", 3.00d, "TAS", "M", "Current mach", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region Fuel Gauge
            AddFunction(new ScaledNetworkValue(this, "52", 6000d, "Fuel", "Fuel Gauge", "Current fuel", "", BindingValueUnits.Numeric, 0, "%0.4f"));
            #endregion

            #region UUA (aoa)
            AddFunction(new ScaledNetworkValue(this, "105", 0.6108d, "UUA", "UUA (AOA)", "Current Angle", "", BindingValueUnits.Numeric, 0d, "%0.4f"));
            #endregion

            #region DA200
            CalibrationPointCollectionDouble vviScale = new CalibrationPointCollectionDouble(-1d, -400d, 1.0d, 400d);
            vviScale.Add(new CalibrationPointDouble(-0.878d, -200d));
            vviScale.Add(new CalibrationPointDouble(-0.754d, -100d));
            vviScale.Add(new CalibrationPointDouble(-0.575d, -50d));
            vviScale.Add(new CalibrationPointDouble(-0.504d, -20d));
            vviScale.Add(new CalibrationPointDouble(-0.256d, -10d));
            vviScale.Add(new CalibrationPointDouble(0d, 0d));
            vviScale.Add(new CalibrationPointDouble(0.256d, 10d));
            vviScale.Add(new CalibrationPointDouble(0.505d, 20d));
            vviScale.Add(new CalibrationPointDouble(0.571d, 50d));
            vviScale.Add(new CalibrationPointDouble(0.751d, 100d));
            vviScale.Add(new CalibrationPointDouble(0.871d, 200d));
            AddFunction(new ScaledNetworkValue(this, "106", vviScale, "DA200", "DA200 VVI", "Current vvi", "", BindingValueUnits.Numeric, "%.4f"));

            AddFunction(new ScaledNetworkValue(this, "31", 1d, "DA200", "DA200 Slip", "Current slip", "", BindingValueUnits.Numeric, 0d, "%.4f"));

            AddFunction(new ScaledNetworkValue(this, "107", 0.0443d, "DA200", "DA200 Turn", "Current turn", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region KPP aka ADI
            AddFunction(new ScaledNetworkValue(this, "108", 180d, "KPP", "Bank", "Current bank", "(-180 to 180)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "109", -90d, "KPP", "Pitch", "Current pitch", "(-90 to 90)", BindingValueUnits.Degrees));
            AddFunction(new NetworkValue(this, "565", "KPP", "bank steering offset", "Current amount of bank steering displayed on the KPP.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "566", "KPP", "pitch steering offset", "Current amount of pitch steering displayed on the KPP.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new FlagValue(this, "567", "KPP", "K flag", "Indicates whether the K flag is displayed on the KPP."));
            AddFunction(new FlagValue(this, "568", "KPP", "T flag", "Indicates whether the T flag is displayed on the KPP."));
            //For slip uses the same input as da200
            //for the 2 PRMG aux uses the same input as NPP main course & glideslope needles
            #endregion

            #region NPP aka HSI
            //required for KPP aux input too==
            AddFunction(new NetworkValue(this, "590", "NPP", "Course Needle", "Current course required on NPP & KPP.", "(-1 to 1)", BindingValueUnits.Numeric));
            AddFunction(new NetworkValue(this, "589", "NPP", "Glideslope Needle", "Current glideslope required on NPP & KPP.", "(-1 to 1)", BindingValueUnits.Numeric));
            //================================
            AddFunction(new ScaledNetworkValue(this, "111", 360d, "NPP", "Heading", "Current heading displayed on the HSI", "(0-360)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "68", 360d, "NPP", "Commaned Course", "Current commanded course on the HSI", "(0-360)", BindingValueUnits.Degrees));
            AddFunction(new ScaledNetworkValue(this, "36", 360d, "NPP", "Bearing", "Current bearing displayed on the HSI", "(0-360)", BindingValueUnits.Degrees));
            AddFunction(new FlagValue(this, "587", "NPP", "K flag", "Indicates whether the K flag is displayed on the NPP."));
            AddFunction(new FlagValue(this, "588", "NPP", "G flag", "Indicates whether the G flag is displayed on the NPP."));
            #endregion

            #region Engine Exhaust Temp
            CalibrationPointCollectionDouble engtempScale = new CalibrationPointCollectionDouble(0d, 300d, 1.0d, 900d);
            engtempScale.Add(new CalibrationPointDouble(0.11d, 400d));
            engtempScale.Add(new CalibrationPointDouble(0.25d, 500d));
            engtempScale.Add(new CalibrationPointDouble(0.39d, 600d));
            engtempScale.Add(new CalibrationPointDouble(0.51d, 650d));
            engtempScale.Add(new CalibrationPointDouble(0.635d, 700d));
            engtempScale.Add(new CalibrationPointDouble(0.75d, 750d));
            engtempScale.Add(new CalibrationPointDouble(0.87d, 800d));
            engtempScale.Add(new CalibrationPointDouble(0.95d, 850d));
            AddFunction(new ScaledNetworkValue(this, "51", engtempScale, "Engine", "Exhaust Temp", "Current temp", "", BindingValueUnits.Numeric, "%0.4f"));
            #endregion

            #region Engine RPM
            CalibrationPointCollectionDouble enginerpmScale = new CalibrationPointCollectionDouble(0.0d, 0.0, 1.0d, 110d);
            AddFunction(new ScaledNetworkValue(this, "50", enginerpmScale, "EngineRpm", "EngineRpm1", "Current rpm", "", BindingValueUnits.Numeric, "%0.4f"));
            AddFunction(new ScaledNetworkValue(this, "670", enginerpmScale, "EngineRpm", "EngineRpm2", "Current rpm", "", BindingValueUnits.Numeric, "%0.4f"));
            #endregion

            #region Radio Altimeter
            CalibrationPointCollectionDouble radaltScale = new CalibrationPointCollectionDouble(0d, 0d, 1.0d, 1000d);
            radaltScale.Add(new CalibrationPointDouble(0.041d, 10d));
            radaltScale.Add(new CalibrationPointDouble(0.07d, 20d));
            radaltScale.Add(new CalibrationPointDouble(0.103d, 30d));
            radaltScale.Add(new CalibrationPointDouble(0.13d, 40d));
            radaltScale.Add(new CalibrationPointDouble(0.181d, 50d));
            radaltScale.Add(new CalibrationPointDouble(0.21d, 60d));
            radaltScale.Add(new CalibrationPointDouble(0.245d, 70d));
            radaltScale.Add(new CalibrationPointDouble(0.260d, 80d));
            radaltScale.Add(new CalibrationPointDouble(0.298d, 90d));
            radaltScale.Add(new CalibrationPointDouble(0.325d, 100d));
            radaltScale.Add(new CalibrationPointDouble(0.472d, 150d));
            radaltScale.Add(new CalibrationPointDouble(0.58d, 200d));
            radaltScale.Add(new CalibrationPointDouble(0.680d, 250d));
            radaltScale.Add(new CalibrationPointDouble(0.732d, 300d));
            radaltScale.Add(new CalibrationPointDouble(0.807d, 400d));
            radaltScale.Add(new CalibrationPointDouble(0.867d, 500d));
            radaltScale.Add(new CalibrationPointDouble(0.909d, 600d));
            AddFunction(new ScaledNetworkValue(this, "103", radaltScale, "Radio Altimeter", "Radio Altimeter", "Current AGL", "", BindingValueUnits.Numeric, "%0.4f"));
            #endregion

            #region Baro Altimeter
            //uses baro alt pressure knob axis as input for qfe card
            AddFunction(new Axis(this, ALTIMETER, ALTIMETER_PRESSURE, "262", 0.01d, -1d, 1d, "Baro Altimeter", "Altimeter pressure knob axis"));
            AddFunction(new PushButton(this, ALTIMETER, ALTIMETER_PRESSURE_RESET, "653", "Baro Altimeter", "Altimeter Pressure Reset"));
            CalibrationPointCollectionDouble baroAltimeterMScale = new CalibrationPointCollectionDouble(0.0d, 0d, 1.0d, 1000d);
            baroAltimeterMScale.Add(new CalibrationPointDouble(0.211d, 200d));
            baroAltimeterMScale.Add(new CalibrationPointDouble(0.416d, 400d));
            baroAltimeterMScale.Add(new CalibrationPointDouble(0.61d, 600d));
            baroAltimeterMScale.Add(new CalibrationPointDouble(0.815d, 800d));
            AddFunction(new ScaledNetworkValue(this, "104", baroAltimeterMScale, "Baro Altimeter", "Altimeter M", "Current Meters", "", BindingValueUnits.Meters, "%0.4f"));
            AddFunction(new ScaledNetworkValue(this, "112", 30000d, "Baro Altimeter", "Altimeter Km", "Current Km's", "", BindingValueUnits.Meters, 0d, "%0.4f"));
            AddFunction(new ScaledNetworkValue(this, "658", 1000d, "Baro Altimeter", "Altimeter Triangle M", "Current Triangle Meters", "", BindingValueUnits.Meters, 0d, "%0.4f"));
            AddFunction(new ScaledNetworkValue(this, "652", 30000d, "Baro Altimeter", "Altimeter Triangle Km", "Current Triangle Km's", "", BindingValueUnits.Meters, 0d, "%0.4f"));
            #endregion

            #region ARU-3VM
            AddFunction(new ScaledNetworkValue(this, "64", 1d, "ARU", "ARU-3VM", "Current ratio", "", BindingValueUnits.Numeric, 0d, "%0.4f"));
            #endregion

            #region Nosecone Position UPES3
            //Nosecone manual needle uses position controller output
            CalibrationPointCollectionDouble upesScale = new CalibrationPointCollectionDouble(0d, 0d, 1.0d, 1.0d);
            AddFunction(new ScaledNetworkValue(this, "66", 1.0d, "Nose Cone", "Nosecone position", "Nose position", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            AddFunction(Switch.CreateToggleSwitch(this, KONUS, KONUS_ON, "170", "1", "Open", "0", "Closed", "Nose Cone", "Nosecone On/Of", "%1d"));
            AddFunction(Switch.CreateToggleSwitch(this, KONUS, KONUS_MAN_AUTO, "309", "1", "Open", "0", "Closed", "Nose Cone", "Nosecone Control - Manual/Auto", "%1d"));
            AddFunction(new Axis(this, KONUS, KONUS_BUTTON, "236", 0.1d, 0d, 1d, "Nose Cone", "Nosecone manual position controller"));
            #endregion

            #region Hydraulic Pressure
            AddFunction(new ScaledNetworkValue(this, "126", 300d, "Hydraulic Pressure Gauge", "Hydraulic Pressure Main", "Current pressure", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            AddFunction(new ScaledNetworkValue(this, "125", 300d, "Hydraulic Pressure Gauge", "Hydraulic Pressure Secondary", "Current pressure", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region Voltmeter
            AddFunction(new ScaledNetworkValue(this, "124", 30d, "Voltmeter Gauge", "Voltmeter", "Current Volts", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region Oil Pressure Gauge
            AddFunction(new ScaledNetworkValue(this, "627", 4d, "Oil Pressure Gauge", "Oil Pressure", "Current Pressure", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region RSBN Distance
            AddFunction(new ScaledNetworkValue(this, "357", 10d, "RSBN Distance Gauge", "RSBN Distance Single Meters", "Current Singles Distance", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            AddFunction(new ScaledNetworkValue(this, "356", 10d, "RSBN Distance Gauge", "RSBN Distance Tens Meters", "Current Tens Distance", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            AddFunction(new ScaledNetworkValue(this, "355", 10d, "RSBN Distance Gauge", "RSBN Distance Hundreds Meters", "Current Hundreds Distance", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region Engine Oxygen Manometer (engine O2 feed)
            AddFunction(new ScaledNetworkValue(this, "61", 40d, "Engine O2 Gauge", "Engine O2", "Current O2", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region O2 Level Gauge
            AddFunction(new ScaledNetworkValue(this, "59", 150d, "O2 Level Gauge", "O2 Level", "Current level", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            AddFunction(new FlagValue(this, "60", "O2 Level Gauge", "Lung Blinkers", "Indicates whether the O2 is flowing."));
            #endregion

            #region O2 Pressure Gauge
            AddFunction(new ScaledNetworkValue(this, "58", 20d, "O2 Pressure Gauge", "O2 Pressure", "Current pressure", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

            #region Battery capacity meter gauge
            AddFunction(new ScaledNetworkValue(this, "55", 100d, "Battery Capacity Gauge", "Battery Capacity", "Current capacity", "", BindingValueUnits.Numeric, 0d, "%.4f"));
            #endregion

        }
Example #60
0
        public KPP()
            : base("KPP", new Size(400, 420))
        {
            Point center = new Point(200, 196);

            _bankSteeringCalibration = new CalibrationPointCollectionDouble(-1d, -45d, 1d, 45d);

            _pitchCalibration = new CalibrationPointCollectionDouble(180d, -953d, -180d, 953d);

            _pitchSteeringCalibration = new CalibrationPointCollectionDouble(-1d, -100d, 1d, 100d);

            _courseDeviationCalibration = new CalibrationPointCollectionDouble(-1d, -55d, 1d, 55d);
            _glideslopeDeviationCalibration = new CalibrationPointCollectionDouble(1d, -55d, -1d, 55d);

            _slipCalibration = new CalibrationPointCollectionDouble(-1d, 74d, 1d, -74d);
            _slipCalibration.Add(new CalibrationPointDouble(0d, 0d));

            _pitchBallNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/KPP/adi_pitch_ball.xaml", center, new Size(264, 2165), new Point(132, 1082.5));

            _pitchBallNeedle.Clip = new EllipseGeometry(center, 142, 142);
            Components.Add(_pitchBallNeedle);

            _bankSteeringBarNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/KPP/adi_bank_steering_bar.xaml", new Point(200, 332), new Size(6, 186), new Point(4, 182));
            Components.Add(_bankSteeringBarNeedle);

            _pitchSteeringBarNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/KPP/adi_pitch_steering_bar.xaml", center, new Size(271, 6), new Point(135.5, 3));
            Components.Add(_pitchSteeringBarNeedle);

            Components.Add(new GaugeImage("{Helios}/Gauges/Mig-21/KPP/adi_inner_bezel.xaml", new Rect(0, 0, 400, 420)));

            _aircraftSymbolNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/KPP/adi_aircraft_symbol.xaml", center, new Size(253, 37), new Point(126.5, 18.5));
            Components.Add(_aircraftSymbolNeedle);

            _courseDeviationNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/KPP/adi_lateral_deviation_needle.xaml", new Point(199, 31), new Size(5, 23), new Point(2.5, 12.5));
            Components.Add(_courseDeviationNeedle);

            _glideslopeDeviationNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/KPP/adi_airspeed_deviation_needle.xaml", new Point(29, 195), new Size(23, 5), new Point(12.5, 2.5));
            Components.Add(_glideslopeDeviationNeedle);

            _tFlagImage = new GaugeImage("{Helios}/Gauges/Mig-21/KPP/adi_t_flag.xaml", new Rect(54, 48, 54, 54));
            Components.Add(_tFlagImage);

            _kFlagImage = new GaugeImage("{Helios}/Gauges/Mig-21/KPP/adi_k_flag.xaml", new Rect(286, 47, 54, 54));
            Components.Add(_kFlagImage);

            _slipBallNeedle = new GaugeNeedle("{Helios}/Gauges/Mig-21/KPP/adi_slip_ball.xaml", new Point(199.5, 405), new Size(23, 23), new Point(11.5, 11.5));
            Components.Add(_slipBallNeedle);

            _tFlag = new HeliosValue(this, new BindingValue(false), "", "T Flag", "Indicates whether the T flag is displayed.", "True if displayed.", BindingValueUnits.Boolean);
            _tFlag.Execute += new HeliosActionHandler(TFlag_Execute);
            Actions.Add(_tFlag);

            _kFlag = new HeliosValue(this, new BindingValue(false), "", "K Flag", "Indicates whether the K flag is displayed.", "True if displayed.", BindingValueUnits.Boolean);
            _kFlag.Execute += new HeliosActionHandler(KFlag_Execute);
            Actions.Add(_kFlag);

            _pitch = new HeliosValue(this, new BindingValue(0d), "", "Pitch", "Current ptich of the aircraft.", "(0 - 360)", BindingValueUnits.Degrees);
            _pitch.Execute += new HeliosActionHandler(Pitch_Execute);
            Actions.Add(_pitch);

            _bank = new HeliosValue(this, new BindingValue(0d), "", "Bank", "Current bank of the aircraft.", "(0 - 360)", BindingValueUnits.Degrees);
            _bank.Execute += new HeliosActionHandler(Bank_Execute);
            Actions.Add(_bank);

            _bankSteeringOffset = new HeliosValue(this, new BindingValue(1d), "", "Bank steering bar offset", "Location of bank steering bar.", "(-1 to 1) -1 full left and 1 is full right.", BindingValueUnits.Numeric);
            _bankSteeringOffset.Execute += new HeliosActionHandler(BankSteering_Execute);
            Actions.Add(_bankSteeringOffset);

            _pitchSteeringOffet = new HeliosValue(this, new BindingValue(1d), "", "Pitch steering bar offset", "Location of bank steering bar.", "(-1 to 1) -1 full up and 1 is full down.", BindingValueUnits.Numeric);
            _pitchSteeringOffet.Execute += new HeliosActionHandler(PitchSteering_Execute);
            Actions.Add(_pitchSteeringOffet);

            _glideslopeDeviation = new HeliosValue(this, new BindingValue(1d), "", "Aux Glideslop Deviation use NPP", "Aux glideslope deviation needle.", "(-1 to 1) -1 full up and 1 is full down.", BindingValueUnits.Numeric);
            _glideslopeDeviation.Execute += new HeliosActionHandler(GlideslopeDeviation_Execute);
            Actions.Add(_glideslopeDeviation);

            _courseDeviation = new HeliosValue(this, new BindingValue(1d), "", "Aux Course Deviation use NPP", "Aux course deviation needle.", "(-1 to 1) -1 full left and 1 is full right.", BindingValueUnits.Numeric);
            _courseDeviation.Execute += new HeliosActionHandler(CourseDeviation_Execute);
            Actions.Add(_courseDeviation);

            _sideSlip = new HeliosValue(this, new BindingValue(1d), "", "Side Slip use DA200 slip", "Offset of side slip ball.", "(-1 to 1) -1 full left and 1 is full right.", BindingValueUnits.Numeric);
            _sideSlip.Execute += new HeliosActionHandler(SideSlip_Execute);
            Actions.Add(_sideSlip);
        }