Changeset 2064 in ntrip


Ignore:
Timestamp:
Dec 1, 2009, 2:10:01 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r2063 r2064  
    8787  _params.push_back(new bncParam(bncParam::CRD_Z));
    8888  _params.push_back(new bncParam(bncParam::RECCLK));
     89  _ellBanc.ReSize(3);
    8990}
    9091
     
    140141  }
    141142
    142   // Set Station Height
    143   // ------------------
    144   ColumnVector ell(3);
    145   xyz2ell(_xcBanc.data(), ell.data());
    146   _height = ell(3);
    147 
    148   cout << "height = " << _height << endl;
     143  // Ellipsoidal Coordinates
     144  // ------------------------
     145  xyz2ell(_xcBanc.data(), _ellBanc.data());
     146
     147  // Compute Satellite Elevations
     148  // ----------------------------
     149  QMutableMapIterator<QString, t_satData*> it2(epoData->satData);
     150  while (it2.hasNext()) {
     151    it2.next();
     152    QString    prn     = it2.key();
     153    t_satData* satData = it2.value();
     154
     155    ColumnVector dx = satData->xx - _xcBanc.Rows(1,3);
     156    double       rho = dx.norm_Frobenius();
     157
     158    double neu[3];
     159    xyz2neu(_ellBanc.data(), dx.data(), neu);
     160
     161    satData->eleSat = acos( sqrt(neu[0]*neu[0] + neu[1]*neu[1]) / rho );
     162    if (neu[2] < 0) {
     163      satData->eleSat *= -1.0;
     164    }
     165    satData->azSat  = atan2(neu[1], neu[0]);
     166  }
    149167
    150168  return success;
     
    176194double bncModel::delay_saast() {
    177195
     196  double height = _ellBanc(3);
    178197  double Ele = M_PI/2.0;
    179198
    180   double pp =  1013.25 * pow(1.0 - 2.26e-5 * _height, 5.225);
    181   double TT =  18.0 - _height * 0.0065 + 273.15;
    182   double hh =  50.0 * exp(-6.396e-4 * _height);
     199  double pp =  1013.25 * pow(1.0 - 2.26e-5 * height, 5.225);
     200  double TT =  18.0 - height * 0.0065 + 273.15;
     201  double hh =  50.0 * exp(-6.396e-4 * height);
    183202  double ee =  hh / 100.0 * exp(-37.2465 + 0.213166*TT - 0.000256908*TT*TT);
    184203
    185   double h_km = _height / 1000.0;
     204  double h_km = height / 1000.0;
    186205 
    187206  if (h_km < 0.0) h_km = 0.0;
  • trunk/BNC/bncmodel.h

    r2063 r2064  
    6464  ColumnVector     _xx;
    6565  ColumnVector     _xcBanc;
    66   double           _height;
     66  ColumnVector     _ellBanc;
    6767};
    6868
Note: See TracChangeset for help on using the changeset viewer.