Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
gimbal_caddx_gm3.c File Reference
#include "modules/cam_control/gimbal_caddx_gm3.h"
#include "modules/cam_control/cam_gimbal.h"
#include "modules/actuators/actuators.h"
#include "generated/airframe.h"
#include "modules/datalink/datalink.h"
#include "pprzlink/dl_protocol.h"
+ Include dependency graph for gimbal_caddx_gm3.c:

Go to the source code of this file.

Macros

#define GIMBAL_CADDX_PAN_MAX   RadOfDeg(160.f)
 
#define GIMBAL_CADDX_TILT_MAX   RadOfDeg(120.f)
 
#define GIMBAL_CADDX_ROLL_MAX   RadOfDeg(60.f)
 
#define GIMBAL_CADDX_TILT_OFFSET   RadOfDeg(15.f)
 

Functions

static void gimbal_caddx_compute_angles (struct FloatVect3 dir, float *pan, float *tilt)
 Compute pan and tilt angle for the 3-axis gimbal CaddX GM3.
 
void gimbal_caddx_gm3_init (void)
 
void gimbal_caddx_gm3_periodic (void)
 

Variables

float gimbal_caddx_gm3_roll
 

Detailed Description

Author
Julia Cabarbaye julia.nosp@m..cab.nosp@m.arbay.nosp@m.e1@g.nosp@m.mail..nosp@m.com caddx gm3 gimbal control sbus

Definition in file gimbal_caddx_gm3.c.

Macro Definition Documentation

◆ GIMBAL_CADDX_PAN_MAX

#define GIMBAL_CADDX_PAN_MAX   RadOfDeg(160.f)

Definition at line 35 of file gimbal_caddx_gm3.c.

◆ GIMBAL_CADDX_ROLL_MAX

#define GIMBAL_CADDX_ROLL_MAX   RadOfDeg(60.f)

Definition at line 37 of file gimbal_caddx_gm3.c.

◆ GIMBAL_CADDX_TILT_MAX

#define GIMBAL_CADDX_TILT_MAX   RadOfDeg(120.f)

Definition at line 36 of file gimbal_caddx_gm3.c.

◆ GIMBAL_CADDX_TILT_OFFSET

#define GIMBAL_CADDX_TILT_OFFSET   RadOfDeg(15.f)

Definition at line 38 of file gimbal_caddx_gm3.c.

Function Documentation

◆ gimbal_caddx_compute_angles()

static void gimbal_caddx_compute_angles ( struct FloatVect3  dir,
float pan,
float tilt 
)
static

Compute pan and tilt angle for the 3-axis gimbal CaddX GM3.

The rotations from gimbal to camera frame are: pan (z), roll (x), tilt (y) In addition, an extra mechanical offset exists along the tilt axis between the pan and roll rotations. Considering the wide angle camera and the pain to inverse the resulting equation, this angle is neglected. Therefore, we have: -> sin(tilt) = - uz / cos(roll) -> tan(pan) = (uy / ux) - sin(roll)*tan(tilt)

Definition at line 53 of file gimbal_caddx_gm3.c.

References dir, foo, gimbal_caddx_gm3_roll, and GIMBAL_CADDX_ROLL_MAX.

Referenced by gimbal_caddx_gm3_init().

+ Here is the caller graph for this function:

◆ gimbal_caddx_gm3_init()

void gimbal_caddx_gm3_init ( void  )

◆ gimbal_caddx_gm3_periodic()

void gimbal_caddx_gm3_periodic ( void  )

Definition at line 84 of file gimbal_caddx_gm3.c.

References foo, gimbal_caddx_gm3_roll, GIMBAL_CADDX_ROLL_MAX, and MAX_PPRZ.

Variable Documentation

◆ gimbal_caddx_gm3_roll

float gimbal_caddx_gm3_roll