source: pacpussensors/trunk/Alasca/AlascaData.h@ 17

Last change on this file since 17 was 1, checked in by DHERBOMEZ Gérald, 12 years ago

ajout des capteurs CanGateway et Alasca

File size: 2.8 KB
RevLine 
[1]1#ifndef __ALASCA_DATA_H__
2#define __ALASCA_DATA_H__
3
4#include "Pacpus/kernel/cstdint.h"
5#include "Pacpus/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#endif
Note: See TracBrowser for help on using the repository browser.