35#define CAM_GIMBAL_MODE_OFF 0
36#define CAM_GIMBAL_MODE_JOYSTICK 1
37#define CAM_GIMBAL_MODE_ANGLES 2
38#define CAM_GIMBAL_MODE_NADIR 3
39#define CAM_GIMBAL_MODE_TARGET 4
40#define CAM_GIMBAL_MODE_WAYPOINT 5
41#define CAM_GIMBAL_MODE_AC_TARGET 6
42#define CAM_GIMBAL_MODE_NB 7
105#define cam_gimbal_SetMode(x) cam_gimbal_set_mode(&cam_gimbal,x)
106#define cam_gimbal_SetLock(x) cam_gimbal_set_lock(&cam_gimbal, x)
107#define cam_gimbal_SetPanCommand(x) cam_gimbal_set_pan_command(&cam_gimbal, x)
108#define cam_gimbal_SetTiltCommand(x) cam_gimbal_set_pan_command(&cam_gimbal, x)
void cam_gimbal_set_tilt_command(struct CamGimbal *cam, int16_t tilt)
void cam_gimbal_set_angles_deg(struct CamGimbal *cam, float pan, float tilt)
int16_t tilt_cmd
tilt command [pprz]
struct FloatRMat gimbal_to_body
rotation matrix from gimbal to body frame
void cam_gimbal_run(struct CamGimbal *cam)
Run camera control.
void cam_gimbal_set_mode(struct CamGimbal *cam, uint8_t mode)
float pan_min
pan angle at minimum command
float pan_angle
pan angle [rad]
void cam_gimbal_init(void)
Init module.
void cam_gimbal_set_wp_id(struct CamGimbal *cam, uint8_t wp_id)
void cam_gimbal_set_lock(struct CamGimbal *cam, bool lock)
void cam_gimbal_set_target_pos(struct CamGimbal *cam, struct EnuCoor_f target)
float pan_max
pan angle at maximum command
void cam_gimbal_set_ac_id(struct CamGimbal *cam, uint8_t ac_id)
int16_t pan_cmd
pan command [pprz]
void cam_gimbal_setup_angles(struct CamGimbal *cam, float pan_max, float pan_min, float tilt_max, float tilt_min)
uint8_t target_wp_id
waypoint ID to track
void cam_gimbal_setup_mounting(struct CamGimbal *cam, struct FloatEulers gimbal_to_body, struct FloatVect3 gimbal_pos)
uint8_t mode
gimbal control mode
void cam_gimbal_periodic(void)
Periodic call (run control)
int16_t pan_joystick
pan command from joystick
float tilt_min
tilt angle at minimum command
bool lock
lock current command
uint8_t target_ac_id
aircraft ID to track
struct EnuCoor_f target_pos
target point in ENU world frame [m]
void cam_gimbal_set_angles_callback(struct CamGimbal *cam, cam_angles_from_dir compute_angles)
struct FloatVect3 gimbal_pos
position of the gimbal in body NED frame [m]
float tilt_angle
tilt angle [rad]
void(* cam_angles_from_dir)(struct FloatVect3 dir, float *pan, float *tilt)
Function pointer to return cam angle from a specified direction.
int16_t tilt_joystick
tilt command from joystick
void cam_gimbal_set_angles_rad(struct CamGimbal *cam, float pan, float tilt)
float tilt_max
tilt angle at maximum command
struct CamGimbal cam_gimbal
cam_angles_from_dir compute_angles
cam angles from looking direction callback
void cam_gimbal_set_pan_command(struct CamGimbal *cam, int16_t pan)
Paparazzi floating point algebra.
Paparazzi floating point math for geodetic calculations.
vector in East North Up coordinates Units: meters
static uint8_t mode
mode holds the current sonar mode mode = 0 used at high altitude, uses 16 wave patterns mode = 1 used...
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.