mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 17:49:49 +08:00
*** empty log message ***
This commit is contained in:
@@ -1347,7 +1347,7 @@ let _main =
|
||||
and center = ref ""
|
||||
and zoom = ref 1.
|
||||
and maximize = ref false
|
||||
and projection= ref G.UTM
|
||||
and projection = ref G.Mercator
|
||||
and auto_ortho = ref false
|
||||
and mplayer = ref ""
|
||||
and plugin_window = ref "" in
|
||||
@@ -1360,7 +1360,8 @@ let _main =
|
||||
"-center_ac", Arg.Set auto_center_new_ac, "Centers the map on any new A/C";
|
||||
"-plugin", Arg.Set_string plugin_window, "External X application (launched the id of the plugin window as argument)";
|
||||
"-mplayer", Arg.Set_string mplayer, "Launch mplayer with the given argument as X plugin";
|
||||
"-mercator", Arg.Unit (fun () -> projection:=G.Mercator),"Switch to (Google Maps) Mercator projection";
|
||||
"-utm", Arg.Unit (fun () -> projection:=G.Mercator),"Switch to UTM local projection";
|
||||
"-mercator", Arg.Unit (fun () -> projection:=G.Mercator),"Switch to (Google Maps) Mercator projection, default";
|
||||
"-lambertIIe", Arg.Unit (fun () -> projection:=G.LambertIIe),"Switch to LambertIIe projection";
|
||||
"-ign", Arg.String (fun s -> ign:=true; IGN.data_path := s), "IGN tiles path";
|
||||
"-ortho", Arg.Set_string get_bdortho, "IGN tiles path";
|
||||
|
||||
@@ -85,9 +85,13 @@ let update_xml = fun xml_tree utm0 wp ->
|
||||
let xml_wpts = XmlEdit.children (waypoints_node xml_tree) in
|
||||
let node = List.find (fun w -> XmlEdit.attrib w "name" = wp#name) xml_wpts in
|
||||
let utm = utm_of WGS84 (wp#pos) in
|
||||
let (dx, dy) = utm_sub utm utm0 in
|
||||
XmlEdit.set_attribs node ["name",wp#name; "x",sof dx; "y",sof dy; "alt", sof wp#alt]
|
||||
|
||||
try
|
||||
let (dx, dy) = utm_sub utm utm0 in
|
||||
XmlEdit.set_attribs node ["name",wp#name; "x",sof dx; "y",sof dy; "alt", sof wp#alt]
|
||||
with
|
||||
_ ->
|
||||
prerr_endline "MapFP.update_xml: waypoint too far from ref (FIXME)"
|
||||
|
||||
let new_wp = fun xml_tree waypoints utm_ref ?(alt = 0.) node ->
|
||||
let float_attrib = fun a -> float_of_string (XmlEdit.attrib node a) in
|
||||
let x = (float_attrib "x") and y = (float_attrib "y") in
|
||||
|
||||
Reference in New Issue
Block a user