mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-12-06 09:06:52 +01:00
mcu-its-g5: decoded header as JSON on mcu-its-g5/decoded, 1 Hz per station
Message type, station type and id, position, speed and heading from the GeoNetworking header, so consumers don't need an ASN.1 decoder. Outside its/<node>/#, so the EMQX bridge keeps it off OpenTrafficMap.
This commit is contained in:
1 parent
3676c0bbcc
commit
547dea26e3
3 files changed
+39
No files matched your search
@@ -25,7 +25,9 @@ int main() {
|
||||
assert(i.secured && i.port == 2001 && i.station_type == 5);
|
||||
assert(std::fabs(i.lat - 48.1528384) < 1e-7 && std::fabs(i.lon - 17.1203168) < 1e-7);
|
||||
assert(std::fabs(i.speed_kmh - 50.04f) < 0.01f && std::fabs(i.heading - 123.4f) < 0.01f);
|
||||
assert(i.addr == 0x1400010203040506ULL);
|
||||
assert(handle(f) && stats.cam == 1);
|
||||
assert(due(i.addr, 1000, 1000) && !due(i.addr, 1999, 1000) && due(2, 1999, 1000) && due(i.addr, 2000, 1000));
|
||||
f[30] = 0x48; assert(!parse(f, i)); // not GeoNetworking
|
||||
std::puts("ok");
|
||||
}
|
||||
Reference in new issue
Block a user