Esempio n. 1
0
        public void LandingReportRunwayTooShort()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            d.Parameters.RwyLengthMeter = 100;
            Assert.Throws <RunwayTooShortException>(() => Calculator.LandingReport(d));
        }
Esempio n. 2
0
        public void NoCorrection()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            var dis = Calculator.LandingDistanceMeter(d);

            Assert.AreEqual(2460 * Constants.FtMeterRatio, dis, 10);
        }
Esempio n. 3
0
        public void ElevationCorrectionDry()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            d.Parameters.ElevationFT = 1000;
            var dis = Calculator.LandingDistanceMeter(d);

            Assert.AreEqual(2460 * Constants.FtMeterRatio * 1.03, dis, 10);
        }
Esempio n. 4
0
        public void LandingReportTest()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            var r = Calculator.LandingReport(d);

            Assert.IsTrue(r.AllBrakes.All(x => x.RemainingDistanceMeter >= 0));
            Assert.IsTrue(r.SelectedBrake.RemainingDistanceMeter >= 0);
        }
Esempio n. 5
0
        public void SpeedCorrection()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            d.Parameters.AppSpeedIncrease = 5;
            var dis = Calculator.LandingDistanceMeter(d);

            Assert.AreEqual(2460 * Constants.FtMeterRatio * 1.08, dis, 10);
        }
Esempio n. 6
0
        public void BothReversersCorrectionDry()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            d.Parameters.Reverser = 1;
            var dis = Calculator.LandingDistanceMeter(d);

            Assert.AreEqual(2460 * Constants.FtMeterRatio * 0.97, dis, 10);
        }
Esempio n. 7
0
        public void TailwindCorrectionDry()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            d.Parameters.HeadwindKts = -10;
            var dis = Calculator.LandingDistanceMeter(d);

            Assert.AreEqual(2460 * Constants.FtMeterRatio * 1.20, dis, 10);
        }
Esempio n. 8
0
        public void HeadwindCorrectionWet()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            d.Parameters.HeadwindKts      = 10;
            d.Parameters.SurfaceCondition = 1;
            var dis = Calculator.LandingDistanceMeter(d);

            Assert.AreEqual(2952 * Constants.FtMeterRatio, dis, 10);
        }
Esempio n. 9
0
        public void ElevationCorrectionWet()
        {
            var d = new CalculatorData()
            {
                Table      = LoaderTest.GetTable(),
                Parameters = GetParameters
            };

            d.Parameters.SurfaceCondition = 1;
            d.Parameters.ElevationFT      = -1000;
            var dis = Calculator.LandingDistanceMeter(d);

            Assert.AreEqual(2952 * Constants.FtMeterRatio * 0.97, dis, 10);
        }