PackedNavBits.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
43 #include <math.h>
44 #include <iostream>
45 #include <iomanip>
46 
47 #include "PackedNavBits.hpp"
48 #include "GPSWeekSecond.hpp"
49 #include "TimeString.hpp"
50 //#include "CivilTime.hpp"
51 //#include "YDSTime.hpp"
52 #include "GNSSconstants.hpp"
53 
54 namespace gnsstk
55 {
56  using namespace std;
58  : transmitTime(CommonTime::BEGINNING_OF_TIME),
59  parityStatus(psUnknown),
60  bits(900),
61  bits_used(0),
62  rxID(""),
63  xMitCoerced(false)
64  {
66  }
68  const ObsID& obsIDArg,
69  const CommonTime& transmitTimeArg)
70  : bits(900),
71  parityStatus(psUnknown),
72  bits_used(0),
73  rxID(""),
74  xMitCoerced(false)
75  {
76  satSys = satSysArg;
77  obsID = obsIDArg;
78  transmitTime = transmitTimeArg;
79  xMitCoerced = false;
80  }
81 
83  const ObsID& obsIDArg,
84  const std::string rxString,
85  const CommonTime& transmitTimeArg)
86  : bits(900),
87  parityStatus(psUnknown),
88  bits_used(0),
89  rxID(""),
90  xMitCoerced(false)
91  {
92  satSys = satSysArg;
93  obsID = obsIDArg;
94  rxID = rxString;
95  transmitTime = transmitTimeArg;
96  xMitCoerced = false;
97  }
98 
100  const ObsID& obsIDArg,
101  const NavID& navIDArg,
102  const std::string rxString,
103  const CommonTime& transmitTimeArg)
104  : bits(900),
105  parityStatus(psUnknown),
106  bits_used(0),
107  rxID(""),
108  xMitCoerced(false)
109  {
110  satSys = satSysArg;
111  obsID = obsIDArg;
112  navID = navIDArg;
113  rxID = rxString;
114  transmitTime = transmitTimeArg;
115  xMitCoerced = false;
116  }
117 
118 
120  const ObsID& obsIDArg,
121  const NavID& navIDArg,
122  const std::string rxString,
123  const CommonTime& transmitTimeArg,
124  unsigned numBits,
125  bool fillValue)
126  : parityStatus(psUnknown),
127  satSys(satSysArg),
128  obsID(obsIDArg),
129  navID(navIDArg),
130  rxID(rxString),
131  transmitTime(transmitTimeArg),
132  bits(numBits, fillValue),
133  bits_used(numBits),
134  xMitCoerced(false)
135  {
136  }
137 
138 
139  // Copy constructor
141  {
142  satSys = right.satSys;
143  obsID = right.obsID;
144  navID = right.navID;
145  rxID = right.rxID;
146  transmitTime = right.transmitTime;
147  bits_used = right.bits_used;
148  bits.resize(bits_used);
149  parityStatus = right.parityStatus;
150  for (int i=0;i<bits_used;i++)
151  {
152  bits[i] = right.bits[i];
153  }
154  xMitCoerced = right.xMitCoerced;
155  }
156 
157  /*
158  // Copy assignment
159  PackedNavBits& PackedNavBits::operator=(const PackedNavBits& right)
160  {
161  satSys = right.satSys;
162  obsID = right.obsID;
163  transmitTime = right.transmitTime;
164  bits_used = right.bits_used;
165  bits.resize(bits_used);
166  for (int i=0;i<bits_used;i++)
167  {
168  bits[i] = right.bits[i];
169  }
170  //TODO: return *this;
171  }
172  */
173 
175  {
176  return new PackedNavBits (*this);
177  }
178 
179  void PackedNavBits::setSatID(const SatID& satSysArg)
180  {
181  satSys = satSysArg;
182  return;
183  }
184 
185  void PackedNavBits::setObsID(const ObsID& obsIDArg)
186  {
187  obsID = obsIDArg;
188  return;
189  }
190 
191  void PackedNavBits::setNavID(const NavID& navIDArg)
192  {
193  navID = navIDArg;
194  return;
195  }
196 
197  void PackedNavBits::setRxID(const std::string rxString)
198  {
199  rxID = rxString;
200  return;
201  }
202 
203  void PackedNavBits::setTime(const CommonTime& TransmitTimeArg)
204  {
205  transmitTime = TransmitTimeArg;
206  return;
207  }
208 
210  {
211  bits.clear();
212  bits_used = 0;
213  }
214 
216  {
217  return(obsID);
218  }
219 
221  {
222  return(satSys);
223  }
224 
226  {
227  return(navID);
228  }
229 
230  std::string PackedNavBits::getRxID() const
231  {
232  return(rxID);
233  }
234 
236  {
237  return(transmitTime);
238  }
239 
241  {
242  return(bits_used);
243  }
244 
245  /*** UNPACKING FUNCTIONS *********************************/
246  uint64_t PackedNavBits::asUint64_t(const int startBit,
247  const int numBits ) const
248  {
249  uint64_t temp = 0L; // Set up a temporary variable with a known size
250  // It needs to be AT LEAST 33 bits.
251  size_t stop = startBit + numBits;
252  if (stop>bits.size())
253  {
254  InvalidParameter exc("Requested bits not present.");
255  GNSSTK_THROW(exc);
256  }
257  for (size_t i=startBit; i<stop; ++i)
258  {
259  temp <<= 1;
260  if (bits[i]) temp++;
261  }
262  return( temp );
263  }
264 
265  unsigned long PackedNavBits::asUnsignedLong(const int startBit,
266  const int numBits,
267  const int scale ) const
268  {
269  uint64_t temp = asUint64_t( startBit, numBits );
270  unsigned long ulong = (unsigned long) temp;
271  ulong *= scale;
272  return( ulong );
273  }
274 
275  long PackedNavBits::asLong(const int startBit, const int numBits,
276  const int scale) const
277  {
278  int64_t s = SignExtend( startBit, numBits);
279  return( (long) (s * scale ) );
280  }
281 
282  double PackedNavBits::asUnsignedDouble(const int startBit, const int numBits,
283  const int power2) const
284  {
285  uint64_t uint = asUint64_t( startBit, numBits );
286 
287  // Convert to double and scale
288  double dval = (double) uint;
289  dval *= pow(static_cast<double>(2), power2);
290  return( dval );
291  }
292 
293  double PackedNavBits::asSignedDouble(const int startBit, const int numBits,
294  const int power2 ) const
295  {
296  int64_t s = SignExtend( startBit, numBits);
297 
298  // Convert to double and scale
299  double dval = (double) s;
300  dval *= pow(static_cast<double>(2), power2);
301  return( dval );
302  }
303 
304  double PackedNavBits::asDoubleSemiCircles(const int startBits, const int numBits,
305  const int power2) const
306  {
307  double drad = asSignedDouble( startBits, numBits, power2);
308  return (drad*PI);
309  }
310 
311  //----
312  /* Unpack a sign/mag long */
313  long PackedNavBits::asSignMagLong(const int startBit,
314  const int numBits,
315  const int scale) const
316  {
317  // Get the magnitude
318  int startBitMag = startBit + 1;
319  int numBitsMag = numBits - 1;
320  unsigned long mag = asUnsignedLong(startBitMag, numBitsMag, scale);
321 
322  // Get the sign bit
323  uint64_t uint = asUint64_t( startBit, 1 );
324 
325  long smag = (long) mag;
326  if (uint==1) smag *= -1;
327  return smag;
328  }
329 
330  /* Unpack a sign/mag double */
331  double PackedNavBits::asSignMagDouble( const int startBit,
332  const int numBits,
333  const int power2) const
334  {
335  int startBitMag = startBit + 1;
336  int numBitsMag = numBits - 1;
337  uint64_t mag = asUint64_t(startBitMag, numBitsMag);
338  uint64_t uint = asUint64_t(startBit, 1);
339  int64_t smag = (int64_t)mag;
340  if (uint == 1)
341  {
342  smag = -smag;
343  }
344  // Convert to double and scale
345  return ldexp((double)smag, power2);
346  }
347 
348  /* Unpack a sign/mag double with units of semi-circles */
349  double PackedNavBits::asSignMagDoubleSemiCircles( const int startBit,
350  const int numBits,
351  const int power2) const
352  {
353  double drad = asSignMagDouble( startBit, numBits, power2);
354  return (drad*PI);
355  }
356 
357 
358  std::string PackedNavBits::asString(const int startBit, const int numChars) const
359  {
360  int CHAR_SIZE = 8;
361  string out = " ";
362  int currentStart = startBit;
363  for (int i = 0; i < numChars; ++i)
364  {
365  uint64_t temp = asUint64_t(currentStart, CHAR_SIZE);
366  char ch = (char) temp;
367  out += ch;
368  currentStart += CHAR_SIZE;
369  }
370  return(out);
371  }
372 
373  /* Unpack a split unsigned long integer */
374  unsigned long PackedNavBits::asUnsignedLong(const unsigned startBits[],
375  const unsigned numBits[],
376  const unsigned len,
377  const int scale ) const
378  {
379 
380  unsigned long ulong = (unsigned long) asUint64_t(startBits[0], numBits[0]);
381  uint64_t temp;
382  for(unsigned int i = 1; i < len; i++){
383  temp = asUint64_t(startBits[i], numBits[i]);
384  ulong <<= numBits[i];
385  ulong |= temp;
386  }
387 
388  //uint64_t temp1 = asUint64_t( startBit1, numBits1 );
389  //uint64_t temp2 = asUint64_t( startBit2, numBits2 );
390  //unsigned long ulong = (unsigned long) temp1;
391  //ulong <<= numBits2;
392  //ulong |= temp2;
393 
394  ulong *= scale;
395  return( ulong );
396  }
397 
398 
399  unsigned long PackedNavBits::asUnsignedLong(const unsigned startBit1,
400  const unsigned numBits1,
401  const unsigned startBit2,
402  const unsigned numBits2,
403  const int scale ) const
404  {
405  uint64_t temp1 = asUint64_t( startBit1, numBits1 );
406  uint64_t temp2 = asUint64_t( startBit2, numBits2 );
407  unsigned long ulong = (unsigned long) temp1;
408  ulong <<= numBits2;
409  ulong |= temp2;
410  ulong *= scale;
411  return ulong;
412  }
413 
414  /* Unpack a split signed long integer */
415  long PackedNavBits::asLong(const unsigned startBits[],
416  const unsigned numBits[],
417  const unsigned len,
418  const int scale ) const
419  {
420 
421  int64_t s = SignExtend(startBits[0], numBits[0]);
422  uint64_t temp;
423  for(unsigned int i = 1; i < len; i++){
424  temp = asUint64_t(startBits[i], numBits[i]);
425  s <<= numBits[i];
426  s |= temp;
427  }
428 
429  //int64_t s = SignExtend( startBit1, numBits1);
430  //uint64_t temp2 = asUint64_t( startBit2, numBits2 );
431  //s <<= numBits2;
432  //s |= temp2;
433 
434  return( (long) (s * scale ) );
435  }
436 
437  /* Unpack a split signed long integer */
438  long PackedNavBits::asLong(const unsigned startBits1,
439  const unsigned numBits1,
440  const unsigned startBits2,
441  const unsigned numBits2,
442  const int scale ) const
443  {
444  int64_t s = SignExtend(startBits1, numBits1);
445  uint64_t temp;
446  temp = asUint64_t(startBits2, numBits2);
447  s <<= numBits2;
448  s |= temp;
449 
450  return( (long) (s * scale ) );
451  }
452 
453  /* Unpack a split unsigned double */
454  double PackedNavBits::asUnsignedDouble(const unsigned startBits[],
455  const unsigned numBits[],
456  const unsigned len,
457  const int power2) const
458  {
459 
460  unsigned long ulong = (unsigned long) asUint64_t(startBits[0], numBits[0]);
461  int64_t temp;
462  for(unsigned int i = 1; i < len; i++){
463  temp = asUint64_t(startBits[i], numBits[i]);
464  ulong <<= numBits[i];
465  ulong |= temp;
466  }
467 
468 
469  //uint64_t temp1 = asUint64_t( startBit1, numBits1 );
470  //uint64_t temp2 = asUint64_t( startBit2, numBits2 );
471  //unsigned long ulong = (unsigned long) temp1;
472  //ulong <<= numBits2;
473  //ulong |= temp2;
474 
475  // Convert to double and scale
476  double dval = (double) ulong;
477  dval *= pow(static_cast<double>(2), power2);
478  return( dval );
479  }
480 
481 
482  double PackedNavBits::asUnsignedDouble(const unsigned startBit1,
483  const unsigned numBits1,
484  const unsigned startBit2,
485  const unsigned numBits2,
486  const int power2) const
487  {
488  uint64_t temp1 = asUint64_t( startBit1, numBits1 );
489  uint64_t temp2 = asUint64_t( startBit2, numBits2 );
490  unsigned long ulong = (unsigned long) temp1;
491  ulong <<= numBits2;
492  ulong |= temp2;
493  // Convert to double and scale
494  double dval = (double) ulong;
495  dval *= pow(static_cast<double>(2), power2);
496  return( dval );
497  }
498 
499  /* Unpack a split signed double */
500  double PackedNavBits::asSignedDouble(const unsigned startBits[],
501  const unsigned numBits[],
502  const unsigned len,
503  const int power2) const
504  {
505  int64_t s = SignExtend(startBits[0], numBits[0]);
506  uint64_t temp;
507  for(unsigned int i = 1; i < len; i++){
508  temp = asUint64_t(startBits[i], numBits[i]);
509  s <<= numBits[i];
510  s |= temp;
511  }
512 
513  //int64_t s = SignExtend( startBit1, numBits1);
514  //uint64_t temp2 = asUint64_t( startBit2, numBits2 );
515  //s <<= numBits2;
516  //s |= temp2;
517 
518  // Convert to double and scale
519  double dval = (double) s;
520  dval *= pow(static_cast<double>(2), power2);
521  return( dval );
522  }
523 
524 
525  double PackedNavBits ::
526  asSignedDouble(const std::vector<unsigned>& startBits,
527  const std::vector<unsigned>& numBits,
528  const std::vector<unsigned>& whichSF,
529  const std::vector<PackedNavBitsPtr>& bits,
530  const int power2)
531  {
532  int64_t s = bits[whichSF[0]]->SignExtend(startBits[0], numBits[0]);
533  uint64_t temp;
534  for (unsigned int i = 1; i < startBits.size(); i++)
535  {
536  temp = bits[whichSF[i]]->asUint64_t(startBits[i], numBits[i]);
537  s <<= numBits[i];
538  s |= temp;
539  }
540 
541  // Convert to double and scale
542  return ldexp((double)s, power2);
543  }
544 
545 
546  double PackedNavBits ::
547  asUnsignedDouble(const std::vector<unsigned>& startBits,
548  const std::vector<unsigned>& numBits,
549  const std::vector<unsigned>& whichSF,
550  const std::vector<PackedNavBitsPtr>& bits,
551  const int power2)
552  {
553  uint64_t ulong = bits[whichSF[0]]->asUint64_t(startBits[0], numBits[0]);
554  uint64_t temp;
555  for (unsigned int i = 1; i < startBits.size(); i++)
556  {
557  temp = bits[whichSF[i]]->asUint64_t(startBits[i], numBits[i]);
558  ulong <<= numBits[i];
559  ulong |= temp;
560  }
561 
562  // Convert to double and scale
563  return ldexp((double)ulong, power2);
564  }
565 
566 
567  double PackedNavBits::asSignedDouble(const unsigned startBit1,
568  const unsigned numBits1,
569  const unsigned startBit2,
570  const unsigned numBits2,
571  const int power2) const
572  {
573  int64_t s = SignExtend( startBit1, numBits1);
574  uint64_t temp2 = asUint64_t( startBit2, numBits2 );
575  s <<= numBits2;
576  s |= temp2;
577 
578  // Convert to double and scale
579  double dval = (double) s;
580  dval *= pow(static_cast<double>(2), power2);
581  return( dval );
582  }
583 
584  /* Unpack a split double with units of semicircles */
585  double PackedNavBits::asDoubleSemiCircles(const unsigned startBits[],
586  const unsigned numBits[],
587  const unsigned len,
588  const int power2) const
589  {
590  double drad = asSignedDouble( startBits, numBits, len, power2);
591  return (drad*PI);
592  }
593 
594 
595  double PackedNavBits::asDoubleSemiCircles(const unsigned startBit1,
596  const unsigned numBits1,
597  const unsigned startBit2,
598  const unsigned numBits2,
599  const int power2) const
600  {
601  return PI * asSignedDouble(startBit1, numBits1, startBit2, numBits2,
602  power2);
603  }
604 
605 
606  bool PackedNavBits::asBool( const unsigned bitNum) const
607  {
608  return bits[bitNum];
609  }
610 
611 
612  /*** PACKING FUNCTIONS *********************************/
613  void PackedNavBits::addUnsignedLong( const unsigned long value,
614  const int numBits,
615  const int scale )
616  {
617  uint64_t out = (uint64_t) value;
618  out /= scale;
619 
620  uint64_t test = pow(static_cast<double>(2),numBits) - 1;
621  if ( out > test )
622  {
623  InvalidParameter exc("Scaled value too large for specifed bit length");
624  GNSSTK_THROW(exc);
625  }
626  addUint64_t( out, numBits );
627  }
628 
629  void PackedNavBits::addLong( const long value, const int numBits, const int scale )
630  {
631  union
632  {
633  uint64_t u_out;
634  int64_t out;
635  };
636  out = (int64_t) value;
637  out /= scale;
638 
639  int64_t test = pow(static_cast<double>(2),numBits-1) - 1;
640  if ( ( out > test ) || ( out < -( test + 1 ) ) )
641  {
642  InvalidParameter exc("Scaled value too large for specifed bit length");
643  GNSSTK_THROW(exc);
644  }
645  addUint64_t( u_out, numBits );
646  }
647 
648  void PackedNavBits::addUnsignedDouble( const double value, const int numBits,
649  const int power2 )
650  {
651  uint64_t out = (uint64_t) ScaleValue(value, power2);
652  uint64_t test = pow(static_cast<double>(2),numBits) - 1;
653  if ( out > test )
654  {
655  InvalidParameter exc("Scaled value too large for specifed bit length");
656  GNSSTK_THROW(exc);
657  }
658 
659  addUint64_t( out, numBits );
660  }
661 
662  void PackedNavBits::addSignedDouble( const double value, const int numBits,
663  const int power2 )
664  {
665  union
666  {
667  uint64_t u_out;
668  int64_t out;
669  };
670  out = (int64_t) ScaleValue(value, power2);
671  int64_t test = pow(static_cast<double>(2),numBits-1) - 1;
672  if ( ( out > test ) || ( out < -( test + 1 ) ) )
673  {
674  InvalidParameter exc("Scaled value too large for specifed bit length");
675  GNSSTK_THROW(exc);
676  }
677  addUint64_t( u_out, numBits );
678  }
679 
680  void PackedNavBits::addDoubleSemiCircles( const double Radians, const int numBits,
681  const int power2)
682  {
683  union
684  {
685  uint64_t u_out;
686  int64_t out;
687  };
688  double temp = Radians/PI;
689  out = (int64_t) ScaleValue(temp, power2);
690  int64_t test = pow(static_cast<double>(2), numBits-1) - 1;
691  if ( ( out > test ) || ( out < -( test + 1 ) ) )
692  {
693  InvalidParameter exc("Scaled value too large for specifed bit length");
694  GNSSTK_THROW(exc);
695  }
696  addUint64_t( u_out, numBits );
697  }
698 
699  void PackedNavBits::addString( const string String, const int numChars )
700  {
701  int numPadBlanks = 0;
702  int numToCopy = 0;
703  if (numChars < int(String.length()))
704  {
705  numPadBlanks = 0;
706  numToCopy = numChars;
707  }
708  else if (numChars > int(String.length()))
709  {
710  numToCopy = String.length();
711  numPadBlanks = numChars - numToCopy;
712  }
713  else
714  {
715  numToCopy = numChars;
716  }
717  int i;
718  for (i = 0; i < numToCopy; ++i)
719  {
720  const unsigned char ch = String[i];
721  bool valid = false;
722  if ( ('A' <= ch && ch <= 'Z') || ('0' <= ch && ch <= ':') || (' ' == ch) ||
723  ('"' == ch) || ('\'' == ch) || ('+' == ch) || ('-' <= ch && ch <= '/') ||
724  (0xF8 == ch) ) valid = true;
725 
726  if (!valid)
727  {
728  InvalidParameter exc("Invalid character '<< ch <<' in text string. ");
729  GNSSTK_THROW(exc);
730  }
731  uint64_t out = (uint64_t) ch;
732  addUint64_t(out, 8);
733  }
734  uint64_t space = 0x00000020;
735  for (i = 0; i < numPadBlanks; ++i)
736  addUint64_t(space, 8);
737  }
738 
739 
740  void PackedNavBits::addDataVec(const std::vector<uint8_t>& data,
741  unsigned numBits)
742  {
743  if (numBits > data.size()*8)
744  {
745  gnsstk::InvalidParameter exc("Requested more bits than are available");
746  GNSSTK_THROW(exc);
747  }
748  unsigned numBytes = numBits >> 3;
749  unsigned rem = numBits % 8;
750  if (rem > 0)
751  numBytes++;
752  for (unsigned long i = 0; i < numBytes; i++)
753  {
754  // Add 8 bits at a time (at most) so we don't have to
755  // worry about byte swapping. We also have to shift the
756  // final byte to the right if the bits are not
757  // byte-aligned, as addUint64_t adds the n LSBs, not the n
758  // MSBs.
759  unsigned bitsToAdd = 8;
760  unsigned shiftRight = 0;
761  if ((i+1)*8 >= numBits)
762  {
763  bitsToAdd = rem;
764  shiftRight = 8-rem;
765  }
766  addUint64_t(data[i] >> shiftRight, bitsToAdd);
767  }
768  }
769 
770 
772  {
773  int old_bits_used = bits_used;
774  bits_used += right.bits_used;
775  bits.resize(bits_used);
776 
777  for (int i=0;i<right.bits_used;i++)
778  {
779  bits[i+old_bits_used] = right.bits[i];
780  }
781  }
782 
783  void PackedNavBits::addUint64_t( const uint64_t value, const int numBits )
784  {
785  size_t ndx = bits_used;
786  uint64_t mask = 0x0000000000000001L;
787  mask <<= (numBits-1);
788 
789  for (int i=0; i<numBits; ++i)
790  {
791  bits[ndx] = false;
792  if (value & mask)
793  {
794  //set the bits to true
795  bits[ndx] = true;
796  }
797  mask>>= 1;
798  ndx++;
799  }
800  bits_used += numBits;
801  }
802 
803  //--------------------------------------------------------------------------
804  // Used in NavFilter implementations. This method ASSUMES the meta-date
805  // matches have already been done. It is simply comparing contents of the
806  // bit array bit-for-bit and returning "less than" if it finds an occasion
807  // in which left has a FALSE whereas right has a TRUE starting at the
808  // lowest index and scanning to the maximum index.
809  //
810  // NOTE: This is one of the cases in which the PackedNavBits implementation
811  // is probably not the fastest. Since we are scanning a bit array rather
812  // than testing a series of unsigned ints.
813  bool PackedNavBits::operator<(const PackedNavBits& right) const
814  {
815  // If the two objects don't have the same number of bits,
816  // don't perform the bit compare. NOTE: This should not
817  // happen. In the context of NavFilter, data SHOULD be
818  // from the same system, therefore, the same length should
819  // always be true.
820  if (bits.size()!=right.bits.size())
821  {
822  if (bits.size()<right.bits.size()) return true;
823  return false;
824  }
825 
826  for (int i=0;i<bits.size();i++)
827  {
828  if (bits[i]==false && right.bits[i]==true)
829  //if (bits[i]<right.bits[i])
830  {
831  return true;
832  }
833  if (bits[i]==true && right.bits[i]==false)
834  {
835  return false;
836  }
837  }
838  return false;
839  }
840 
842  {
843  // Each bit is either 1 or 0.
844  // Starting with 1 and subtracting the
845  // current value will yield the inverse
846  //
847  // Input Equation Result
848  // 1 1 - 1 0
849  // 0 1 - 0 1
850  //
851  // This accomplishes the purpose without incurring
852  // the cost of a conditional statement.
853  for (int i=0;i<bits.size();i++)
854  {
855  bits[i] = 1 - bits[i];
856  }
857  }
858 
865  const short startBit,
866  const short endBit)
867  {
868  if (bits_used != src.bits_used)
869  {
870  stringstream ss;
871  ss << "PackedNavBits::copyBits( ) may only be called on two";
872  ss << " objects with the same number of packed bits.";
873  InvalidParameter ip(ss.str());
874  GNSSTK_THROW(ip);
875  }
876 
877  short finalBit = endBit;
878  if (finalBit==-1) finalBit = bits_used - 1;
879 
880  for (short i=startBit; i<=finalBit; i++)
881  {
882  bits[i] = src.bits[i];
883  }
884  }
885 
886 
887  //--------------------------------------------------------------------------
888  // Not typically used in production. See comments in header.
889  void PackedNavBits::insertUnsignedLong(const unsigned long value,
890  const int startBit,
891  const int numBits,
892  const int scale)
893  {
894  if ((startBit+numBits)>bits_used)
895  {
896  stringstream ss;
897  ss << "insertUnsignedLong called with startBit+numBits > bits_used.";
898  InvalidParameter ip(ss.str());
899  GNSSTK_THROW(ip);
900  }
901 
902  uint64_t out = (uint64_t) value;
903  out /= scale;
904 
905  uint64_t test = pow(static_cast<double>(2),numBits) - 1;
906  if ( out > test )
907  {
908  InvalidParameter exc("Scaled value too large for specifed bit length");
909  GNSSTK_THROW(exc);
910  }
911 
912  size_t ndx = startBit;
913  uint64_t mask = 0x0000000000000001L;
914 
915  mask <<= (numBits-1);
916  for (int i=0; i<numBits; i++)
917  {
918  bits[ndx] = false;
919  if (out & mask)
920  {
921  bits[ndx] = true;
922  }
923  mask >>= 1;
924  ndx++;
925  }
926  }
927 
928 
929  //--------------------------------------------------------------------------
930  // Method allows one to "back up" and re-add bits w/o resizing
931  // the bits array.
932  void PackedNavBits::reset_num_bits(const int new_bits_used)
933  {
934  bits_used = new_bits_used;
935  }
936 
937  //--------------------------------------------------------------------------
939  {
940  bits.resize(bits_used);
941  }
942 
943  //--------------------------------------------------------------------------
944  int64_t PackedNavBits::SignExtend( const int startBit, const int numBits) const
945  {
946  union
947  {
948  uint64_t u;
949  int64_t s;
950  };
951  u = asUint64_t( startBit, numBits);
952  s <<= 64 - numBits; // Move sign bit to msb.
953  s >>= 64- numBits; // Shift result back to correct location sign bit extended.
954  return (s);
955  }
956 
957  double PackedNavBits::ScaleValue( const double value, const int power2) const
958  {
959  double temp = value;
960  temp /= pow(static_cast<double>(2), power2);
961  if (temp >= 0) temp += 0.5; // Takes care of rounding
962  else temp -= 0.5;
963  return ( temp );
964  }
965 
966  void PackedNavBits::dump(ostream& s) const
967  noexcept
968  {
969  ios::fmtflags oldFlags = s.flags();
970 
971  s.setf(ios::fixed, ios::floatfield);
972  s.setf(ios::right, ios::adjustfield);
973  s.setf(ios::uppercase);
974  s.precision(0);
975  s.fill(' ');
976 
977  s << "****************************************************************"
978  << "************" << endl
979  << "Packed Nav Bits" << endl
980  << endl
981  << "SatID: " << getsatSys() << endl
982  << endl
983  << "Carrier: " << ObsID::cbDesc[obsID.band] << " "
984  << "Code: " << ObsID::tcDesc[obsID.code]
985  << "NavID: " << navID << endl;
986  if (rxID.size()>0)
987  s << " RxID: " << rxID << endl;
988  s << endl
989  << "Number Of Bits: " << dec << getNumBits() << endl
990  << endl;
991 
992  s << " Week(10bt) SOW UTD SOD"
993  << " MM/DD/YYYY HH:MM:SS\n";
994  s << " Xmit Time: ";
995 
996  s << printTime( transmitTime, "%4F(%4G) %6.0g %3j %5.0s %02m/%02d/%04Y %02H:%02M:%02S");
997  s << endl;
998 
999  s << endl << "Packed Bits, Left Justified, 32 Bits Long:\n";
1000  int numBitInWord = 0;
1001  int word_count = 0;
1002  uint32_t word = 0;
1003  for(size_t i = 0; i < bits.size(); ++i)
1004  {
1005  word <<= 1;
1006  if (bits[i]) word++;
1007 
1008  numBitInWord++;
1009  if (numBitInWord >= 32)
1010  {
1011  s << " 0x" << setw(8) << setfill('0') << hex << word << dec << setfill(' ');
1012  numBitInWord = 0;
1013  word_count++;
1014  //Print four words per line
1015  if (word_count %5 == 0) s << endl;
1016  }
1017  }
1018  word <<= 32 - numBitInWord;
1019  if (numBitInWord > 0 ) s << " 0x" << setw(8) << setfill('0') << hex << word << dec << setfill(' ');
1020  s.setf(ios::fixed, ios::floatfield);
1021  s.precision(3);
1022  s.flags(oldFlags); // Reset whatever conditions pertained on entry
1023 
1024  } // end of PackedNavBits::dump()
1025 
1026  /*
1027  */
1028  int PackedNavBits::outputPackedBits(std::ostream& s,
1029  const short numPerLine,
1030  const char delimiter,
1031  const short numBitsPerWord ) const
1032  {
1033  ios::fmtflags oldFlags = s.flags();
1034 
1035  s.setf(ios::uppercase);
1036  int rollover = numPerLine;
1037 
1038  int numBitInWord = 0;
1039  int bit_count = 0;
1040  int word_count = 0;
1041  uint32_t word = 0;
1042  for(size_t i = 0; i < bits.size(); ++i)
1043  {
1044  word <<= 1;
1045  if (bits[i]) word++;
1046 
1047  numBitInWord++;
1048  if (numBitInWord >= numBitsPerWord)
1049  {
1050  s << delimiter << " 0x" << setw(8) << setfill('0') << hex << word << dec << setfill(' ');
1051  word = 0;
1052  numBitInWord = 0;
1053  word_count++;
1054 
1055  //Print "numPerLine" words per line,
1056  //but ONLY if there are more bits left to put on the next line.
1057  if (word_count>0 &&
1058  word_count % rollover == 0 &&
1059  (i+1) < bits.size()) s << endl;
1060  }
1061  }
1062  // Need to check if there is a partial word in the buffer
1063  word <<= 32 - numBitInWord;
1064  if (numBitInWord>0)
1065  {
1066  s << delimiter << " 0x" << setw(8) << setfill('0') << hex << word << dec << setfill(' ');
1067  }
1068  s.flags(oldFlags); // Reset whatever conditions pertained on entry
1069  return(bits.size());
1070  }
1071 
1072  bool PackedNavBits::operator==(const PackedNavBits& right) const
1073  {
1074  // NOTE: Defaults for match are that all metadata
1075  // and all bits must match.
1076  return match(right);
1077  }
1078 
1080  const short startBit,
1081  const short endBit,
1082  const unsigned flagBits) const
1083  {
1084  if (!matchMetaData(right,flagBits)) return false;
1085  if (!matchBits(right,startBit,endBit)) return false;
1086  return true;
1087  }
1088 
1090  const unsigned flagBits) const
1091  {
1092  // If not the same time, return false;
1093  // Given BDS is at 0.1 s, it was necessary to implement
1094  // an epsilon test to avoid problems.
1095  if (flagBits & mmTIME)
1096  {
1097  double diffSec = right.transmitTime-transmitTime;
1098  diffSec = fabs(diffSec);
1099  if (diffSec>0.001) return false;
1100  }
1101 
1102  // If not the same satellite, return false.
1103  if ((flagBits & mmSAT) && satSys!=right.satSys) return false;
1104 
1105  // If not the same observation types (carrier, code) return false.
1106  if ((flagBits & mmOBS) && obsID!=right.obsID) return false;
1107 
1108  // If not the same receiver return false.
1109  if ((flagBits & mmRX) && rxID.compare(right.rxID)!=0) return false;
1110 
1111  if ((flagBits & mmNAV) && navID.navType!=(right.navID.navType)) return false;
1112 
1113  return true;
1114  }
1115 
1117  const short startBitA,
1118  const short endBitA) const
1119  {
1120  // If the two objects don't have the same number of bits,
1121  // don't even try to compare them.
1122  if (bits.size()!=right.bits.size()) return false;
1123 
1124  short startBit = startBitA;
1125  short endBit = endBitA;
1126  // Check for nonsense arguments
1127  if (endBit==-1 ||
1128  endBit>=int(bits.size())) endBit = bits.size()-1;
1129  if (startBit<0) startBit=0;
1130  if (startBit>=int(bits.size())) startBit = bits.size()-1;
1131 
1132  for (int i=startBit;i<=endBit;i++)
1133  {
1134  if (bits[i]!=right.bits[i])
1135  {
1136  return false;
1137  }
1138  }
1139  return true;
1140  }
1141 
1142  void PackedNavBits::rawBitInput(const std::string inString )
1143  {
1144  // Debug
1145  // Find first non-white space string.
1146  // Should translate as a decimal value.
1147  // If so, assume this is the number of bits that follow, but do not
1148  // store it until success.
1149  // For out purposes, treat space, tab, and comma as white space
1150  // (the inclusion of comma allows CSV files to be read).
1151  string whiteSpace=" \t,";
1152  string::size_type begin = inString.find_first_not_of(whiteSpace);
1153  if (begin==string::npos)
1154  {
1155  InvalidParameter exc("Did not find #bits at beginning of input string.");
1156  GNSSTK_THROW(exc);
1157  }
1158  string::size_type end = inString.find_first_of(whiteSpace,begin);
1159  if (end==string::npos)
1160  {
1161  InvalidParameter exc("Did not find space after #bits at beginning of input string.");
1162  GNSSTK_THROW(exc);
1163  }
1164  string textBitCount = inString.substr(begin,end);
1165  int bitsExpected = StringUtils::asInt(textBitCount);
1166 
1167  // Find successive 32 bits quantities stored as hex strings.
1168  // That is to say, each should be of the format 0xAAAAAAAA
1169  // There should be sufficient to cover the number of input
1170  // bits plus padding to the next even 32 bit word boundary.
1171  // That is to say, []# of 32 bits words] = ((inBits-1)/32) + 1;
1172  int numWordsExpected = (( bitsExpected-1)/32) + 1;
1173  int bitsRead = 0;
1174  // debug
1175  //cout << "bitsExpected, numWordsExpected : " << bitsExpected << ", " << numWordsExpected << endl;
1176  for (int i = 0; i<numWordsExpected; ++i)
1177  {
1178  // For each word, convert the string to a value, then add it
1179  // to the packed bit storage.
1180  begin = inString.find_first_not_of(whiteSpace,end+1);
1181  if (begin==string::npos)
1182  {
1183  InvalidParameter exc("Did not find expected number of hex words.");
1184  GNSSTK_THROW(exc);
1185  }
1186  end = inString.find_first_of(whiteSpace,begin);
1187  string::size_type length = end - begin;
1188  string hexWord = inString.substr(begin,length);
1189  // Debug
1190  // cout << "hexWord (string) : '" << hexWord << "'" << endl;
1191  if (hexWord.substr(0,2)!="0x" &&
1192  hexWord.substr(0,2)!="0X" )
1193  {
1194  InvalidParameter exc("Expected hex data did not being with '0x'");
1195  GNSSTK_THROW(exc);
1196  }
1197 
1198  unsigned long dataWord = StringUtils::x2uint(hexWord);
1199 
1200  // NOTE: Since the input is always in terms of complete left-
1201  // justified 32-bit words, the "numberBits" argument to
1202  // addUnsignedLong() is always 32. However, we need to keep
1203  // track of how many bits are actually being stored in the
1204  // PackedNavBits object. The only word that is not 32-bits
1205  // "full" is the last word.
1206  int numBitsToAdd = bitsExpected - bitsRead;
1207  if (numBitsToAdd>32) numBitsToAdd = 32;
1208  // Debug
1209  // cout << " dataWord (dec) : " << dataWord << endl;
1210  // cout << " numBitsToAdd : " << numBitsToAdd << endl;
1211  addUnsignedLong( dataWord, 32, 1);
1212 
1213  bitsRead += numBitsToAdd;
1214 
1215  }
1216  // Now trim the string and store the final size.
1217  bits_used = bitsRead;
1218  trimsize();
1219 
1220  return;
1221  }
1222 
1223  ostream& operator<<(ostream& s, const PackedNavBits& pnb)
1224  {
1225  pnb.dump(s);
1226  return s;
1227 
1228  } // end of operator<<
1229 
1230 
1231 } // namespace
gnsstk::StringUtils::asInt
long asInt(const std::string &s)
Definition: StringUtils.hpp:713
gnsstk::PackedNavBits::addDataVec
void addDataVec(const std::vector< uint8_t > &data, unsigned numBits)
Definition: PackedNavBits.cpp:740
gnsstk::PackedNavBits::obsID
ObsID obsID
Definition: PackedNavBits.hpp:632
gnsstk::PackedNavBits::setRxID
void setRxID(const std::string rxString)
Definition: PackedNavBits.cpp:197
gnsstk::PackedNavBits::getNavID
NavID getNavID() const
Definition: PackedNavBits.cpp:225
gnsstk::PackedNavBits::match
bool match(const PackedNavBits &right, const short startBit=0, const short endBit=-1, const unsigned flagBits=mmALL) const
Definition: PackedNavBits.cpp:1079
gnsstk::PackedNavBits::transmitTime
CommonTime transmitTime
Definition: PackedNavBits.hpp:635
gnsstk::PackedNavBits::addUnsignedDouble
void addUnsignedDouble(const double value, const int numBits, const int power2)
Definition: PackedNavBits.cpp:648
gnsstk::PackedNavBits::addDoubleSemiCircles
void addDoubleSemiCircles(const double radians, const int numBits, const int power2)
Definition: PackedNavBits.cpp:680
gnsstk::PackedNavBits::reset_num_bits
void reset_num_bits(const int new_bits_used=0)
Definition: PackedNavBits.cpp:932
gnsstk::StringUtils::word
std::string word(const std::string &s, const std::string::size_type wordNum=0, const char delimiter=' ')
Definition: StringUtils.hpp:1112
gnsstk::PackedNavBits::asUnsignedDouble
double asUnsignedDouble(const int startBit, const int numBits, const int power2) const
Definition: PackedNavBits.cpp:282
gnsstk::PackedNavBits::addPackedNavBits
void addPackedNavBits(const PackedNavBits &pnb)
Definition: PackedNavBits.cpp:771
gnsstk::BEGINNING_OF_TIME
const Epoch BEGINNING_OF_TIME(CommonTime::BEGINNING_OF_TIME)
Earliest representable Epoch.
gnsstk::PackedNavBits::navID
NavID navID
Definition: PackedNavBits.hpp:633
gnsstk::PackedNavBits::asUnsignedLong
unsigned long asUnsignedLong(const int startBit, const int numBits, const int scale) const
Definition: PackedNavBits.cpp:265
gnsstk::PackedNavBits::matchMetaData
bool matchMetaData(const PackedNavBits &right, const unsigned flagBits=mmALL) const
Definition: PackedNavBits.cpp:1089
gnsstk::PackedNavBits::invert
void invert()
Definition: PackedNavBits.cpp:841
gnsstk::PackedNavBits::asSignedDouble
double asSignedDouble(const int startBit, const int numBits, const int power2) const
Definition: PackedNavBits.cpp:293
gnsstk::PackedNavBits::getTransmitTime
CommonTime getTransmitTime() const
Definition: PackedNavBits.cpp:235
gnsstk::PackedNavBits::mmNAV
static const unsigned int mmNAV
Definition: PackedNavBits.hpp:491
gnsstk::PackedNavBits::setTime
void setTime(const CommonTime &transmitTimeArg)
Definition: PackedNavBits.cpp:203
gnsstk::PackedNavBits::asDoubleSemiCircles
double asDoubleSemiCircles(const int startBit, const int numBits, const int power2) const
Definition: PackedNavBits.cpp:304
gnsstk::SatID
Definition: SatID.hpp:89
gnsstk::PackedNavBits::asSignMagLong
long asSignMagLong(const int startBit, const int numBits, const int scale) const
Definition: PackedNavBits.cpp:313
gnsstk::ObsID::tcDesc
static GNSSTK_EXPORT std::map< TrackingCode, std::string > tcDesc
These strings are for forming a somewhat verbose description.
Definition: ObsID.hpp:216
gnsstk::PackedNavBits::rawBitInput
void rawBitInput(const std::string inString)
Definition: PackedNavBits.cpp:1142
gnsstk::CommonTime::setTimeSystem
CommonTime & setTimeSystem(TimeSystem timeSystem)
Definition: CommonTime.hpp:195
gnsstk::PI
const double PI
GPS value of PI; also specified by GAL.
Definition: GNSSconstants.hpp:62
GNSSconstants.hpp
gnsstk::PackedNavBits::parityStatus
ParityStatus parityStatus
Definition: PackedNavBits.hpp:628
gnsstk::PackedNavBits::addLong
void addLong(const long value, const int numBits, const int scale)
Definition: PackedNavBits.cpp:629
gnsstk::PackedNavBits::operator<
bool operator<(const PackedNavBits &right) const
Definition: PackedNavBits.cpp:813
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::PackedNavBits::xMitCoerced
bool xMitCoerced
Definition: PackedNavBits.hpp:639
gnsstk::PackedNavBits::mmOBS
static const unsigned int mmOBS
Definition: PackedNavBits.hpp:489
gnsstk::StringUtils::x2uint
unsigned int x2uint(const std::string &s)
Definition: StringUtils.hpp:1773
example4.temp
temp
Definition: example4.py:35
gnsstk::PackedNavBits::bits_used
int bits_used
Definition: PackedNavBits.hpp:637
gnsstk::PackedNavBits::mmRX
static const unsigned int mmRX
Definition: PackedNavBits.hpp:490
gnsstk::PackedNavBits::setSatID
void setSatID(const SatID &satSysArg)
Definition: PackedNavBits.cpp:179
gnsstk::PackedNavBits::addUint64_t
void addUint64_t(const uint64_t value, const int numBits)
Definition: PackedNavBits.cpp:783
gnsstk::PackedNavBits::mmTIME
static const unsigned int mmTIME
Definition: PackedNavBits.hpp:487
gnsstk::PackedNavBits::setObsID
void setObsID(const ObsID &obsIDArg)
Definition: PackedNavBits.cpp:185
gnsstk::PackedNavBits::bits
std::vector< bool > bits
Definition: PackedNavBits.hpp:636
gnsstk::PackedNavBits::operator==
bool operator==(const PackedNavBits &right) const
Definition: PackedNavBits.cpp:1072
gnsstk::PackedNavBits::insertUnsignedLong
void insertUnsignedLong(const unsigned long value, const int startBit, const int numBits, const int scale=1)
Definition: PackedNavBits.cpp:889
gnsstk::PackedNavBits::asSignMagDouble
double asSignMagDouble(const int startBit, const int numBits, const int power2) const
Definition: PackedNavBits.cpp:331
gnsstk::PackedNavBits::asLong
long asLong(const int startBit, const int numBits, const int scale) const
Definition: PackedNavBits.cpp:275
gnsstk::PackedNavBits::trimsize
void trimsize()
Definition: PackedNavBits.cpp:938
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::PackedNavBits::setNavID
void setNavID(const NavID &navIDArg)
Definition: PackedNavBits.cpp:191
gnsstk::operator<<
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
Definition: ObsEpochMap.cpp:54
gnsstk::PackedNavBits::SignExtend
int64_t SignExtend(const int startBit, const int numBits) const
Definition: PackedNavBits.cpp:944
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::PackedNavBits::clearBits
void clearBits()
Definition: PackedNavBits.cpp:209
gnsstk::PackedNavBits::asBool
bool asBool(const unsigned bitNum) const
Definition: PackedNavBits.cpp:606
gnsstk::PackedNavBits::matchBits
bool matchBits(const PackedNavBits &right, const short startBit=0, const short endBit=-1) const
Definition: PackedNavBits.cpp:1116
example6.valid
valid
Definition: example6.py:20
gnsstk::PackedNavBits::asSignMagDoubleSemiCircles
double asSignMagDoubleSemiCircles(const int startBit, const int numBits, const int power2) const
Definition: PackedNavBits.cpp:349
gnsstk::PackedNavBits::rxID
std::string rxID
Definition: PackedNavBits.hpp:634
gnsstk::PackedNavBits::addString
void addString(const std::string String, const int numChars)
Definition: PackedNavBits.cpp:699
gnsstk::PackedNavBits::copyBits
void copyBits(const PackedNavBits &src, const short startBit=0, const short endBit=-1)
Definition: PackedNavBits.cpp:864
gnsstk::PackedNavBits::dump
void dump(std::ostream &s=std::cout) const noexcept
Definition: PackedNavBits.cpp:966
gnsstk::NavID::navType
NavType navType
navType for this satellite
Definition: NavID.hpp:112
example3.data
data
Definition: example3.py:22
gnsstk::PackedNavBits::outputPackedBits
int outputPackedBits(std::ostream &s=std::cout, const short numPerLine=4, const char delimiter=' ', const short numBitsPerWord=32) const
Definition: PackedNavBits.cpp:1028
gnsstk::PackedNavBits::clone
PackedNavBits * clone() const
Definition: PackedNavBits.cpp:174
PackedNavBits.hpp
GPSWeekSecond.hpp
gnsstk::printTime
std::string printTime(const CommonTime &t, const std::string &fmt)
Definition: TimeString.cpp:64
gnsstk::PackedNavBits::addSignedDouble
void addSignedDouble(const double value, const int numBits, const int power2)
Definition: PackedNavBits.cpp:662
gnsstk::PackedNavBits::satSys
SatID satSys
Definition: PackedNavBits.hpp:631
gnsstk::TimeSystem::GPS
@ GPS
GPS system time.
gnsstk::PackedNavBits::asString
std::string asString(const int startBit, const int numChars) const
Definition: PackedNavBits.cpp:358
std
Definition: Angle.hpp:142
gnsstk::PackedNavBits::getobsID
ObsID getobsID() const
Definition: PackedNavBits.cpp:215
GNSSTK_THROW
#define GNSSTK_THROW(exc)
Definition: Exception.hpp:366
gnsstk::PackedNavBits::mmSAT
static const unsigned int mmSAT
Definition: PackedNavBits.hpp:488
gnsstk::PackedNavBits::addUnsignedLong
void addUnsignedLong(const unsigned long value, const int numBits, const int scale)
Definition: PackedNavBits.cpp:613
gnsstk::PackedNavBits
Definition: PackedNavBits.hpp:70
gnsstk::ObsID::cbDesc
static GNSSTK_EXPORT std::map< CarrierBand, std::string > cbDesc
Definition: ObsID.hpp:217
gnsstk::NavID
Definition: NavID.hpp:61
gnsstk::PackedNavBits::asUint64_t
uint64_t asUint64_t(const int startBit, const int numBits) const
Definition: PackedNavBits.cpp:246
gnsstk::PackedNavBits::getRxID
std::string getRxID() const
Definition: PackedNavBits.cpp:230
gnsstk::PackedNavBits::getsatSys
SatID getsatSys() const
Definition: PackedNavBits.cpp:220
gnsstk::PackedNavBits::PackedNavBits
PackedNavBits()
empty constructor
Definition: PackedNavBits.cpp:57
gnsstk::PackedNavBits::ScaleValue
double ScaleValue(const double value, const int power2) const
Definition: PackedNavBits.cpp:957
TimeString.hpp
gnsstk::PackedNavBits::getNumBits
size_t getNumBits() const
Definition: PackedNavBits.cpp:240


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40