Changeset 7251 in ntrip


Ignore:
Timestamp:
Aug 24, 2015, 5:56:41 PM (9 years ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src
Files:
3 edited

Legend:

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

    r7244 r7251  
    411411// Rectangular Coordinates -> Geocentric Coordinates
    412412////////////////////////////////////////////////////////////////////////////
    413 void xyz2geoc(const double* XYZ, double* Geoc) {
     413t_irc xyz2geoc(const double* XYZ, double* Geoc) {
    414414
    415415  const double bell = t_CST::aell*(1.0-1.0/t_CST::fInv) ;
    416416  const double e2   = (t_CST::aell*t_CST::aell-bell*bell)/(t_CST::aell*t_CST::aell) ;
    417 
    418417  double Ell[3];
    419   xyz2ell(XYZ, Ell);
    420 
     418  if (xyz2ell(XYZ, Ell) != success) {
     419    return failure;
     420  }
    421421  double rho = sqrt(XYZ[0]*XYZ[0]+XYZ[1]*XYZ[1]+XYZ[2]*XYZ[2]);
    422422  double Rn = t_CST::aell/sqrt(1-(e2)*pow(sin(Ell[0]),2));
     
    425425  Geoc[1] = Ell[1];
    426426  Geoc[2] = rho-t_CST::rgeoc;
     427
     428  return success;
    427429}
    428430
  • trunk/BNC/src/bncutils.h

    r7245 r7251  
    7474t_irc        xyz2ell(const double* XYZ, double* Ell);
    7575
    76 void         xyz2geoc(const double* XYZ, double* Geoc);
     76t_irc        xyz2geoc(const double* XYZ, double* Geoc);
    7777
    7878void         xyz2neu(const double* Ell, const double* xyz, double* neu);
  • trunk/BNC/src/pppModel.cpp

    r7246 r7251  
    397397  // Latitude, longitude, height are defined with respect to a spherical earth model
    398398  // -------------------------------------------------------------------------------
    399   ColumnVector geocSta;
    400   xyz2geoc(xyzSta.data(), geocSta.data());
     399  ColumnVector geocSta(3);
     400  if (xyz2geoc(xyzSta.data(), geocSta.data()) != success) {
     401    return 0.0;
     402  }
    401403
    402404  // satellite position rotated to the epoch of signal reception
    403405  // -----------------------------------------------------------
    404   ColumnVector xyzSat;
     406  ColumnVector xyzSat(3);
    405407  double omegaZ = t_CST::omega * signalPropagationTime;
    406408  xyzSat[0] = rSat[0] * cos(omegaZ) + rSat[1] * sin(omegaZ);
Note: See TracChangeset for help on using the changeset viewer.