mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-06 16:58:48 +08:00
time in FLIGHT_PARAMS
This commit is contained in:
@@ -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.};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user