// method to match actual flight objects to planned flight lines public void MatchPairs(ActualFlightProject actualFlightProject, PlannedFlightProject plannedFlightProject) { // New "PlannedFlightProject" object to use for comparison PlannedFlightProject newPlannedFlight = new PlannedFlightProject(); KMLParser kmlParser = new KMLParser(); newPlannedFlight = kmlParser.ParseKMLFile(); // New "ActualFlightProject" object to use for comparison ActualFlightProject newActualFlight = new ActualFlightProject(); RPPParser rppParser = new RPPParser(); newActualFlight = RPPParser.AddSwathsFromRPP(); var test = new GeoCoordinate(); var totalPlanned = newPlannedFlight.totalPlannedSwaths(); // try with matching start or finish lat or longs to each other with a <400m difference foreach (var swath in newPlannedFlight.PlannedSwathList) { } }
public static ActualFlightProject AddSwathsFromRPP() { string rppPath = @"C:\Users\Paul\Documents\GitHub\Flight-swatch-matching-module\Callide_VQ780_190226.rpp"; RiProcessProjectXmlParser project = new RiProcessProjectXmlParser(); var obj = project.Open(rppPath); ActualFlightProject newProject = new ActualFlightProject(); newProject.ProjectName = obj.Name; foreach (var swath in obj.LidarData) { ActualSwath actualSwath = new ActualSwath(); actualSwath.StartLat = swath.StartLatitude; actualSwath.StartLong = swath.StartLongitude; actualSwath.EndLat = swath.EndLatitude; actualSwath.EndLong = swath.EndLongitude; actualSwath.sensor = swath.LaserConfig; actualSwath.ActualOrder = swath.OrderFlown; actualSwath.Altitude = swath.StartAltitude; actualSwath.PlannedOrder = swath.OrderPlanned; newProject.AddSwath(actualSwath); } return(newProject); }
static void Main(string[] args) { KMLParser parser = new KMLParser(); PlannedFlightProject plannedFlightProject = parser.ParseKMLFile(); ActualFlightProject actualFlightProject = RPPParser.AddSwathsFromRPP(); foreach (var swath in actualFlightProject.ActualSwathList) { Console.WriteLine("Actual Order = " + swath.ActualOrder); Console.WriteLine("Planned order = " + swath.PlannedOrder); } GeoCoordinate newGeo = new GeoCoordinate(89.4455, 123.4455); GeoCoordinate newGeo1 = new GeoCoordinate(89.4454, 123.4454); Console.WriteLine("Distance between 1 and 2: " + newGeo.GetDistanceTo(newGeo1)); Console.WriteLine("Total planned flights: " + plannedFlightProject.totalPlannedSwaths()); }