From 674164fd02a34d20430ab2b5dec5b48b69807320 Mon Sep 17 00:00:00 2001 From: Pascal Brisset Date: Sun, 31 Aug 2008 14:32:03 +0000 Subject: [PATCH] taking into account lat0 and lon0 in deg mis sec --- sw/ground_segment/tmtc/kml.ml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sw/ground_segment/tmtc/kml.ml b/sw/ground_segment/tmtc/kml.ml index e44bc4a7a8..80dca54450 100644 --- a/sw/ground_segment/tmtc/kml.ml +++ b/sw/ground_segment/tmtc/kml.ml @@ -86,11 +86,15 @@ let horiz_mode = [ data "altitudeMode" "absolute"; data "coordinates" ""]] +let georef_of_xml = fun xml -> + let lat0 = Latlong.deg_of_string (ExtXml.attrib xml "lat0") + and lon0 = Latlong.deg_of_string (ExtXml.attrib xml "lon0") in + { posn_lat = (Deg>>Rad)lat0; posn_long = (Deg>>Rad)lon0 } + let flight_plan = fun ac_name fp -> - let lat0 = ExtXml.float_attrib fp "lat0" - and lon0 = ExtXml.float_attrib fp "lon0" + let geo0 = georef_of_xml fp and alt0 = ExtXml.attrib fp "alt" in - let utm0 = utm_of WGS84 {posn_lat=(Deg>>Rad)lat0; posn_long=(Deg>>Rad)lon0} in + let utm0 = utm_of WGS84 geo0 in let xml_waypoints = Xml.children (ExtXml.child fp "waypoints") in let array_waypoints = Array.of_list xml_waypoints in (* Index the waypoints for further access *)