private static void FillPlanes() { Aircraft testAirplane = new Aircraft(new AircraftIdData("K7H570BG", "Boeing 737", "Ninja Air", true), 200); Airport testDepartureAirport = new Airport("John F. Kennedy International Airport", new Position3D(-90.9187999m, 46.5482781m, 251), new Person("John Kennedy")); Airport testArrivalAirport = new Airport("Saranak Lake Airport", new Position3D(-74.1m, 44.2m, 251), new Person("Whinston Churchill")); AirspaceFix firstFix = new AirspaceFix(new Position3D(-87.9187999m, 44.5482781m, 251), false, false); AirspaceFix secondFix = new AirspaceFix(new Position3D(-84.9187999m, 45.5482781m, 251), false, false); FlightRoute testRoute = new FlightRoute(); testRoute.AddFix(firstFix); testRoute.AddFix(secondFix); FlightPlan testFlightPlan = new FlightPlan(testDepartureAirport, testArrivalAirport, DateTime.Now, DateTime.Now.AddMinutes(30), 200, testRoute, 10000, FlightType.Scheduled); Flight testFlight = new Flight(testAirplane, new Person("Pesho"), testFlightPlan, "2213"); flights.Add(testFlight); Planes.Add(new Plane { Identification = testFlight.Aircraft.Identification.Id, Speed = testFlight.CurrentSpeed, X = testFlight.CurrentPosition.LongitudeInNauticalMiles / 18, Y = testFlight.CurrentPosition.LatitudeInNauticalMiles / 18, Z = (int)testFlight.CurrentPosition.Altitude, Company = "Pacific Airlines", Destination = "1", // testFlight.FlightPlan.ArrivalAirport.Name, Type = 1 }); }
public void AddFix(AirspaceFix newFix) { RoutePoints.Add(newFix); }