Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cam_track.c File Reference
#include "cam_track.h"
#include "subsystems/ins.h"
#include "subsystems/ahrs.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 40 of file cam_track.c.

Referenced by track_init().

#define CAM_END   0xF0

Definition at line 43 of file cam_track.c.

Referenced by parse_cam_buffer().

#define CAM_MAX_PAYLOAD   254

Definition at line 157 of file cam_track.c.

Referenced by parse_cam_buffer().

#define CAM_START_1   0xFF

Definition at line 41 of file cam_track.c.

Referenced by parse_cam_buffer().

#define CAM_START_2   0xFE

Definition at line 42 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_DATA   4

Definition at line 49 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_END   5

Definition at line 50 of file cam_track.c.

#define GOT_LEN   3

Definition at line 48 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_START_1   1

Definition at line 46 of file cam_track.c.

Referenced by parse_cam_buffer().

#define GOT_START_2   2

Definition at line 47 of file cam_track.c.

Referenced by parse_cam_buffer().

#define UNINIT   0

Definition at line 45 of file cam_track.c.

Referenced by parse_cam_buffer(), and track_init().

Function Documentation

void parse_cam_msg ( void  )

Definition at line 161 of file cam_track.c.

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

void track_init ( void  )

Definition at line 59 of file cam_track.c.

References CAM_DATA_LEN, cam_data_len, cam_status, ins_ltp_initialised, TRUE, and UNINIT.

Variable Documentation

uint8_t cam_data_buf[CAM_MAX_PAYLOAD]

Definition at line 158 of file cam_track.c.

uint8_t cam_data_idx

Definition at line 159 of file cam_track.c.

Referenced by parse_cam_buffer().

uint8_t cam_data_len

Definition at line 57 of file cam_track.c.

Referenced by parse_cam_buffer(), and track_init().

volatile uint8_t cam_msg_received

Definition at line 55 of file cam_track.c.

Referenced by parse_cam_buffer().

uint8_t cam_status

Definition at line 56 of file cam_track.c.

Referenced by parse_cam_buffer(), and track_init().

struct FloatVect3 last_pos_ned

Definition at line 38 of file cam_track.c.

Referenced by track_event().

struct FloatVect3 target_accel_ned

Definition at line 36 of file cam_track.c.

struct FloatVect3 target_pos_ned

Definition at line 34 of file cam_track.c.

Referenced by parse_cam_msg(), and track_event().

struct FloatVect3 target_speed_ned

Definition at line 35 of file cam_track.c.