Skip to content

Commit

Permalink
ocaml simulator: limit max roll angle to ROLL_MAX_SETPOINT (Auto2) fr…
Browse files Browse the repository at this point in the history
…om airframe file instead of hardcoding the limit to 0.7 rad
  • Loading branch information
flixr committed Mar 21, 2012
1 parent b45585f commit 9ce4478
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sw/simulator/flightModel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ module Make(A:Data.MISSION) = struct
let max_bat_level =
try float_value (section "BAT") "MAX_BAT_LEVEL" with _ -> 12.5

let max_phi = 0.7 (* rad *)
let h_ctrl_section =
try section "HORIZONTAL CONTROL" with _ -> Xml.Element("",[],[])

let max_phi =
try code_value h_ctrl_section "ROLL_MAX_SETPOINT" with _ -> 0.7 (* rad *)
let max_phi_dot = 0.25 (* rad/s *)
let bound = fun x mi ma -> if x > ma then ma else if x < mi then mi else x

Expand Down

0 comments on commit 9ce4478

Please sign in to comment.