Changeset 2894 in ntrip


Ignore:
Timestamp:
Jan 26, 2011, 4:55:35 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
4 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}
  • trunk/BNC/bncantex.h

    r2887 r2894  
    3737  t_irc readFile(const QString& fileName); 
    3838  void print() const;
     39  double pco(const QString& antName, double eleSat);
    3940
    4041 private:
  • trunk/BNC/bncmodel.cpp

    r2893 r2894  
    267267      _antex = 0;
    268268    }
     269    _antennaName = settings.value("pppAntenna").toString();
    269270  }
    270271
     
    386387  }
    387388
    388   return satData->rho + clk() + offset - satData->clk + tropDelay + wind;
     389  double phaseCenter = 0.0;
     390  if (_antex) {
     391    phaseCenter = _antex->pco(_antennaName, satData->eleSat);
     392  }
     393
     394  return satData->rho + phaseCenter + clk()
     395                      + offset - satData->clk + tropDelay + wind;
    389396}
    390397
  • trunk/BNC/bncmodel.h

    r2881 r2894  
    155155  double                _sigClk0;
    156156  bncAntex*             _antex;
     157  QString               _antennaName;
    157158};
    158159
Note: See TracChangeset for help on using the changeset viewer.