Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cam_track.h File Reference

blob tracking with cmucam More...

#include <inttypes.h>
#include "math/pprz_algebra_float.h"
#include "mcu_periph/uart.h"
+ Include dependency graph for cam_track.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define __CamLink(dev, _x)   dev##_x
#define _CamLink(dev, _x)   __CamLink(dev, _x)
#define CamLink(_x)   _CamLink(CAM_LINK, _x)
#define CamBuffer()   CamLink(ChAvailable())
#define ReadCamBuffer()   { while (CamLink(ChAvailable())&&!cam_msg_received) parse_cam_buffer(CamLink(Getch())); }
#define CamUartSend1(c)   CamLink(Transmit(c))
#define CamUartSetBaudrate(_b)   CamLink(SetBaudrate(_b))
#define CamUartRunning   CamLink(TxRunning)
#define CamEventCheckAndHandle()


void track_init (void)
void track_periodic_task (void)
void track_event (void)
void parse_cam_msg (void)
void parse_cam_buffer (uint8_t)


struct FloatVect3 target_pos_ned
struct FloatVect3 target_speed_ned
struct FloatVect3 target_accel_ned
volatile uint8_t cam_msg_received

Detailed Description

blob tracking with cmucam

Definition in file cam_track.h.

Macro Definition Documentation

#define __CamLink (   dev,
)    dev##_x

Definition at line 48 of file cam_track.h.

#define _CamLink (   dev,
)    __CamLink(dev, _x)

Definition at line 49 of file cam_track.h.

#define CamBuffer ( )    CamLink(ChAvailable())

Definition at line 52 of file cam_track.h.

#define CamEventCheckAndHandle ( )
{ \
} \
} \
void track_event(void)
Definition: cam_track.c:121
#define CamBuffer()
Definition: cam_track.h:52
volatile uint8_t cam_msg_received
Definition: cam_track.c:53
#define FALSE
Definition: imu_chimu.h:141
void parse_cam_msg(void)
Definition: cam_track.c:164
#define ReadCamBuffer()
Definition: cam_track.h:53

Definition at line 58 of file cam_track.h.

#define CamLink (   _x)    _CamLink(CAM_LINK, _x)

Definition at line 50 of file cam_track.h.

#define CamUartRunning   CamLink(TxRunning)

Definition at line 56 of file cam_track.h.

#define CamUartSend1 (   c)    CamLink(Transmit(c))

Definition at line 54 of file cam_track.h.

Referenced by track_periodic_task().

#define CamUartSetBaudrate (   _b)    CamLink(SetBaudrate(_b))

Definition at line 55 of file cam_track.h.

#define ReadCamBuffer ( )    { while (CamLink(ChAvailable())&&!cam_msg_received) parse_cam_buffer(CamLink(Getch())); }

Definition at line 53 of file cam_track.h.

Function Documentation

void parse_cam_msg ( void  )

Definition at line 164 of file cam_track.c.

References cam_data_buf, target_pos_ned, FloatVect3::x, FloatVect3::y, and FloatVect3::z.

void track_init ( void  )
void track_periodic_task ( void  )

Definition at line 67 of file cam_track.c.

References c, CamUartSend1, FloatEulers::phi, FloatEulers::psi, stateGetNedToBodyEulers_f(), stateGetPositionEnu_f(), FloatEulers::theta, and EnuCoor_f::z.

+ Here is the call graph for this function:

Variable Documentation

volatile uint8_t cam_msg_received

Definition at line 53 of file cam_track.c.

Referenced by parse_cam_buffer().

struct FloatVect3 target_accel_ned

Definition at line 34 of file cam_track.c.

struct FloatVect3 target_pos_ned

Definition at line 32 of file cam_track.c.

Referenced by parse_cam_msg(), and track_event().

struct FloatVect3 target_speed_ned

Definition at line 33 of file cam_track.c.