Update ubxtool.cc

Made the output bit nicer by translating constellation names.
pull/72/head
nousian 2020-01-04 18:37:40 +02:00 committed by GitHub
parent ef8cc9538d
commit 9f548a143b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -528,6 +528,20 @@ int initFD(const char* fname, bool doRTSCTS)
}
char getGNSSChar(int id)
{
if(id==0)
return 'G';
if(id==2)
return 'E';
if(id==3)
return 'C';
if(id==6)
return 'R';
else
return '0'+id;
}
// ubxtool device srcid
int main(int argc, char** argv)
{
@ -1098,7 +1112,7 @@ int main(int argc, char** argv)
if(time(0)- lastStat > 30) {
cerr<<humanTimeNow()<<" src "<<g_srcid<< " (fix: "<<g_fixtype<<") currently receiving: ";
for(auto& s : svseen) {
cerr<<get<0>(s)<<","<<get<1>(s)<<"@"<<get<2>(s)<<" ";
cerr<<getGNSSChar(get<0>(s))<<get<1>(s)<<"@"<<get<2>(s)<<" ";
}
cerr<<endl;
lastStat = time(0);