This commit is contained in:
Felix Ruess
2011-12-03 17:30:14 +01:00
parent 0e3bc1cdfa
commit c0ef220c32
3 changed files with 100 additions and 100 deletions
+4 -4
View File
@@ -53,7 +53,7 @@ let cb_register = fun closure ->
module type AIRCRAFT = module type AIRCRAFT =
sig sig
val init : int -> GPack.box -> unit val init : int -> GPack.box -> unit
(** [init ac_id box] *) (** [init ac_id box] *)
val boot : Stdlib.value -> unit val boot : Stdlib.value -> unit
@@ -70,7 +70,7 @@ module type AIRCRAFT =
val gps : Gps.state -> unit val gps : Gps.state -> unit
(** [gps state] Called on timer *) (** [gps state] Called on timer *)
end end
module type AIRCRAFT_ITL = module type AIRCRAFT_ITL =
@@ -236,10 +236,10 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
let lat = s.Gps.wgs84.Latlong.posn_lat let lat = s.Gps.wgs84.Latlong.posn_lat
and lon = s.Gps.wgs84.Latlong.posn_long and lon = s.Gps.wgs84.Latlong.posn_long
and alt = s.Gps.alt and alt = s.Gps.alt
(* and theta_ = s.Gps.course *) (* and theta_ = s.Gps.course *)
and (phi, theta, psi) = FlightModel.get_attitude !state in and (phi, theta, psi) = FlightModel.get_attitude !state in
fg_msg buffer lat lon alt phi theta psi; fg_msg buffer lat lon alt phi theta psi;
(** for i = 0 to String.length buffer - 1 do fprintf stderr "%x " (Char.code buffer.[i]) done; fprintf stderr "\n"; **) (** for i = 0 to String.length buffer - 1 do fprintf stderr "%x " (Char.code buffer.[i]) done; fprintf stderr "\n"; **)
try try
ignore (Unix.send socket buffer 0 (String.length buffer) []) ignore (Unix.send socket buffer 0 (String.length buffer) [])
with with