Working parameters for simulation

This commit is contained in:
Pascal Brisset
2005-08-27 18:28:58 +00:00
parent 298600cc0b
commit 4146ac0a57
6 changed files with 35 additions and 7 deletions
+2 -2
View File
@@ -65,8 +65,8 @@
<define name="CARROT" value="5." unit="s"/> <define name="CARROT" value="5." unit="s"/>
</section> </section>
<section name="SIMU"> <section name="SIMU">
<define name="ROLL_RESPONSE_FACTOR" value="2."/> <define name="ROLL_RESPONSE_FACTOR" value="1."/>
<define name="YAW_RESPONSE_FACTOR" value="5."/> <define name="YAW_RESPONSE_FACTOR" value="1."/>
<define name="WEIGHT" value="1.3"/> <define name="WEIGHT" value="1.3"/>
</section> </section>
<section name="FAILSAFE" prefix="FAILSAFE_"> <section name="FAILSAFE" prefix="FAILSAFE_">
+1 -1
View File
@@ -66,7 +66,7 @@
</section> </section>
<section name="SIMU"> <section name="SIMU">
<define name="ROLL_RESPONSE_FACTOR" value="1."/> <define name="ROLL_RESPONSE_FACTOR" value="1."/>
<define name="YAW_RESPONSE_FACTOR" value="5."/> <define name="YAW_RESPONSE_FACTOR" value="1."/>
<define name="WEIGHT" value="1.3"/> <define name="WEIGHT" value="1.3"/>
</section> </section>
<section name="FAILSAFE" prefix="FAILSAFE_"> <section name="FAILSAFE" prefix="FAILSAFE_">
+1 -1
View File
@@ -3,7 +3,7 @@
* *
* Basic flight model for simulation * Basic flight model for simulation
* *
* Copyright (C) 2004 Pascal Brisset, Antoine Drouin * Copyright (C) 2004-2005 Pascal Brisset, Antoine Drouin
* *
* This file is part of paparazzi. * This file is part of paparazzi.
* *
+28
View File
@@ -1,3 +1,29 @@
(*
* $Id$
*
* Basic flight model for simulation
*
* Copyright (C) 2004-2005 Pascal Brisset, Antoine Drouin
*
* This file is part of paparazzi.
*
* paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*)
type meter = float type meter = float
type meter_s = float type meter_s = float
type radian = float type radian = float
@@ -19,4 +45,6 @@ module Make :
val nb_servos : int val nb_servos : int
val nominal_airspeed : float (* m/s *) val nominal_airspeed : float (* m/s *)
val state_update : state -> float * float -> float -> unit val state_update : state -> float * float -> float -> unit
(** [state_update state (wind_x, wind_y) dt] With m/s for wind and s for
dt *)
end end
+1 -1
View File
@@ -51,7 +51,7 @@ let _ =
let wind_dir_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:370. ~step_incr:1.0 () in let wind_dir_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:370. ~step_incr:1.0 () in
let wind_speed_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in let wind_speed_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
let gust_norm_max_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in let gust_norm_max_adj = GData.adjustment ~value:0. ~lower:(0.) ~upper:20. ~step_incr:0.1 () in
let infrared_contrast_adj = GData.adjustment ~value:500. ~lower:(0.) ~upper:1010. ~step_incr:10. () in let infrared_contrast_adj = GData.adjustment ~value:266. ~lower:(0.) ~upper:1010. ~step_incr:10. () in
let gps_sa = GButton.toggle_button ~label:"GPS OFF" () in let gps_sa = GButton.toggle_button ~label:"GPS OFF" () in
let world_values = fun () -> let world_values = fun () ->
+2 -2
View File
@@ -115,7 +115,7 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
let wind_x = ref 0. let wind_x = ref 0.
and wind_y = ref 0. in and wind_y = ref 0. in
let infrared_contrast = ref 2000. let infrared_contrast = ref 266.
and time_scale = object val mutable v = 1. method value = v method set_value x = v <- x end and time_scale = object val mutable v = 1. method value = v method set_value x = v <- x end
and gps_availability = ref 1 in and gps_availability = ref 1 in
@@ -123,7 +123,7 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
gps_availability := Pprz.int_assoc "gps_availability" vs; gps_availability := Pprz.int_assoc "gps_availability" vs;
wind_x := Pprz.float_assoc "wind_east" vs; wind_x := Pprz.float_assoc "wind_east" vs;
wind_y := Pprz.float_assoc "wind_north" vs; wind_y := Pprz.float_assoc "wind_north" vs;
infrared_contrast := 4. *. Pprz.float_assoc "ir_contrast" vs; (** FIXME *) infrared_contrast := Pprz.float_assoc "ir_contrast" vs; (** FIXME *)
time_scale#set_value (Pprz.float_assoc "time_scale" vs) time_scale#set_value (Pprz.float_assoc "time_scale" vs)
in in