Skip to content

Commit

Permalink
[gcs] actually use position in DC_SHOT message to place photo marker
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Dec 3, 2014
1 parent 6043377 commit 970e0b9
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions sw/ground_segment/cockpit/live.ml
Expand Up @@ -1360,15 +1360,22 @@ let listen_telemetry_status = fun () ->
let mark_dcshot = fun (geomap:G.widget) _sender vs ->
let ac = find_ac !active_ac in
let photonumber = Pprz.string_assoc "photo_nr" vs in
(* let ac = get_ac vs in *)
match ac.track#last with
Some geo ->
begin
let group = geomap#background in
let point = geomap#photoprojection ~group ~fill_color:"yellow" ~number:photonumber geo 3. in
point#raise_to_top ()
end
| None -> ()
try
let lat = Pprz.int_assoc "latitude" vs
and lon = Pprz.int_assoc "longitude" vs in
let wgs84 = LL.make_geo_deg (float lat /. 1e7) (float lon /. 1e7) in
let group = geomap#background in
let point = geomap#photoprojection ~group ~fill_color:"yellow" ~number:photonumber wgs84 3. in
point#raise_to_top ()
with _ ->
match ac.track#last with
Some geo ->
begin
let group = geomap#background in
let point = geomap#photoprojection ~group ~fill_color:"yellow" ~number:photonumber geo 3. in
point#raise_to_top ()
end
| None -> ()

(* mark geomap ac.ac_name track !Plugin.frame *)

Expand Down

0 comments on commit 970e0b9

Please sign in to comment.