diff options
author | Helmut Schmidt <Helmut.3.Schmidt@continental-corporation.com> | 2016-11-04 10:20:20 +0100 |
---|---|---|
committer | Helmut Schmidt <Helmut.3.Schmidt@continental-corporation.com> | 2016-11-04 10:20:20 +0100 |
commit | 5a6d74a55a190812ba509e18059bf5fd5b937a16 (patch) | |
tree | 93fe9e07393c5e463522c320390be3a89e6b81c1 /sensors-service/api | |
parent | dab6408fa9eb766242fce14fe23f5fb99431893a (diff) | |
download | positioning-5a6d74a55a190812ba509e18059bf5fd5b937a16.tar.gz |
GT-3402 "Positioning SensorsService API: Add sampling interval field to gyroscope, accelerometer etc data structures"
step 3: Vehicle Speed API
Diffstat (limited to 'sensors-service/api')
-rw-r--r-- | sensors-service/api/vehicle-speed.h | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/sensors-service/api/vehicle-speed.h b/sensors-service/api/vehicle-speed.h index 333fae8..d816ecf 100644 --- a/sensors-service/api/vehicle-speed.h +++ b/sensors-service/api/vehicle-speed.h @@ -27,23 +27,45 @@ extern "C" { #endif /** - * TVehicleSpeedData::validityBits provides information about the currently valid signals of the vehicle speed data. + * TVehicleSpeedData::validityBits provides information about the + * currently valid signals of the vehicle speed data. * It is a or'ed bitmask of the EVehicleSpeedValidityBits values. */ typedef enum { - VEHICLESPEED_VEHICLESPEED_VALID = 0x00000001 /**< Validity bit for field TVehicleSpeedData::vehicleSpeed. */ + /** Validity bit for field TVehicleSpeedData::vehicleSpeed. + */ + VEHICLESPEED_VEHICLESPEED_VALID = 0x00000001, + /** Validity bit for field TVehicleSpeedData::measurementInterval. + */ + VEHICLESPEED__MEASINT_VALID = 0x00000002 } EVehicleSpeedValidityBits; /** * Vehicle speed sensor service provides the current speed of the vehicle. */ typedef struct { - uint64_t timestamp; /**< Timestamp of the acquisition of the vehicle speed signal [ms]. - All sensor/GNSS timestamps must be based on the same time source. */ - float vehicleSpeed; /**< Filtered vehicle speed in [m/s] with a frequency of at least 5Hz. Direction is given by the sign of this value.*/ - uint32_t validityBits; /**< Bit mask indicating the validity of each corresponding value. - [bitwise or'ed @ref EVehicleSpeedValidityBits values]. - Must be checked before usage. */ + /** Timestamp of the acquisition of the vehicle speed signal [ms]. + * All sensor/GNSS timestamps must be based on the same time source. + */ + uint64_t timestamp; + /** Filtered vehicle speed in [m/s] with a frequency of at least 5Hz. + * Direction is given by the sign of this value. + */ + float vehicleSpeed; + /** Measurement interval over which the vehicle speed signal has been acquired [ms]. + * This may slightly differ from the timestamp difference, + * e.g. in case of transmission jitter before timestamping. + * Providing the measurement interval allows thus + * - a more accurate integration of vehicle speed measurements. + * - correct usage of the first sample + * - adding consistency checks + */ + uint16_t measurementInterval; + /** Bit mask indicating the validity of each corresponding value. + * [bitwise or'ed @ref EVehicleSpeedValidityBits values]. + * Must be checked before usage. + */ + uint32_t validityBits; } TVehicleSpeedData; /** |