From a28cde80102e0664993f3e44e161c1429ab9adfd Mon Sep 17 00:00:00 2001 From: bert hubert Date: Wed, 29 Jan 2020 18:06:23 +0100 Subject: [PATCH] enable ublox jamming statistics, send them out, document & store them --- influxdb.md | 5 +++++ navdump.cc | 6 ++++++ navmon.proto | 11 ++++++++++- navparse.cc | 17 +++++++++++++++++ ubxtool.cc | 41 +++++++++++++++++++++++++++++++++++++++-- 5 files changed, 77 insertions(+), 3 deletions(-) diff --git a/influxdb.md b/influxdb.md index ea67a0f..6c124b0 100644 --- a/influxdb.md +++ b/influxdb.md @@ -104,4 +104,9 @@ Observer and SV measurements: * ele: calculated elevation for SV from this receiver * prres: pseudorange residual according to receiver * qi: 0-7, quality indicator according to receiver + * ubx\_jamming + * noise\_per\_ms: the Ublox noisePerMS field + * agccnt: the Ublox automatic gain correction "count" + * jamind: The Ublox jamming indicator + * flag: The Ublox jamming flag field diff --git a/navdump.cc b/navdump.cc index 80d746c..180b1e3 100644 --- a/navdump.cc +++ b/navdump.cc @@ -883,6 +883,12 @@ try cout<((const uint8_t*)nmm.dm().payload().c_str(), nmm.dm().payload().size())); diff --git a/navmon.proto b/navmon.proto index 914af82..ee3df18 100644 --- a/navmon.proto +++ b/navmon.proto @@ -13,6 +13,7 @@ message NavMonMessage { SARResponseType = 9; DebuggingType = 10; ObserverDetailsType = 11; + UbloxJammingStatsType = 12; } required uint64 sourceID = 1; @@ -143,6 +144,13 @@ message NavMonMessage { optional uint32 uptime = 13; } + message UbloxJammingStats + { + required uint32 noisePerMS = 1; + required uint32 agcCnt = 2; + required uint32 flags = 3; + required uint32 jamInd = 4; + } optional GalileoInav gi=5; optional ReceptionData rd=6; @@ -154,5 +162,6 @@ message NavMonMessage { optional GlonassInav gloi=12; optional SARResponse sr=13; optional DebuggingMessage dm = 14; - optional ObserverDetails od = 15; + optional ObserverDetails od = 15; + optional UbloxJammingStats ujs = 16; } diff --git a/navparse.cc b/navparse.cc index b30e967..4dd6ef0 100644 --- a/navparse.cc +++ b/navparse.cc @@ -1828,6 +1828,23 @@ try } + else if(nmm.type() == NavMonMessage::UbloxJammingStatsType) { + /* + cout<<"noisePerMS "<((const uint8_t*)nmm.dm().payload().c_str(), nmm.dm().payload().size())); for(const auto& tss : ret) { diff --git a/ubxtool.cc b/ubxtool.cc index 37e7372..f9770b1 100644 --- a/ubxtool.cc +++ b/ubxtool.cc @@ -930,6 +930,10 @@ int main(int argc, char** argv) if (doDEBUG) { cerr<set_z(5001904.9952); nmm.mutable_op()->set_acc(3.14); ns.emitNMM( nmm); - } } @@ -1680,7 +1683,41 @@ int main(int argc, char** argv) cerr<set_noiseperms(mhw.noisePerMS); + nmm.mutable_ujs()->set_agccnt(mhw.agcCnt); + nmm.mutable_ujs()->set_flags(mhw.flags); + nmm.mutable_ujs()->set_jamind(mhw.jamInd); + ns.emitNMM(nmm); + } else if (doDEBUG) { cerr<