source: pacpusframework/branches/0.2.x/include/Pacpus/structures/structure_telemetre.h@ 362

Last change on this file since 362 was 362, checked in by DHERBOMEZ Gérald, 9 years ago

add data structures

File size: 3.5 KB
Line 
1#ifndef STRUCTURE_TELEMETRE_H
2#define STRUCTURE_TELEMETRE_H
3
4#include "kernel/cstdint.h"
5#include "kernel/road_time.h"
6
7////////////////////////////////////////////////////////////////////////////////
8// some constants defined for the Alasca component
9static const uint32_t MAX_SCAN_POINT = 8648;
10static const uint32_t MAX_SCAN_POINT_PER_LAYER = 2162;
11static const int32_t UTC_MAGIC_WORD = 0x55544300;
12
13// Data recorded in the DBITE file
14// Alasca XT laserscanner
15typedef struct
16{
17 int8_t scannertype;
18 uint32_t timeStart; // time start of the scan
19 float startAngle; // the start angle of the measurement (in [rad*e4])
20 float endAngle; // the stop angle of the measurement (in [rad*e4])
21 uint32_t nbPoint; // number of points
22 int32_t dataPos; // the position of the data in the binary file associated to the dbt file
23} AlascaXT;
24
25// An Alasca point
26// see Manual_Alasca.pdf page 27
27// Orientation of the frame regarding the car:
28// X ahead, Y on the left and Z upside
29struct ScanPoint
30{
31 uint8_t scannerId; // ID of the scanner that has detected the point - Alasca has type 2
32 uint8_t layerNumber; // channel (0 = bottom channel ...)
33 uint8_t echoNumber; // subChannel (0 = A, 1 = B ...)
34 uint8_t pointStatus; // ground, rain, dirt ...
35 int16_t x; // X coordinate in centimeters
36 int16_t y; // Y coordinate in centimeters
37 int16_t z; // Z coordinate in centimeters
38 uint16_t width; // the echo width
39};
40
41// Data obtained after decoding
42// The complete structure is written in shared memory
43// Only the point[MAX_SCAN_POINT] array is recorded in the binary file
44// associated to the DBT file (see struct AlascaXT)
45struct ScanAlascaData
46{
47 uint8_t scannertype; // Alasca has type 2
48 uint32_t timeStart; // time start of the scan
49 float startAngle; // the start angle of the measurement (in [rad*e4])
50 float endAngle; // the stop angle of the measurement (in [rad*e4])
51 uint32_t nbPoint; // number of points
52 road_time_t time; // DBT timestamp
53 road_timerange_t timerange; // DBT timerange
54 ScanPoint point[MAX_SCAN_POINT]; // the data, see struct ScanPoint
55};
56
57struct SortedScanAlascaData
58{
59 double xYellow[MAX_SCAN_POINT_PER_LAYER];
60 double yYellow[MAX_SCAN_POINT_PER_LAYER];
61 double xGreen[MAX_SCAN_POINT_PER_LAYER];
62 double yGreen[MAX_SCAN_POINT_PER_LAYER];
63 double xBlue[MAX_SCAN_POINT_PER_LAYER];
64 double yBlue[MAX_SCAN_POINT_PER_LAYER];
65 double xRed[MAX_SCAN_POINT_PER_LAYER];
66 double yRed[MAX_SCAN_POINT_PER_LAYER];
67
68 int32_t totalSize;
69 int32_t yellowSize;
70 int32_t greenSize;
71 int32_t blueSize;
72 int32_t redSize;
73};
74
75/// Sick LMS 221 laserscanner
76typedef struct
77{
78 static const std::size_t DATA_COUNT = 101;
79 float data[DATA_COUNT];
80} TELEMETRE_100;
81
82/// Sick LMS 291 laserscanner
83typedef struct
84{
85 static const std::size_t DATA_COUNT = 181;
86 float data[DATA_COUNT];
87} TELEMETRE_180;
88
89// cf. page 23
90// faire une structure avec le nb de secteurs
91
92// pour chaque secteur :
93// donnees statiques : timestamp debut et fin - angles debut et fin - pas de l'angle nb de pts dans le secteur
94// tableaux => donnees de base : distance direction et echo amplitude
95typedef struct
96{
97 // TODO
98} SickLdoemData;
99
100#endif // STRUCTURE_TELEMETRE_H
Note: See TracBrowser for help on using the repository browser.