enable ublox jamming statistics, send them out, document & store them
parent
eeb85af0a8
commit
a28cde8010
|
@ -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
|
||||
|
||||
|
|
|
@ -883,6 +883,12 @@ try
|
|||
|
||||
cout<<endl;
|
||||
}
|
||||
else if(nmm.type() == NavMonMessage::UbloxJammingStatsType) {
|
||||
etstamp();
|
||||
cout<<"noisePerMS "<<nmm.ujs().noiseperms() << " agcCnt "<<
|
||||
nmm.ujs().agccnt()<<" flags "<<nmm.ujs().flags()<<" jamind "<<
|
||||
nmm.ujs().jamind()<<endl;
|
||||
}
|
||||
else if(nmm.type() == NavMonMessage::DebuggingType) {
|
||||
|
||||
auto res = parseTrkMeas(basic_string<uint8_t>((const uint8_t*)nmm.dm().payload().c_str(), nmm.dm().payload().size()));
|
||||
|
|
11
navmon.proto
11
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;
|
||||
}
|
||||
|
|
17
navparse.cc
17
navparse.cc
|
@ -1828,6 +1828,23 @@ try
|
|||
|
||||
|
||||
}
|
||||
else if(nmm.type() == NavMonMessage::UbloxJammingStatsType) {
|
||||
/*
|
||||
cout<<"noisePerMS "<<nmm.ujs().noiseperms() << " agcCnt "<<
|
||||
nmm.ujs().agccnt()<<" flags "<<nmm.ujs().flags()<<" jamind "<<
|
||||
nmm.ujs().jamind()<<endl;
|
||||
*/
|
||||
idb.addValueObserver(nmm.sourceid(), "ubx_jamming", {
|
||||
{"noise_per_ms", nmm.ujs().noiseperms()},
|
||||
{"agccnt", nmm.ujs().agccnt()},
|
||||
{"jamind", nmm.ujs().jamind()},
|
||||
{"flags", nmm.ujs().flags()}
|
||||
},
|
||||
nmm.localutcseconds());
|
||||
|
||||
|
||||
}
|
||||
|
||||
else if(nmm.type()== NavMonMessage::DebuggingType) {
|
||||
auto ret = parseTrkMeas(basic_string<uint8_t>((const uint8_t*)nmm.dm().payload().c_str(), nmm.dm().payload().size()));
|
||||
for(const auto& tss : ret) {
|
||||
|
|
41
ubxtool.cc
41
ubxtool.cc
|
@ -930,6 +930,10 @@ int main(int argc, char** argv)
|
|||
if (doDEBUG) { cerr<<humanTimeNow()<<" Enabling UBX-RXM-RLM"<<endl; } // SAR
|
||||
enableUBXMessageOnPort(fd, 0x02, 0x59, ubxport); // UBX-RXM-RLM
|
||||
|
||||
if (doDEBUG) { cerr<<humanTimeNow()<<" Enabling UBX-MON-HW"<<endl; } // SAR
|
||||
enableUBXMessageOnPort(fd, 0x0A, 0x09, ubxport, 16); // UBX-MON-HW
|
||||
|
||||
|
||||
if(version9) {
|
||||
if (doDEBUG) { cerr<<humanTimeNow()<<" Enabling UBX-NAV-SVIN"<<endl; } // Survey-in results
|
||||
enableUBXMessageOnPort(fd, 0x01, 0x3b, ubxport, 2);
|
||||
|
@ -1086,7 +1090,6 @@ int main(int argc, char** argv)
|
|||
nmm.mutable_op()->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<<std::fixed<<"("<<TS.meanXCM <<", "<<TS.meanYCM <<", "<<TS.meanZCM<<")"<<endl;
|
||||
}
|
||||
lastTS = TS;
|
||||
}
|
||||
}
|
||||
else if(msg.getClass() == 0x0a && msg.getType() == 0x09) { // UBX-MON-HW
|
||||
struct MonHW {
|
||||
uint32_t pinSel, pinBank, pinDir, pinVal;
|
||||
|
||||
uint16_t noisePerMS;
|
||||
uint16_t agcCnt;
|
||||
|
||||
uint8_t aStatus;
|
||||
uint8_t aPower;
|
||||
uint8_t flags;
|
||||
uint8_t res1;
|
||||
|
||||
uint32_t usedMask;
|
||||
|
||||
uint8_t VP[17];
|
||||
uint8_t jamInd;
|
||||
uint16_t res2;
|
||||
uint32_t pinIrq, pullH, pullL;
|
||||
} __attribute__((packed));
|
||||
MonHW mhw;
|
||||
memcpy(&mhw, payload.c_str(), sizeof(MonHW));
|
||||
// cerr << "agcCnt "<< mhw.agcCnt <<" jamind " << (unsigned int) mhw.jamInd <<" flags "<< (unsigned int)mhw.flags << endl;
|
||||
NavMonMessage nmm;
|
||||
nmm.set_sourceid(g_srcid);
|
||||
nmm.set_localutcseconds(g_gnssutc.tv_sec);
|
||||
nmm.set_localutcnanoseconds(g_gnssutc.tv_nsec);
|
||||
|
||||
nmm.set_type(NavMonMessage::UbloxJammingStatsType);
|
||||
nmm.mutable_ujs()->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<<humanTimeNow()<<" Unknown UBX message of class "<<(int) msg.getClass() <<" and type "<< (int) msg.getType()<< " of "<<payload.size()<<" bytes"<<endl; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue