Changeset 7244 in ntrip for trunk/BNC/src
- Timestamp:
- Aug 20, 2015, 1:37:05 PM (9 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncutils.cpp
r7228 r7244 409 409 } 410 410 411 // Rectangular Coordinates -> Geocentric Coordinates 412 //////////////////////////////////////////////////////////////////////////// 413 void xyz2geoc(const double* XYZ, double* Geoc) { 414 415 const double bell = t_CST::aell*(1.0-1.0/t_CST::fInv) ; 416 const double e2 = (t_CST::aell*t_CST::aell-bell*bell)/(t_CST::aell*t_CST::aell) ; 417 418 double Ell[3]; 419 xyz2ell(XYZ, Ell); 420 421 double rho = sqrt(XYZ[0]*XYZ[0]+XYZ[1]*XYZ[1]+XYZ[2]*XYZ[2]); 422 double Rn = t_CST::aell/sqrt(1-(e2)*pow(sin(Ell[0]),2)); 423 424 Geoc[0] = atan((1-e2 * Rn/(Rn + Ell[2])) * tan(Ell[0])); 425 Geoc[1] = Ell[1]; 426 Geoc[2] = rho-t_CST::rgeoc; 427 } 428 411 429 // 412 430 //////////////////////////////////////////////////////////////////////////// -
trunk/BNC/src/bncutils.h
r7053 r7244 73 73 74 74 t_irc xyz2ell(const double* XYZ, double* Ell); 75 76 void xyz2geoc(const double* XYZ, double* Geoc); 75 77 76 78 void xyz2neu(const double* Ell, const double* xyz, double* neu);
Note:
See TracChangeset
for help on using the changeset viewer.