|  | Paparazzi UAS v7.0_unstable
    Paparazzi is a free software Unmanned Aircraft System. | 
Pan/Tilt camera gimbal control. More...
#include "cam_gimbal.h"#include "autopilot.h"#include "modules/nav/waypoints.h"#include "generated/modules.h"#include "generated/airframe.h"#include "modules/core/commands.h"#include "state.h"#include "modules/core/abi.h"#include "modules/datalink/telemetry.h" Include dependency graph for cam_gimbal.c:
 Include dependency graph for cam_gimbal.c:Go to the source code of this file.
| Variables | |
| struct CamGimbal | cam_gimbal | 
| static abi_event | joystick_ev | 
Pan/Tilt camera gimbal control.
Definition in file cam_gimbal.c.
| #define CAM_GIMBAL_PAN0 0 | 
Definition at line 44 of file cam_gimbal.c.
Definition at line 53 of file cam_gimbal.c.
| #define CAM_GIMBAL_PAN_MIN -CAM_GIMBAL_PAN_MAX | 
Definition at line 56 of file cam_gimbal.c.
Definition at line 67 of file cam_gimbal.c.
Definition at line 70 of file cam_gimbal.c.
Definition at line 73 of file cam_gimbal.c.
| #define CAM_GIMBAL_TILT0 0 | 
Definition at line 47 of file cam_gimbal.c.
Definition at line 59 of file cam_gimbal.c.
| #define CAM_GIMBAL_TILT_MIN -CAM_GIMBAL_TILT_MAX | 
Definition at line 62 of file cam_gimbal.c.
Definition at line 76 of file cam_gimbal.c.
Definition at line 82 of file cam_gimbal.c.
Definition at line 79 of file cam_gimbal.c.
Definition at line 197 of file cam_gimbal.c.
References acInfoGetPositionEnu_f(), cam_gimbal_target(), foo, and target.
Referenced by cam_gimbal_run().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Computes the servo values from pan and tilt angles.
Definition at line 134 of file cam_gimbal.c.
Referenced by cam_gimbal_run(), and cam_gimbal_target().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Init module.
Definition at line 326 of file cam_gimbal.c.
References ABI_BROADCAST, cam_gimbal, CAM_GIMBAL_PAN_MAX, CAM_GIMBAL_PAN_MIN, CAM_GIMBAL_POS_X, CAM_GIMBAL_POS_Y, CAM_GIMBAL_POS_Z, cam_gimbal_set_angles_callback(), cam_gimbal_setup_angles(), cam_gimbal_setup_mounting(), CAM_GIMBAL_TILT_MAX, CAM_GIMBAL_TILT_MIN, CAM_GIMBAL_TO_BODY_PHI, CAM_GIMBAL_TO_BODY_PSI, CAM_GIMBAL_TO_BODY_THETA, default_compute_angles(), DefaultPeriodic, foo, joystick_cb(), joystick_ev, register_periodic_telemetry(), and send_cam().
 Here is the call graph for this function:
 Here is the call graph for this function:Definition at line 205 of file cam_gimbal.c.
References cam_gimbal_set_pan_command(), cam_gimbal_set_tilt_command(), and foo.
Referenced by cam_gimbal_run().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Point straight down.
Definition at line 176 of file cam_gimbal.c.
References cam_gimbal_set_target_pos(), cam_gimbal_target(), foo, stateGetPositionEnu_f(), and target.
Referenced by cam_gimbal_run().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Periodic call (run control)
Definition at line 355 of file cam_gimbal.c.
References cam_gimbal, cam_gimbal_run(), foo, CamGimbal::pan_cmd, and CamGimbal::tilt_cmd.
 Here is the call graph for this function:
 Here is the call graph for this function:Run camera control.
