Changeset 7251 in ntrip for trunk/BNC/src/bncutils.cpp


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

minor changes

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.