summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Schmidt <Helmut.3.Schmidt@continental-corporation.com>2016-11-28 09:31:56 +0100
committerHelmut Schmidt <Helmut.3.Schmidt@continental-corporation.com>2016-11-28 09:31:56 +0100
commitaa969b251e4c3f8e57cf8beb57a556640c622651 (patch)
tree4210fae6e2c9d58b42eaf7a732c7552db5c23118
parenta6eb06875a469b18cfb70e307d819352fc536040 (diff)
downloadpositioning-aa969b251e4c3f8e57cf8beb57a556640c622651.tar.gz
GT-3402: Change unit of measurementInterval to micro-seconds
-rwxr-xr-xlog-replayer/doc/LogFileFormat.v4.00.docbin369152 -> 369664 bytes
-rw-r--r--logger/test/snslog.cpp4
-rw-r--r--sensors-service/api/acceleration.h7
-rw-r--r--sensors-service/api/gyroscope.h7
-rw-r--r--sensors-service/api/vehicle-speed.h7
-rw-r--r--sensors-service/api/wheel.h7
-rw-r--r--sensors-service/src/sns-use-replayer.c6
7 files changed, 21 insertions, 17 deletions
diff --git a/log-replayer/doc/LogFileFormat.v4.00.doc b/log-replayer/doc/LogFileFormat.v4.00.doc
index c7523ac..b7c72e8 100755
--- a/log-replayer/doc/LogFileFormat.v4.00.doc
+++ b/log-replayer/doc/LogFileFormat.v4.00.doc
Binary files differ
diff --git a/logger/test/snslog.cpp b/logger/test/snslog.cpp
index d2a6893..3262e76 100644
--- a/logger/test/snslog.cpp
+++ b/logger/test/snslog.cpp
@@ -55,7 +55,7 @@ void accelerationDataToString(uint64_t timestamp, uint16_t countdown, const TAcc
snprintf(
str,
size-1, //ensure that there is space for null-terminator
- "%"PRIu64",%"PRIu16",$GVSNSACC,%"PRIu64",%7.4f,%7.4f,%7.4f,%5.1f,%"PRIu16",0X%08X",
+ "%"PRIu64",%"PRIu16",$GVSNSACC,%"PRIu64",%7.4f,%7.4f,%7.4f,%5.1f,%"PRIu32",0X%08X",
timestamp,
countdown,
accelerationData->timestamp,
@@ -90,7 +90,7 @@ void gyroscopeDataToString(uint64_t timestamp, uint16_t countdown, const TGyrosc
snprintf(
str,
size-1, //ensure that there is space for null-terminator
- "%"PRIu64",%"PRIu16",$GVSNSGYR,%"PRIu64",%6.2f,%6.2f,%6.2f,%5.1f,%"PRIu16",0X%08X",
+ "%"PRIu64",%"PRIu16",$GVSNSGYR,%"PRIu64",%6.2f,%6.2f,%6.2f,%5.1f,%"PRIu32",0X%08X",
timestamp,
countdown,
gyroData->timestamp,
diff --git a/sensors-service/api/acceleration.h b/sensors-service/api/acceleration.h
index dd3fd81..b6aa542 100644
--- a/sensors-service/api/acceleration.h
+++ b/sensors-service/api/acceleration.h
@@ -221,15 +221,16 @@ typedef struct {
* Degrees celsius are preferred but any value linearly dependent on the temperature is fine.
*/
float temperature;
- /** Measurement interval over which the accelerometer signal has been acquired [ms].
- * This may slightly differ from the timestamp difference,
+ /** Measurement interval over which the accelerometer signal has been acquired.
+ * Unit: micro-seconds [us].
+ * 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 accelerometer measurements.
* - correct usage of the first sample
* - adding consistency checks
*/
- uint16_t measurementInterval;
+ uint32_t measurementInterval;
/** Bit mask indicating the validity of each corresponding value.
* [bitwise or'ed @ref EAccelerationValidityBits values].
* Must be checked before usage.
diff --git a/sensors-service/api/gyroscope.h b/sensors-service/api/gyroscope.h
index ba641ae..bc964de 100644
--- a/sensors-service/api/gyroscope.h
+++ b/sensors-service/api/gyroscope.h
@@ -222,15 +222,16 @@ typedef struct {
* Degrees celsius are preferred but any value linearly dependent on the temperature is fine.
*/
float temperature;
- /** Measurement interval over which the gyroscope signal has been acquired [ms].
- * This may slightly differ from the timestamp difference,
+ /** Measurement interval over which the gyroscope signal has been acquired.
+ * Unit: micro-seconds [us].
+ * 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 gyroscope measurements.
* - correct usage of the first sample
* - adding consistency checks
*/
- uint16_t measurementInterval;
+ uint32_t measurementInterval;
/** Bit mask indicating the validity of each corresponding value.
* [bitwise or'ed @ref EGyroscopeValidityBits values].
* Must be checked before usage.
diff --git a/sensors-service/api/vehicle-speed.h b/sensors-service/api/vehicle-speed.h
index d816ecf..6893fbd 100644
--- a/sensors-service/api/vehicle-speed.h
+++ b/sensors-service/api/vehicle-speed.h
@@ -52,15 +52,16 @@ typedef struct {
* 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,
+ /** Measurement interval over which the vehicle speed signal has been acquired.
+ * Unit: micro-seconds [us].
+ * 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;
+ uint32_t measurementInterval;
/** Bit mask indicating the validity of each corresponding value.
* [bitwise or'ed @ref EVehicleSpeedValidityBits values].
* Must be checked before usage.
diff --git a/sensors-service/api/wheel.h b/sensors-service/api/wheel.h
index da3e931..37f61f7 100644
--- a/sensors-service/api/wheel.h
+++ b/sensors-service/api/wheel.h
@@ -331,15 +331,16 @@ typedef struct {
* [bitwise or'ed @ref EWheelStatusBits values].
*/
uint32_t statusBits;
- /** Measurement interval over which the wheel data have been acquired [ms].
- * This may slightly differ from the timestamp difference,
+ /** Measurement interval over which the wheel data have been acquired.
+ * Unit: micro-seconds [us].
+ * 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 wheel data measurements.
* - correct usage of the first sample
* - adding consistency checks
*/
- uint16_t measurementInterval;
+ uint32_t measurementInterval;
/** Bit mask indicating the validity of each corresponding value.
* [bitwise or'ed @ref EWheelValidityBits values].
* Must be checked before usage.
diff --git a/sensors-service/src/sns-use-replayer.c b/sensors-service/src/sns-use-replayer.c
index a39db1a..4fc361b 100644
--- a/sensors-service/src/sns-use-replayer.c
+++ b/sensors-service/src/sns-use-replayer.c
@@ -190,7 +190,7 @@ bool processGVSNSWHE(const char* data)
}
//First try to read in new format with measurementInterval
- n = sscanf(data, "%llu,%hu,$GVSNSWHE,%llu,%f,%f,%f,%f,%f,%f,%f,%f,%x,%hu,%x",
+ n = sscanf(data, "%llu,%hu,$GVSNSWHE,%llu,%f,%f,%f,%f,%f,%f,%f,%f,%x,%u,%x",
&timestamp, &countdown, &whtk.timestamp
,&whtk.data[0], &whtk.data[1]
,&whtk.data[2], &whtk.data[3]
@@ -278,7 +278,7 @@ static bool processGVSNSGYR(const char* data)
}
//First try to read in new format with measurementInterval
- n = sscanf(data, "%llu,%hu,$GVSNSGYR,%llu,%f,%f,%f,%f,%hu,%x"
+ n = sscanf(data, "%llu,%hu,$GVSNSGYR,%llu,%f,%f,%f,%f,%u,%x"
,&timestamp, &countdown, &gyro.timestamp
,&gyro.yawRate
,&gyro.pitchRate
@@ -365,7 +365,7 @@ static bool processGVSNSVSP(const char* data)
}
//First try to read in new format with measurementInterval
- n = sscanf(data, "%llu,%hu,$GVSNSVSP,%llu,%f,%hu,%x"
+ n = sscanf(data, "%llu,%hu,$GVSNSVSP,%llu,%f,%u,%x"
,&timestamp
,&countdown
,&vehsp.timestamp