WindRose 1.0
Custom Hardware , Firmware and Software for Robotic Cellular Automata Experiments
Sensing.h
Go to the documentation of this file.
1
9#ifndef Sensing_h
10#define Sensing_h
11
15#define MAX_SENSING_BYTES_PER_PACKET 50 // Max number of bytes per packet, summing all sensing bytes for all sensors
16
23typedef struct
24{
25 int16_t x;
26 int16_t y;
27 int16_t z;
28} Coord_t;
29
36typedef struct
37{
38 int16_t pitch; //float * 100
39 int16_t roll; //float * 100
40 int16_t yaw; //float * 100
41} Angle_t;
42
49typedef struct
50{
51 int16_t x;
52 int16_t y;
53 int16_t z;
54} Accel_t;
55
62typedef struct
63{
64 int16_t x;
65 int16_t y;
66 int16_t z;
68
69
77typedef struct
78{
79 int32_t lat;
80 int32_t lon;
81 int32_t alt;
82 int32_t gspeed;
83} Gps_pos_t; //Repensar a questão do mux
84
90typedef struct
91{
92 int16_t speed;
93 int16_t dir;
94} Wind_t;
95
101typedef struct
102{
103 uint32_t lux; //x1000
104 uint16_t temp;
105} Light_t;
106
115 coord = 0,
116 angle = 1,
117 accel = 2,
118 ang_rate = 3,
119 gps_pos = 4,
120 wind = 5,
121 light = 6
122};
123
129typedef struct
130{
131 //[Type] [atrib] [bit_pos in ASBM by sensor_types]
132 Coord_t coord; //0
133 Angle_t angle; //1
134 Accel_t accel; //2
135 Ang_rate_t ang_rate; //3
136 Gps_pos_t gps_pos; //4
137 Wind_t wind; //5
138 Light_t light; //6
140
141#endif
sensor_types
Sensor types enumeration.
Definition: Sensing.h:114
Accelerometer sensor type (ID/ASBM Bit = 2)
Definition: Sensing.h:50
Gyroscope sensor type (ID/ASBM Bit = 3)
Definition: Sensing.h:63
IMU/AHRS sensor type (ID/ASBM Bit = 1)
Definition: Sensing.h:37
Generic Coordinate System sensor type (ID/ASBM Bit = 0)
Definition: Sensing.h:24
GPS sensor type (ID/ASBM Bit = 4)
Definition: Sensing.h:78
Light sensor type (ID/ASBM Bit = 6)
Definition: Sensing.h:102
Sensing holder structure with all the sensor types, ordered by the ASBM bits from its least significa...
Definition: Sensing.h:130
Wind sensor type (ID/ASBM Bit = 5)
Definition: Sensing.h:91