Exemple #1
0
   void processEphemeris( gpstk::EngEphemeris engEph, 
                          gpstk::EphemerisPages ephPages )
   {

         // Construct a BELogEntry and see if it already exists in the 
         // map for the PRN.  If it does, we already stored this one, 
         // move on.  If not, convert the information to Block 109 and 
         // Block 9 and write it out.               
      BELogEntry curBELog( engEph );
      unsigned long key = curBELog.getKey();
      pair<long,BELogEntry> qnode(key,curBELog);

      bool needToOutput = false;
      PrnBELogMap::iterator pmap = prnBEmap.find( engEph.getPRNID() );
            
          // May need to add this PRN to the map.
      if (pmap==prnBEmap.end())
      {
         pair<long,BELogEntry> qnode(key,curBELog);
         BELogMap blm;
         blm.insert(qnode);
         pair<int,BELogMap> pnode( (int) engEph.getPRNID(), blm);
         prnBEmap.insert( pnode );
         needToOutput = true;
      }
      else
      {
         BELogMap& blmr = pmap->second;
         BELogMap::iterator iBLM = blmr.find( key );
         if (iBLM==blmr.end())
         {
            pair<long,BELogEntry> qnode(key,curBELog);
            blmr.insert(qnode);
            needToOutput = true;
         }
         else
         {
            BELogEntry& ble = iBLM->second;
            ble.increment();
         }
      }
      
      if (needToOutput)
      {
         EphemerisPages::const_iterator MDPsf[4];
         MDPsf[1] = ephPages.find(1);
         MDPsf[2] = ephPages.find(2);
         MDPsf[3] = ephPages.find(3);
         FICData109 new109( engEph.getPRNID(),
                            MDPsf[1]->second.subframe,
                            MDPsf[2]->second.subframe,
                            MDPsf[3]->second.subframe );
         FICData9   new9( new109, engEph );
         FICOutput << new109;
         FICOutput << new9;
      }
   }
Exemple #2
0
 void FICData9::firstFiveItems( const short sfNum,
                                const gpstk::FICData109 rawsf,
                                const gpstk::EngEphemeris ee )
 {
    int ndx = 2 + ((sfNum-1) * 10);
    long word01 = rawsf.i[ ndx ];
    long preamble = word01 >> 22;
    f.push_back( (double) preamble );
    f.push_back( (double) ee.getTLMMessage(sfNum) );
    f.push_back( ee.getHOWTime(sfNum) );
    f.push_back( (double) ee.getASAlert(sfNum) );
    f.push_back( (double) sfNum );
 }
Exemple #3
0
 BELogEntry::BELogEntry( const gpstk::EngEphemeris ee )
 {
    HOWSF1 = ee.getTransmitTime();
    Toe = ee.getEpochTime();
    PRN_ID = ee.getPRNID();
    IODC = ee.getIODC();
    count = 1;
    
    long shortweek = (long) ee.getFullWeek();
    shortweek &= 0x0000001F;
    long sixteenSecCount = long (Toe.GPSsow() / 16.0);
    
       // The purpose of the key is to enable placing these objects
       // into SV-specific maps ordered by 
       //    Primary :week
       //    Secondary :SOW
       //    Tertiary: IODC
       // The latter (IODC) is actually only a part of the key so as to
       // enforce uniqueness
    key = shortweek << 26 |
          sixteenSecCount << 10 | IODC;
 }