trkmeas: get rid of 2 unused variable warnings

pull/76/head
Josef 'Jeff' Sipek 2020-01-09 09:26:09 -05:00
parent 6a2bb18a4f
commit 9c35764992
1 changed files with 5 additions and 3 deletions

View File

@ -55,7 +55,6 @@ vector<TrkSatStat> parseTrkMeas(std::basic_string_view<uint8_t> payload)
cerr<<fmt::sprintf("%02x ", (unsigned int) payload[n]); cerr<<fmt::sprintf("%02x ", (unsigned int) payload[n]);
cerr<<endl; cerr<<endl;
*/ */
int msgsize = (payload[2]+256*payload[3]) - 6;
vector<TrkSatStat> ret; vector<TrkSatStat> ret;
for(unsigned int n=4 ; n < payload.size(); n+=16) { for(unsigned int n=4 ; n < payload.size(); n+=16) {
@ -63,7 +62,10 @@ vector<TrkSatStat> parseTrkMeas(std::basic_string_view<uint8_t> payload)
return ret; return ret;
plaintext.append(plainchunk, plainchunk+16); plaintext.append(plainchunk, plainchunk+16);
} }
// cerr<<"msgsize: "<<msgsize<<", assumed SVs: "<<(int)plaintext[8]<<", per "<<(msgsize-104.0)/(int)plaintext[8]<<endl; /*
int msgsize = (payload[2]+256*payload[3]) - 6;
cerr<<"msgsize: "<<msgsize<<", assumed SVs: "<<(int)plaintext[8]<<", per "<<(msgsize-104.0)/(int)plaintext[8]<<endl;
*/
int64_t maxtr=0; int64_t maxtr=0;
for(int n = 0 ; n < plaintext[8]; ++n) { for(int n = 0 ; n < plaintext[8]; ++n) {
@ -86,10 +88,10 @@ vector<TrkSatStat> parseTrkMeas(std::basic_string_view<uint8_t> payload)
int gnssid = plaintext[offset+4]; int gnssid = plaintext[offset+4];
int sv = plaintext[offset+5]; int sv = plaintext[offset+5];
int trkstat = plaintext[offset+8];
double doppler = ldexp(1.0*rdoppler,-10)*10; double doppler = ldexp(1.0*rdoppler,-10)*10;
int plcount = (unsigned int)plaintext[offset+17]; int plcount = (unsigned int)plaintext[offset+17];
/* /*
int trkstat = plaintext[offset+8];
cerr<<" gnssid " << gnssid <<" sv "<< sv; cerr<<" gnssid " << gnssid <<" sv "<< sv;
cerr<<" qi "<<(unsigned int)plaintext[offset+1] <<" c "<<(unsigned int)plaintext[offset]; cerr<<" qi "<<(unsigned int)plaintext[offset+1] <<" c "<<(unsigned int)plaintext[offset];
cerr<<" ? "<<(unsigned int)plaintext[offset+2] << " ? " <<(unsigned int)plaintext[offset+3]; cerr<<" ? "<<(unsigned int)plaintext[offset+2] << " ? " <<(unsigned int)plaintext[offset+3];