Changeset 9474 in ntrip for branches/BNC_2.12/src/bncantex.cpp


Ignore:
Timestamp:
Jul 13, 2021, 10:59:04 PM (3 years ago)
Author:
stuerze
Message:

satellite antenna phase center correction is added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/bncantex.cpp

    r8631 r9474  
    196196      }
    197197
    198      // End of Frequency
     198      // End of Frequency
    199199      // ----------------
    200200      else if (line.indexOf("END OF FREQUENCY") == 60) {
     
    351351
    352352  return failure;
     353}
     354
     355//
     356////////////////////////////////////////////////////////////////////////////
     357double bncAntex::satCorr(const QString& prn, t_frequency::type frqType,
     358                         double elTx, double azTx, bool& found) const {
     359
     360  if (_maps.find(prn.mid(0,3)) == _maps.end()) {
     361    found = false;
     362    return 0.0;
     363  };
     364
     365  t_antMap* map = _maps[prn.mid(0,3)];
     366
     367  if (map->frqMap.find(frqType) == map->frqMap.end()) {
     368    found = false;
     369    return 0.0;
     370  };
     371
     372  t_frqMap* frqMap = map->frqMap[frqType];
     373
     374  double var = 0.0;
     375  if (frqMap->pattern.ncols() > 0) {
     376    double zenDiff = 999.999;
     377    double zenTx  = 90.0 - elTx * 180.0 / M_PI;
     378    unsigned iZen = 0;
     379    for (double zen = map->zen1; zen <= map->zen2; zen += map->dZen) {
     380      iZen += 1;
     381      double newZenDiff = fabs(zen - zenTx);
     382      if (newZenDiff < zenDiff) {
     383        zenDiff = newZenDiff;
     384        var = frqMap->pattern(iZen);
     385      }
     386    }
     387  }
     388
     389  found = true;
     390  return var - frqMap->neu[0] * cos(azTx)*cos(elTx)
     391             - frqMap->neu[1] * sin(azTx)*cos(elTx)
     392             - frqMap->neu[2] * sin(elTx);
     393
    353394}
    354395
Note: See TracChangeset for help on using the changeset viewer.