Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
infrared.h File Reference
#include "std.h"
#include "generated/airframe.h"
+ Include dependency graph for infrared.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Infrared_raw
 
struct  Infrared
 Infrared structure. More...
 

Macros

#define IR_IR1_SIGN   1
 
#define IR_IR2_SIGN   1
 
#define IR_TOP_SIGN   1
 
#define IR_TopOfIr(_ir)   (_ir)
 
#define IR_LATERAL_CORRECTION   1.
 
#define IR_LONGITUDINAL_CORRECTION   1.
 
#define IR_VERTICAL_CORRECTION   1.
 
#define IR_CORRECTION_LEFT   1.
 
#define IR_CORRECTION_RIGHT   1.
 
#define IR_CORRECTION_UP   1.
 
#define IR_CORRECTION_DOWN   1.
 
#define IR_ROLL_NEUTRAL_DEFAULT   0.0
 
#define IR_PITCH_NEUTRAL_DEFAULT   0.0
 
#define UpdateIRValue(_v)
 

Functions

void infrared_struct_init (void)
 Initialisation of ir structure. More...
 
void infrared_init (void)
 
void infrared_update (void)
 
void infrared_event (void)
 

Variables

struct Infrared infrared
 

Data Structure Documentation

◆ Infrared_raw

struct Infrared_raw

Definition at line 109 of file infrared.h.

Data Fields
int16_t ir1
int16_t ir2
int16_t ir3

◆ Infrared

struct Infrared

Infrared structure.

Definition at line 118 of file infrared.h.

+ Collaboration diagram for Infrared:
Data Fields
float correction_down
float correction_left
float correction_right
float correction_up
float lateral_correction
float longitudinal_correction
int16_t pitch
float pitch_neutral
float pitch_vneutral
int16_t roll
float roll_neutral
int16_t top
struct Infrared_raw value
float vertical_correction

Macro Definition Documentation

◆ IR_CORRECTION_DOWN

#define IR_CORRECTION_DOWN   1.

Definition at line 94 of file infrared.h.

◆ IR_CORRECTION_LEFT

#define IR_CORRECTION_LEFT   1.

Definition at line 82 of file infrared.h.

◆ IR_CORRECTION_RIGHT

#define IR_CORRECTION_RIGHT   1.

Definition at line 86 of file infrared.h.

◆ IR_CORRECTION_UP

#define IR_CORRECTION_UP   1.

Definition at line 90 of file infrared.h.

◆ IR_IR1_SIGN

#define IR_IR1_SIGN   1

Definition at line 34 of file infrared.h.

◆ IR_IR2_SIGN

#define IR_IR2_SIGN   1

Definition at line 38 of file infrared.h.

◆ IR_LATERAL_CORRECTION

#define IR_LATERAL_CORRECTION   1.

Definition at line 70 of file infrared.h.

◆ IR_LONGITUDINAL_CORRECTION

#define IR_LONGITUDINAL_CORRECTION   1.

Definition at line 74 of file infrared.h.

◆ IR_PITCH_NEUTRAL_DEFAULT

#define IR_PITCH_NEUTRAL_DEFAULT   0.0

Definition at line 106 of file infrared.h.

◆ IR_ROLL_NEUTRAL_DEFAULT

#define IR_ROLL_NEUTRAL_DEFAULT   0.0

Definition at line 102 of file infrared.h.

◆ IR_TOP_SIGN

#define IR_TOP_SIGN   1

Definition at line 42 of file infrared.h.

◆ IR_TopOfIr

#define IR_TopOfIr (   _ir)    (_ir)

Definition at line 62 of file infrared.h.

◆ IR_VERTICAL_CORRECTION

#define IR_VERTICAL_CORRECTION   1.

Definition at line 78 of file infrared.h.

◆ UpdateIRValue

#define UpdateIRValue (   _v)
Value:
{ \
infrared.value.ir1 = (IR_IR1_SIGN)*_v.ir1; \
infrared.value.ir2 = (IR_IR2_SIGN)*_v.ir2; \
infrared.value.ir3 = (IR_TOP_SIGN)*_v.ir3; \
infrared.pitch = infrared.longitudinal_correction * IR_PitchOfIrs(infrared.value.ir1, infrared.value.ir2); \
}

Definition at line 149 of file infrared.h.

Function Documentation

◆ infrared_event()

void infrared_event ( void  )

Definition at line 66 of file infrared_adc.c.

References infrared_i2cEvent.

◆ infrared_init()

void infrared_init ( void  )

Definition at line 55 of file infrared_adc.c.

References infrared_adc_init(), and infrared_i2c_init().

+ Here is the call graph for this function:

◆ infrared_struct_init()

◆ infrared_update()

void infrared_update ( void  )

Definition at line 60 of file infrared_adc.c.

References infrared_adc_update(), and infrared_i2c_update().

+ Here is the call graph for this function:

Variable Documentation

◆ infrared

Infrared_raw::ir1
int16_t ir1
Definition: infrared.h:112
Infrared::value
struct Infrared_raw value
Definition: infrared.h:121
Infrared::longitudinal_correction
float longitudinal_correction
Definition: infrared.h:136
Infrared::vertical_correction
float vertical_correction
Definition: infrared.h:137
Infrared_raw::ir2
int16_t ir2
Definition: infrared.h:113
IR_TopOfIr
#define IR_TopOfIr(_ir)
Definition: infrared.h:62
Infrared_raw::ir3
int16_t ir3
Definition: infrared.h:114
Infrared::roll
int16_t roll
Definition: infrared.h:129
IR_TOP_SIGN
#define IR_TOP_SIGN
Definition: infrared.h:42
IR_IR2_SIGN
#define IR_IR2_SIGN
Definition: infrared.h:38
infrared
struct Infrared infrared
Definition: infrared.c:30
IR_IR1_SIGN
#define IR_IR1_SIGN
Definition: infrared.h:34
Infrared::lateral_correction
float lateral_correction
Definition: infrared.h:135