time in FLIGHT_PARAMS

This commit is contained in:
Pascal Brisset
2007-12-29 17:59:10 +00:00
parent 7563eaaa2d
commit cac2fb471e
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -77,6 +77,7 @@ type aircraft = {
name : string;
flight_plan : Xml.xml;
mutable pos : Latlong.utm;
mutable unix_time : float;
mutable roll : float;
mutable pitch : float;
mutable nav_ref : Latlong.utm option;
@@ -137,6 +138,7 @@ let new_aircraft = fun id name fp ->
desired_altitude = 0.;
desired_climb = 0.;
pos = { Latlong.utm_x = 0.; utm_y = 0.; utm_zone = 0 };
unix_time = 0.;
nav_ref = None;
cam = { phi = 0.; theta = 0. ; target=(0.,0.)};
inflight_calib = { if_mode = 1 ; if_val1 = 0.; if_val2 = 0.};
+1
View File
@@ -63,6 +63,7 @@ type aircraft = {
name : string;
flight_plan : Xml.xml;
mutable pos : Latlong.utm;
mutable unix_time : float;
mutable roll : float;
mutable pitch : float;
mutable nav_ref : Latlong.utm option;
+2
View File
@@ -243,6 +243,7 @@ let log_and_parse = fun logging ac_name (a:Aircraft.aircraft) msg values ->
a.pos <- { utm_x = fvalue "utm_east" /. 100.;
utm_y = fvalue "utm_north" /. 100.;
utm_zone = ivalue "utm_zone" };
a.unix_time <- Latlong.unix_time_of_tow (truncate (fvalue "itow" /. 1000.));
a.gspeed <- fvalue "speed" /. 100.;
a.course <- norm_course ((Deg>>Rad)(fvalue "course" /. 10.));
@@ -551,6 +552,7 @@ let send_aircraft_msg = fun ac ->
"pitch", f (Geometry_2d.rad2deg a.pitch);
"lat", f ((Rad>>Deg)wgs84.posn_lat);
"long", f ((Rad>>Deg) wgs84.posn_long);
"unix_time", f a.unix_time;
"speed", f a.gspeed;
"course", f (Geometry_2d.rad2deg a.course);
"alt", f a.alt;