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.c File Reference
#include "cam_track.h"
#include "subsystems/ins.h"
#include "state.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
#include <stdio.h>
+ Include dependency graph for cam_track.c:

Go to the source code of this file.

Macros

#define CAM_DATA_LEN   (3*4)
 
#define CAM_START_1   0xFF
 
#define CAM_START_2   0xFE
 
#define CAM_END   0xF0
 
#define UNINIT   0
 
#define GOT_START_1   1
 
#define GOT_START_2   2
 
#define GOT_LEN   3
 
#define GOT_DATA   4
 
#define GOT_END   5
 
#define CAM_MAX_PAYLOAD   254
 

Functions

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

Variables

struct FloatVect3 target_pos_ned
 
struct FloatVect3 target_speed_ned
 
struct FloatVect3 target_accel_ned
 
struct FloatVect3 last_pos_ned
 
volatile uint8_t cam_msg_received
 
uint8_t cam_status
 
uint8_t cam_data_len
 
uint8_t cam_data_buf [CAM_MAX_PAYLOAD]
 
uint8_t cam_data_idx
 

Macro Definition Documentation

#define CAM_DATA_LEN   (3*4)

Definition at line 38 of file cam_track.c.

Referenced by track_init().

#define CAM_END   0xF0

Definition at line 41 of file cam_track.c.

Referenced by parse_cam_buffer().

#define CAM_MAX_PAYLOAD   254

Definition at line 160 of file cam_track.c.

Referenced by parse_cam_buffer().

#define CAM_START_1   0xFF

Definition at line 39 of file cam_track.c.

Referenced by parse_cam_buffer().

#define CAM_START_2   0xFE

Definition at line 40 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_DATA   4

Definition at line 47 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_END   5

Definition at line 48 of file cam_track.c.

#define GOT_LEN   3

Definition at line 46 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_START_1   1

Definition at line 44 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_START_2   2

Definition at line 45 of file cam_track.c.

Referenced by parse_cam_buffer().

#define UNINIT   0

Definition at line 43 of file cam_track.c.

Referenced by parse_cam_buffer(), and track_init().

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

uint8_t cam_data_buf[CAM_MAX_PAYLOAD]

Definition at line 161 of file cam_track.c.

Referenced by parse_cam_buffer(), and parse_cam_msg().

uint8_t cam_data_idx

Definition at line 162 of file cam_track.c.

Referenced by parse_cam_buffer().

uint8_t cam_data_len

Definition at line 55 of file cam_track.c.

Referenced by parse_cam_buffer(), and track_init().

volatile uint8_t cam_msg_received

Definition at line 53 of file cam_track.c.

Referenced by parse_cam_buffer().

uint8_t cam_status

Definition at line 54 of file cam_track.c.

Referenced by parse_cam_buffer(), and track_init().

struct FloatVect3 last_pos_ned

Definition at line 36 of file cam_track.c.

Referenced by track_event().

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.