public static SidCollection GetSidCollection() { if (SidCollection == null) { SidCollection = SidReader.Parse(sidAllTxt.Lines()); } return(SidCollection); }
private bool ContainResult( SidCollection collection, string sid, string rwy, List <Waypoint> wpts, EntryType type, bool endWithVector) { return(collection.SidList.Any(i => i.Name == sid && i.RunwayOrTransition == rwy && i.Waypoints.SequenceEqual(wpts) && i.Type == type && i.EndWithVector == endWithVector)); }
public Route FindRoute( string icao, string rwy, SidCollection sidCol, IReadOnlyList <string> sids, int wptIndex) { var editor = wptList.GetEditor(); var handler = new SidHandler(icao, sidCol, wptList, editor, airportList); return(finder.FindRoute( new OrigInfo(rwy, sids, handler), wptIndex, editor)); }
private bool containResult_Common( SidCollection collection, string sid, List <Waypoint> wpts, bool endWithVector) { return(collection.SidList.Any(i => i.Name == sid && i.Waypoints.SequenceEqual(wpts) && i.Type == EntryType.Common && i.EndWithVector == endWithVector)); }
public SidExtractor( RouteString route, string rwy, Waypoint rwyWpt, WaypointList wptList, SidCollection sids) { this.route = new LinkedList <string>(route); this.rwy = rwy; this.rwyWpt = rwyWpt; this.wptList = wptList; this.sids = sids; }
private void rwySpecificAndCommonPart(bool hasVector) { var sids = new SidCollection( CreateList(RwySpecificPart(!hasVector), CommonPart(hasVector))); var info = sids.GetSidInfo("SID1", "05", runway05); Assert.IsTrue(new Waypoint("WPTA", 12.0, 21.0).Equals(info.LastWaypoint)); Assert.AreEqual(hasVector, info.EndsWithVector); Assert.AreEqual(DistanceRwySpecificAndCommonPart(), info.TotalDistance, 1E-8); }
public Route FindRoute( string origIcao, string origRwy, SidCollection sidCol, IReadOnlyList <string> sids, string destIcao, string destRwy, StarCollection starCol, IReadOnlyList <string> stars) { var editor = wptList.GetEditor(); var sidHandler = new SidHandler(origIcao, sidCol, wptList, editor, airportList); var starHandler = new StarHandler(destIcao, starCol, wptList, editor, airportList); return(finder.FindRoute( new OrigInfo(origRwy, sids, sidHandler), new DestInfo(destRwy, stars, starHandler), editor)); }
public AnalyzerWithCommands( RouteString route, string origIcao, string origRwy, string destIcao, string destRwy, AirportManager airportList, WaypointList wptList, WaypointListEditor editor, SidCollection sids, StarCollection stars) { this.route = route; this.origIcao = origIcao; this.origRwy = origRwy; this.destIcao = destIcao; this.destRwy = destRwy; this.airportList = airportList; this.wptList = wptList; this.editor = editor; this.sids = sids; this.stars = stars; }
private void InitObjects1() { airportList = new AirportManager(); airportList.Add(GetAirport("ABCD", GetRwyData("05L", 25.0, 121.0))); airportList.Add(GetAirport("EFGH", GetRwyData("07L", 22.0, 113.0))); sids = new SidCollection(new[] { new SidEntry( "05L", "SID1", new[] { new Waypoint("P1", 24.0, 120.0) }, EntryType.RwySpecific, false) }); stars = new StarCollection(new[] { new StarEntry( "07L", "STAR1", new[] { new Waypoint("Q1", 23.0, 114.0) }, EntryType.RwySpecific) }); }