示例#1
0
   void RinexNavData::reallyGetRecord(FFStream& ffs)
      throw(std::exception, FFStreamError, StringException)
   {
      RinexNavStream& strm = dynamic_cast<RinexNavStream&>(ffs);

         // If the header hasn't been read, read it...
      if(!strm.headerRead)
         strm >> strm.header;

      string line;

      strm.formattedGetLine(line, true);
      getPRNEpoch(line);

      strm.formattedGetLine(line);
      getBroadcastOrbit1(line);

      strm.formattedGetLine(line);
      getBroadcastOrbit2(line);

      strm.formattedGetLine(line);
      getBroadcastOrbit3(line);

      strm.formattedGetLine(line);
      getBroadcastOrbit4(line);

      strm.formattedGetLine(line);
      getBroadcastOrbit5(line);

      strm.formattedGetLine(line);
      getBroadcastOrbit6(line);

      strm.formattedGetLine(line);
      getBroadcastOrbit7(line);
   }
示例#2
0
      /* This function retrieves a RINEX 3 NAV record from the given
       *  FFStream.
       *  If an error is encountered in reading from the stream, the stream
       *  is returned to its original position and its fail-bit is set.
       *  @throws StringException when a StringUtils function fails.
       *  @throws FFStreamError when exceptions(failbit) is set and a read
       *          or formatting error occurs. This also resets the stream
       *          to its pre-read position.
       */
   void Rinex3NavData::reallyGetRecord(FFStream& ffs)
      throw(exception, FFStreamError, StringException)
   {

      try {
         Rinex3NavStream& strm = dynamic_cast<Rinex3NavStream&>(ffs);

         // If the header hasn't been read, read it...
         if(!strm.headerRead) {
            try {
               strm >> strm.header;
            }
            catch(exception& e) {
               FFStreamError fse(string("std::exception reading header ") + e.what());
               GPSTK_THROW(fse);
            }
            catch(FFStreamError& fse) { GPSTK_RETHROW(fse); }
         }

         // get the first line, the epoch line
         getPRNEpoch(strm);

         // get 3 data records
         for(int i=1; i<=3; i++) getRecord(i, strm);

         // SBAS and GLO only have 3 records
         if(satSys == "S" || satSys == "R") return;

         // GPS GAL QZSS BDS have 7 records, get 4-7
         if(satSys == "G" || satSys == "E" || satSys == "J" || satSys == "C")
            for(int i=4; i<=7; i++) getRecord(i, strm);
      }
      catch(exception& e) {
         FFStreamError fse(string("std::exception: ") + e.what());
         GPSTK_THROW(fse);
      }
      catch(FFStreamError& fse) { GPSTK_RETHROW(fse); }
      catch(StringException& se) { GPSTK_RETHROW(se); }

   }  // End of method 'Rinex3NavData::reallyGetRecord(FFStream& ffs)'