CruiseAltValid(ICrzAltProvider altProvider, IReadOnlyList <IPlanNode> nodes) { int tocIndex = TocIndex(nodes); var toc = nodes[tocIndex]; var heading = Heading(toc, nodes[tocIndex + 1]); bool valid = altProvider.IsValidCrzAlt(toc, heading, toc.Alt); double newAlt = valid ? toc.Alt : altProvider.ClosestAltBelow(toc, heading, toc.Alt); return(valid, newAlt); }
/// <summary> /// Note: routesToAltn can be empty. In that case, alternates are not used. /// </summary> public FuelReportGenerator( AirportManager airportList, ICrzAltProvider altProvider, IWxTableCollection windTable, Route routeToDest, IEnumerable <Route> routesToAltn, FuelParameters para, double maxAlt = 41000.0) { this.airportList = airportList; this.altProvider = altProvider; this.windTable = windTable; this.routeToDest = routeToDest; this.routesToAltn = routesToAltn.ToList(); this.para = para; this.maxAlt = maxAlt; }
public InitialPlanCreator( AirportManager airportList, ICrzAltProvider altProvider, IWxTableCollection windTable, Route route, FuelDataItem fuelData, double zfw, double landingFuel, double maxAlt) { this.airportList = airportList; this.altProvider = altProvider; this.windTable = windTable; this.route = route; this.fuelData = fuelData; this.zfw = zfw; this.landingFuel = landingFuel; this.maxAlt = maxAlt; }
/// <exception cref="ArgumentException"></exception> public FuelCalculator( AirportManager airportList, ICrzAltProvider altProvider, IWxTableCollection windTable, Route route, FuelDataItem fuelData, double zfw, double landingFuel, double maxAlt) { if (route.Count < 2) { throw new ArgumentException(); } this.airportList = airportList; this.altProvider = altProvider; this.windTable = windTable; this.route = route; this.fuelData = fuelData; this.zfw = zfw; this.landingFuel = landingFuel; this.maxAlt = maxAlt; }