Definition at line 294 of file cam_gimbal.c.
References cam_gimbal_ac_target(), cam_gimbal_angles(), cam_gimbal_joystick(), CAM_GIMBAL_MODE_AC_TARGET, CAM_GIMBAL_MODE_ANGLES, CAM_GIMBAL_MODE_JOYSTICK, CAM_GIMBAL_MODE_NADIR, CAM_GIMBAL_MODE_OFF, CAM_GIMBAL_MODE_TARGET, CAM_GIMBAL_MODE_WAYPOINT, cam_gimbal_nadir(), CAM_GIMBAL_PAN0, cam_gimbal_set_pan_command(), cam_gimbal_target(), CAM_GIMBAL_TILT0, cam_gimbal_waypoint_target(), and foo.
Referenced by cam_gimbal_periodic().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 286 of file cam_gimbal.c.
References foo.
| void cam_gimbal_set_angles_callback | ( | struct CamGimbal * | cam, | 
| cam_angles_from_dir | compute_angles | ||
| ) | 
Definition at line 229 of file cam_gimbal.c.
References foo.
Referenced by cam_gimbal_init(), and gimbal_caddx_gm3_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 266 of file cam_gimbal.c.
References foo.
Definition at line 258 of file cam_gimbal.c.
References foo.
Definition at line 243 of file cam_gimbal.c.
References foo.
Definition at line 234 of file cam_gimbal.c.
References CAM_GIMBAL_MODE_NB, CAM_GIMBAL_MODE_OFF, foo, and mode.
Definition at line 248 of file cam_gimbal.c.
References foo, and TRIM_PPRZ.
Referenced by cam_gimbal_joystick(), and cam_gimbal_run().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 274 of file cam_gimbal.c.
Referenced by cam_gimbal_nadir(), and cam_gimbal_waypoint_target().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 253 of file cam_gimbal.c.
References foo, and TRIM_PPRZ.
Referenced by cam_gimbal_joystick().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 279 of file cam_gimbal.c.
References foo, and nb_waypoint.
| void cam_gimbal_setup_angles | ( | struct CamGimbal * | cam, | 
| float | pan_max, | ||
| float | pan_min, | ||
| float | tilt_max, | ||
| float | tilt_min | ||
| ) | 
Definition at line 211 of file cam_gimbal.c.
References foo.
Referenced by cam_gimbal_init(), and gimbal_caddx_gm3_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void cam_gimbal_setup_mounting | ( | struct CamGimbal * | cam, | 
| struct FloatEulers | gimbal_to_body_eulers, | ||
| struct FloatVect3 | gimbal_pos | ||
| ) | 
Definition at line 221 of file cam_gimbal.c.
References float_rmat_of_eulers, and foo.
Referenced by cam_gimbal_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:Computes the right angles from target position.
Definition at line 148 of file cam_gimbal.c.
References cam_gimbal_angles(), ENU_OF_TO_NED, float_rmat_transp_vmult(), float_rmat_vmult(), float_vect3_normalize(), foo, stateGetNedToBodyRMat_f(), stateGetPositionNed_f(), target, VECT3_DIFF, and VECT3_SUB.
Referenced by cam_gimbal_ac_target(), cam_gimbal_nadir(), cam_gimbal_run(), and cam_gimbal_waypoint_target().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Definition at line 185 of file cam_gimbal.c.
References cam_gimbal_set_target_pos(), cam_gimbal_target(), foo, Min, nb_waypoint, stateGetPositionEnu_f(), target, WaypointX, WaypointY, and EnuCoor_f::z.
Referenced by cam_gimbal_run().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Default callback function to compute gimbal pan/tilt angle from a looking direction (unit vector in gimbal frame)
The default gimbal mounting is a pan angle turning around the gimbal z axis, then a tilt angle around the gimbal y axis. Therefor we have: -> tan(pan) = uy/ux -> sin(tilt) = -uz
Definition at line 127 of file cam_gimbal.c.
Referenced by cam_gimbal_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 91 of file cam_gimbal.c.
References cam_gimbal, CamGimbal::pan_joystick, and CamGimbal::tilt_joystick.
Referenced by cam_gimbal_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 97 of file cam_gimbal.c.
References cam_gimbal, dev, foo, CamGimbal::pan_angle, CamGimbal::target_pos, CamGimbal::tilt_angle, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by cam_gimbal_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| struct CamGimbal cam_gimbal | 
Definition at line 86 of file cam_gimbal.c.
Referenced by cam_gimbal_init(), cam_gimbal_periodic(), gimbal_caddx_gm3_init(), joystick_cb(), and send_cam().
| 
 | static | 
Definition at line 89 of file cam_gimbal.c.
Referenced by cam_gimbal_init().