Changeset 2894 in ntrip for trunk/BNC/bncantex.cpp


Ignore:
Timestamp:
Jan 26, 2011, 4:55:35 PM (13 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncantex.cpp

    r2891 r2894  
    6161}
    6262
    63 //
     63// Print
    6464////////////////////////////////////////////////////////////////////////////
    6565void bncAntex::print() const {
     
    8686}
    8787
    88 //
     88// Read ANTEX File
    8989////////////////////////////////////////////////////////////////////////////
    9090t_irc bncAntex::readFile(const QString& fileName) {
     
    182182          QTextStream inLine(&line, QIODevice::ReadOnly);
    183183          inLine >> newFrqMap->neu[0] >> newFrqMap->neu[1] >> newFrqMap->neu[2];
     184          newFrqMap->neu[0] *= 1e-3;
     185          newFrqMap->neu[1] *= 1e-3;
     186          newFrqMap->neu[2] *= 1e-3;
    184187        }
    185188        else if (line.indexOf("NOAZI") == 3) {
     
    192195            inLine >> newFrqMap->pattern[ii];
    193196          }
     197          newFrqMap->pattern *= 1e-3;
    194198        }
    195199      }
     
    199203  return success;
    200204}
     205
     206// Phase Center Offset (Receiver Antenna and GPS only)
     207////////////////////////////////////////////////////////////////////////////
     208double bncAntex::pco(const QString& antName, double eleSat) {
     209
     210  static const double f1 = t_CST::freq1;
     211  static const double f2 = t_CST::freq2;
     212  static const double c1 =   f1 * f1 / (f1 * f1 - f2 * f2);
     213  static const double c2 = - f2 * f2 / (f1 * f1 - f2 * f2);
     214
     215  QMap<QString, t_antMap*>::const_iterator it = _maps.find(antName);
     216  if (it != _maps.end()) {
     217    t_antMap* map = it.value();
     218    if (map->frqMapL1 && map->frqMapL2) {
     219      double corr1 = -map->frqMapL1->neu[2] * sin(eleSat);
     220      double corr2 = -map->frqMapL2->neu[2] * sin(eleSat);
     221      return c1 * corr1 + c2 * corr2;
     222    }
     223  }
     224
     225  return 0.0;
     226}
Note: See TracChangeset for help on using the changeset viewer.