Send and read the CAM yaw rate with the ETSI sign
YawRateValue is positive to the left (degSec-000-01ToLeft(1), TS 102 894-2), while Cam.yawRateDps is positive clockwise, to the right, which is what the use-case engine and its heading-trend fallback assume. CamUperCodec used the value as it is in both directions, so every CAM this phone sent showed a standard receiver the opposite turn, and received CAMs were read the wrong way round in turn detection. It now negates on encode and decode. The expected bytes for a right turn in CamEncodeGoldenTest come from asn1tools, not from this encoder. The CiT One's CAM topic (v2x-uca/output/json/cam) is left-positive too, as its API document says and as 316 of 316 turning samples in the logged runs confirm, so CamParser negates as well. Its obu_gnss topic is documented as left-positive but sends yawRate_degps right-positive in practice (27 of 27 turning windows in the 2026-03-18 bacospat log), so ObuGnssParser keeps the value and now reads that documented key, which it used to miss.
This commit is contained in:
@@ -23,6 +23,15 @@ With the CAM pinger on and a listener that decodes yawRate:
|
||||
VAMs keep going at their rate, with no gap and no time_regression on the micrOBU.
|
||||
- [ ] Ride with the phone on the handlebar, then in a bag: the yaw rate's sign and size match the
|
||||
turns (left and right, roundabout).
|
||||
- [ ] Yaw rate sign on air (fixed 2026-11-18: `CamUperCodec` and `CamParser` now flip the ETSI/CiT
|
||||
left-positive value into the app's clockwise-positive one). Turn the pinging phone left: a
|
||||
standard decoder (asn1tools, or the CiT One's `v2x-uca/output/json/cam`) shows a positive
|
||||
YawRateValue, and the app's own decode of the same CAM reads a negative yaw rate (left, in the
|
||||
app's clockwise-positive convention).
|
||||
The logs in `databases/` (not committed) already settled the CiT One side: its CAM topic is
|
||||
left-positive (316 of 316 turning samples), its `obu_gnss` `yawRate_degps` right-positive
|
||||
despite the API document (27 of 27, bacospat ride of 2026-03-18). Only 27 samples from one
|
||||
ride: re-check on the next CiT One ride with turns.
|
||||
|
||||
### obu-firmware on Niklas Dathe's microbu-firmware (added 2026-11-10, bench run 2026-11-11)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user