示例#1
0
文件: ObsID.cpp 项目: JC5005/GPSTk
   // This is used to register a new ObsID & Rinex 3 identifier.  The syntax for the
   // Rinex 3 identifier is the same as for the ObsID constructor. 
   // If there are spaces in the provided identifier, they are ignored
   ObsID ObsID::newID(const std::string& strID, const std::string& desc)
      throw(InvalidParameter)
   {
      if (char2ot.count(strID[0]) && 
          char2cb.count(strID[1]) && 
          char2tc.count(strID[2]))
          GPSTK_THROW(InvalidParameter("Identifier " + strID + " already defined."));

      return idCreator(strID, desc);
   }
示例#2
0
pardisoMatrix DDGMatrices::id2( meshMetaInfo & aMesh )
{
	pardisoMatrix id;
	id.initMatrix(idCreator(), aMesh.getBasicMesh().getFaces().size());
	return id;
}
示例#3
0
pardisoMatrix DDGMatrices::id1( meshMetaInfo & aMesh )
{
	pardisoMatrix id;
	id.initMatrix(idCreator(), aMesh.getHalfedges()->size());
	return id;
}
示例#4
0
文件: ObsID.cpp 项目: JC5005/GPSTk
   // Construct this object from the string specifier
   ObsID::ObsID(const std::string& strID) throw(InvalidParameter)
   {
      int i = strID.length() - 3;
      if ( i < 0 || i > 1)
      {
         InvalidParameter e("identifier must be 3 or 4 characters long");
         GPSTK_THROW(e);
      }

      char sys = i ? strID[0] : 'G';
      char ot = strID[i];
      char cb = strID[i+1];
      char tc = strID[i+2];
      
      if (!char2ot.count(ot) || !char2cb.count(cb) || !char2tc.count(tc))
         idCreator(strID.substr(i,3));

      type = char2ot[ ot ];
      band = char2cb[ cb ];
      code = char2tc[ tc ];

      /// This next block takes care of fixing up the codes that are reused
      /// between the various signals
      if (sys == 'G') // GPS
      {
         if (tc=='X' && band==cbL5)
            code = tcIQ5;
      }
      if (sys == 'E') // Galileo
      {
         switch (code)
         {
            case tcCA: code = tcC; break;
            case tcI5: code = tcIE5; break;
            case tcQ5: code = tcQE5; break;
            default: break;
         }
         if (tc == 'X')
         {
            if (band == cbL1 || band == cbE6)
               code = tcBC;
            else if (band == cbL5 || band == cbE5b || band == cbE5ab)
               code = tcIQE5;
         }
      }
      else if (sys == 'R') // Glonass
      {
         switch (code)
         {
            case tcCA: code = tcGCA; break;
            case tcP: code = tcGP; break;
            case tcI5: code = tcIR3; break;
            case tcQ5: code = tcQR3; break;
            case tcC2LM: code = tcIQR3; break;
            default: break;
         }
         switch (band)
         {
            case cbL1: band = cbG1; break;
            case cbL2: band = cbG2; break;
            default: break;
         }
      }
      else if (sys == 'S') // SBAS or Geosync
      {
         switch (code)
         {
            case tcCA: code = tcSCA; break;     // 'C'
            case tcI5: code = tcSI5; break;     // 'I'
            case tcQ5: code = tcSQ5; break;     // 'Q'
            case tcC2LM: code = tcSIQ5; break;  // 'X'
            default: break;
         }
      }
      else if (sys == 'J') // QZSS
      {
         if(band == cbL1) switch (code)
         {
            case tcCA: code = tcJCA; break;     // 'C'
            case tcC2M: code = tcJD1; break;    // 'S'
            case tcC2L: code = tcJP1; break;    // 'L'
            case tcC2LM: code = tcJX1; break;   // 'X'
            case tcABC: code = tcJZ1; break;    // 'Z'
            default: break;
         }
         if(band == cbL2) switch (code)
         {
            case tcC2M: code = tcJM2; break;    // 'S'
            case tcC2L: code = tcJL2; break;    // 'L'
            case tcC2LM: code = tcJX2; break;   // 'X'
            default: break;
         }
         if(band == cbL5) switch (code)
         {
            case tcI5: code = tcJI5; break;     // 'I'
            case tcQ5: code = tcJQ5; break;     // 'Q'
            case tcC2LM: code = tcJIQ5; break;  // 'X'
            default: break;
         }
         if(band == cbE6) switch (code)
         {
            case tcC2M: code = tcJI6; break;    // 'S'
            case tcC2L: code = tcJQ6; break;    // 'L'
            case tcC2LM: code = tcJIQ6; break;  // 'X'
            default: break;
         }
      }
      else if (sys == 'C') // BeiDou
      {
         if(band == cbL1) band = cbB1;
         if(band == cbE6) band = cbB3;

         if(band == cbB1) {
            switch (code)
            {
               case tcI5: code = tcCI1; break;     // 'I'
               case tcQ5: code = tcCQ1; break;     // 'Q'
               case tcC2LM: code = tcCIQ1; break;  // 'X'
               default: break;
            }
         }
         if(band == cbB3) switch (code)
         {
            case tcI5: code = tcCI7; break;     // 'I'
            case tcQ5: code = tcCQ7; break;     // 'Q'
            case tcC2LM: code = tcCIQ7; break;  // 'X'
            default: break;
         }
         if(band == cbE5b) {
            switch (code)
            {
               case tcI5: code = tcCI6; break;     // 'I'
               case tcQ5: code = tcCQ6; break;     // 'Q'
               case tcC2LM: code = tcCIQ6; break;  // 'X'
            default: break;
            }
         }
      } // end of checking which GNSS system this obs is for
   }