/// <summary> /// Loads the Plan-G flight plan /// </summary> /// <param name="path">path to file</param> /// <returns>loaded flight plan</returns> /// <exception cref="ArgumentNullException">path is null</exception> public FlightPlanModel LoadPlanGFlightPlan(string path) { if (path == null) { throw new ArgumentNullException("path"); } var flightPlan = ParsePlanGFlightPlan(path); var flightPlanModel = FlightPlanModel.FromCoreFlightPlan(flightPlan); return(flightPlanModel); }
private void FlightPlanParsed(Task <Core.FlightPlan> task) { if (task.Exception != null) { RaiseFlightPlanParseExceptionEvent(task.Exception); return; } try { var fplModel = FlightPlanModel.FromCoreFlightPlan(task.Result); RaiseFlightPlanParseOkEvent(fplModel); } catch (Exception ex) { RaiseFlightPlanParseExceptionEvent(ex); } }