[agl] fix waypoint edit box display and sim ground detect

This commit is contained in:
Gautier Hattenberger
2014-05-14 22:13:38 +02:00
parent ce3c21c428
commit e5e2b008d2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -203,7 +203,7 @@ object (self)
try
set_coordinates ();
let wgs84 = self#pos in
let agl = ea#value -. float (try Srtm.of_wgs84 wgs84 with _ -> 0) in
let agl = ea#value -. (try float (Srtm.of_wgs84 wgs84) with _ -> ground_alt) in
agl_lab#set_text (sprintf " AGL: %4.0fm" agl)
with _ -> ()
in
+1 -1
View File
@@ -195,7 +195,7 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
Some s ->
begin
try s.Gps.alt -. float (Srtm.of_wgs84 s.Gps.wgs84) with
_ -> s.Gps.alt
_ -> s.Gps.alt -. !alt0
end
| None -> 0. in
FM.state_update !state FM.nominal_airspeed (!wind_x, !wind_y, !wind_z) agl fm_period