Changeset 9481 in ntrip for trunk/BNC/src/bncantex.cpp


Ignore:
Timestamp:
Jul 19, 2021, 10:46:16 PM (13 months ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncantex.cpp

    r8630 r9481  
    321321    frqType = t_frequency::R1;
    322322  }
     323  else if (prn[0] == 'E') {
     324    frqType = t_frequency::E1;
     325  }
     326  else if (prn[0] == 'C') {
     327    frqType = t_frequency::C2;
     328  }
     329  else if (prn[0] == 'S') {
     330    frqType = t_frequency::S1;
     331  }
     332  else if (prn[0] == 'J') {
     333    frqType = t_frequency::J1;
     334  }
     335  else if (prn[0] == 'I') {
     336    frqType = t_frequency::I5;
     337  }
    323338
    324339  QMap<QString, t_antMap*>::const_iterator it = _maps.find(prn.mid(0,3));
     
    351366
    352367  return failure;
     368}
     369
     370//
     371////////////////////////////////////////////////////////////////////////////
     372double bncAntex::satCorr(const QString& prn, t_frequency::type frqType,
     373                         double elTx, double azTx, bool& found) const {
     374
     375  if (_maps.find(prn.mid(0,3)) == _maps.end()) {
     376    found = false;
     377    return 0.0;
     378  };
     379
     380  t_antMap* map = _maps[prn.mid(0,3)];
     381
     382  if (map->frqMap.find(frqType) == map->frqMap.end()) {
     383    found = false;
     384    return 0.0;
     385  };
     386
     387  t_frqMap* frqMap = map->frqMap[frqType];
     388
     389  double var = 0.0;
     390  if (frqMap->pattern.ncols() > 0) {
     391    double zenDiff = 999.999;
     392    double zenTx  = 90.0 - elTx * 180.0 / M_PI;
     393    unsigned iZen = 0;
     394    for (double zen = map->zen1; zen <= map->zen2; zen += map->dZen) {
     395      iZen += 1;
     396      double newZenDiff = fabs(zen - zenTx);
     397      if (newZenDiff < zenDiff) {
     398        zenDiff = newZenDiff;
     399        var = frqMap->pattern(iZen);
     400      }
     401    }
     402  }
     403
     404  found = true;
     405  return var - frqMap->neu[0] * cos(azTx)*cos(elTx)
     406             - frqMap->neu[1] * sin(azTx)*cos(elTx)
     407             - frqMap->neu[2] * sin(elTx);
     408
    353409}
    354410
Note: See TracChangeset for help on using the changeset viewer.