tool inadvertently did not send 0 words
parent
d047360d8b
commit
11b82c858f
14
ubxtool.cc
14
ubxtool.cc
|
@ -24,6 +24,8 @@ struct timespec g_gstutc;
|
|||
uint16_t g_wn;
|
||||
using namespace std;
|
||||
|
||||
uint16_t g_srcid{2};
|
||||
|
||||
#define BAUDRATE B921600
|
||||
#define MODEMDEVICE "/dev/ttyACM0"
|
||||
|
||||
|
@ -427,7 +429,7 @@ int main(int argc, char** argv)
|
|||
nmm.set_type(NavMonMessage::RFDataType);
|
||||
nmm.set_localutcseconds(g_gstutc.tv_sec);
|
||||
nmm.set_localutcnanoseconds(g_gstutc.tv_nsec);
|
||||
nmm.set_sourceid(1); // XXX source id
|
||||
nmm.set_sourceid(g_srcid); // XXX source id
|
||||
|
||||
nmm.mutable_rfd()->set_gnssid(gnssid);
|
||||
nmm.mutable_rfd()->set_gnsssv(sv);
|
||||
|
@ -462,7 +464,7 @@ int main(int argc, char** argv)
|
|||
nmm.set_type(NavMonMessage::ObserverPositionType);
|
||||
nmm.set_localutcseconds(g_gstutc.tv_sec);
|
||||
nmm.set_localutcnanoseconds(g_gstutc.tv_nsec);
|
||||
nmm.set_sourceid(1); // XXX source id
|
||||
nmm.set_sourceid(g_srcid); // XXX source id
|
||||
nmm.mutable_op()->set_x(p.ecefX /100.0);
|
||||
nmm.mutable_op()->set_y(p.ecefY /100.0);
|
||||
nmm.mutable_op()->set_z(p.ecefZ /100.0);
|
||||
|
@ -485,6 +487,7 @@ int main(int argc, char** argv)
|
|||
cerr<<" "<<wtype<<" sv "<<id.second<<" tow "<<satTOW << " % 30 = "<< satTOW % 30<<", implied start of cycle: "<<(satTOW - (satTOW %30)) <<endl;
|
||||
if(curCycleTOW != satTOW - (satTOW %30))
|
||||
curCycleTOWFresh=false;
|
||||
msgTOW = satTOW;
|
||||
curCycleTOW = satTOW - (satTOW %30);
|
||||
nextCycleTOW = curCycleTOW + 30;
|
||||
}
|
||||
|
@ -544,9 +547,9 @@ int main(int argc, char** argv)
|
|||
cerr<<"what kind of wtype is this"<<endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
NavMonMessage nmm;
|
||||
nmm.set_sourceid(1);
|
||||
nmm.set_sourceid(g_srcid);
|
||||
nmm.set_type(NavMonMessage::GalileoInavType);
|
||||
nmm.set_localutcseconds(g_gstutc.tv_sec);
|
||||
nmm.set_localutcnanoseconds(g_gstutc.tv_nsec);
|
||||
|
@ -558,7 +561,6 @@ int main(int argc, char** argv)
|
|||
nmm.mutable_gi()->set_contents((const char*)&inav[0], inav.size());
|
||||
|
||||
emitNMM(1, nmm);
|
||||
}
|
||||
|
||||
|
||||
if(0 && lasttv.count(id)) {
|
||||
|
@ -589,7 +591,7 @@ int main(int argc, char** argv)
|
|||
auto db = (int)payload[10+12*n];
|
||||
|
||||
NavMonMessage nmm;
|
||||
nmm.set_sourceid(1);
|
||||
nmm.set_sourceid(g_srcid);
|
||||
nmm.set_localutcseconds(g_gstutc.tv_sec);
|
||||
nmm.set_localutcnanoseconds(g_gstutc.tv_nsec);
|
||||
|
||||
|
|
Loading…
Reference in New Issue