public void TakeOffReportShouldHaveAssumedTemp() { var p = GetParameters(); var t = LoaderTest.GetTable(); var r = Calculator.TakeOffReport(t, p); // Should not throw }
public void HasMatchingFlaps() { var p = GetParameters(); var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); // Should not throw. }
public void TakeOffReportRunwayTooShort() { var p = GetParameters(); p.RwyLengthMeter = 500; var t = LoaderTest.GetTable(); Assert.Throws <RunwayTooShortException>(() => Calculator.TakeOffReport(t, p)); }
public void TakeOffReportFlapsNotFound() { var p = GetParameters(); p.FlapsIndex = 1; var t = LoaderTest.GetTable(); Assert.Throws <Exception>(() => Calculator.TakeOffReport(t, p)); }
public void NoMatchingFlaps() { var p = GetParameters(); p.FlapsIndex = 1; var t = LoaderTest.GetTable(); Assert.Throws <Exception>(() => Calculator.TakeOffDistanceMeter(t, p)); }
public void Only1TableNoCorrection() { var p = GetParameters(); var t = LoaderTest.GetTable(); t.Tables = t.Tables.Where(x => x.IsaOffset < 1).ToList(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual(5000 * Constants.FtMeterRatio, d, 10); }
public void TwoTablesIsaOffset() { var p = GetParameters(); p.OatCelsius += 7.5; p.WeightKg = (139_000 + 132_000) / 2.0 * Constants.LbKgRatio; var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual(4000 * Constants.FtMeterRatio, d, 10); }
public void WetCorrection() { var p = GetParameters(); p.WeightKg -= 2273 * Constants.LbKgRatio; p.SurfaceWet = true; var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual(5000 * Constants.FtMeterRatio, d, 10); }
public void PacksOnCorrection() { var p = GetParameters(); p.WeightKg -= 4888.9 * Constants.LbKgRatio; p.PacksOn = true; var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual(5000 * Constants.FtMeterRatio, d, 10); }
public void AllAICorrection() { var p = GetParameters(); p.WeightKg -= 1666.7 * Constants.LbKgRatio; p.AntiIce = AntiIceOption.EngAndWing; var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual(5000 * Constants.FtMeterRatio, d, 10); }
public void DownhillCorrection() { var p = GetParameters(); p.RwySlopePercent = -1.0; p.WeightKg = (139_000 * 80 + 152_000 * 920) / 1000.0 * Constants.LbKgRatio; var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual((4920 - 55.76) * Constants.FtMeterRatio, d, 10); }
public void NonZeroAltitude() { var p = GetParameters(); p.RwyElevationFt = 2000; p.OatCelsius = 15 - 1.98 * 2; p.WeightKg = 146_000 * Constants.LbKgRatio; var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual(5000 * Constants.FtMeterRatio, d, 10); }
public void TailwindCorrection() { var p = GetParameters(); p.WindSpeedKnots = 10; p.WindHeading = 180; p.WeightKg = (139_000 * 80 + 152_000 * 920) / 1000.0 * Constants.LbKgRatio; var t = LoaderTest.GetTable(); var d = Calculator.TakeOffDistanceMeter(t, p); Assert.AreEqual((4920 + 10 * 74.62) * Constants.FtMeterRatio, d, 10); }