Set initial tilt looking down (#2133)

This commit is contained in:
Rijesh Augustine
2017-10-24 14:52:35 -06:00
committed by Gautier Hattenberger
parent 7bbb52a203
commit 69329eb3ba
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ let new_aircraft = fun id name fp airframe ->
gaz_mode= -1; lateral_mode= -1;
gps_mode = 0; gps_Pacc = 0; periodic_callbacks = [];
state_filter_mode = 0;
cam = { pan = 0.; tilt = 0. ; target=(0.,0.)};
cam = { pan = 0.; tilt = (Deg>>Rad) 90. ; target=(0.,0.)};
camaov = get_cam_aov airframe;
fbw = { rc_status = "???"; rc_mode = "???"; rc_rate=0; fbw_bat=0.; pprz_mode_msgs_since_last_fbw_status_msg=0 };
svinfo = svsinfo_init;
+1 -1
View File
@@ -175,7 +175,7 @@ let send_cam_status = fun a ->
and br = quaternion_from_angle (hfv /. -2.0) (vfv /. -2.0) 0.0
and bl = quaternion_from_angle (hfv /. 2.0) (vfv /. -2.0) 0.0 in
let gimRot = quaternion_from_angle 0.0 (-.a.cam.tilt) (-.a.cam.pan)
let gimRot = quaternion_from_angle 0.0 (-. (a.cam.tilt -. (Deg>>Rad) 90.)) (-.a.cam.pan)
and acRot = quaternion_from_angle a.roll a.pitch (-.a.heading) in
let tr_rotated = multiply_quaternion acRot (multiply_quaternion gimRot tr)