Changeset 11027 in ntrip
- Timestamp:
- Sep 11, 2026, 3:40:50 PM (2 days ago)
- Location:
- trunk/BNC
- Files:
-
- 5 edited
-
Example_Configs/Input/BNC_IGS20.CRD (modified) (3 diffs)
-
src/bnchelp.html (modified) (1 diff)
-
src/bncutils.cpp (modified) (1 diff)
-
src/bncutils.h (modified) (1 diff)
-
src/pppCrdFile.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/Example_Configs/Input/BNC_IGS20.CRD
r11026 r11027 10 10 # - antenna, and 11 11 # - receiver 12 # 13 # insteed of XYZ optional supported is 14 # - geodetic Latitude/Longitude/Height through the keywords LAT: LON: H: 15 # in D,M,S, which are comma-separated Degrees, Minutes and decimal Seconds, 16 # the sign of Degrees carries the hemisphere, negative meaning South or West), and 17 # height is the ellipsoidal height in meters, e.g.: LAT:49,8,39.12 LON:12,52,44.09 H:666.02 12 18 ################################################################################################ 13 19 # Reference System: IGS20 (IGS0OPSSNX_1994002_2026185_00U_CRD.SNX) … … 20 26 PARK00AUS0 -4554255.23564276 2816652.46115249 -3454059.72019472 EPOCH:2020.0 VEL:-0.0360614781690518,-0.00224882614802764,0.0466110997530548 0.0000 0.0000 0.0250 LEIAR25 NONE SEPT POLARX5TR 21 27 BRUX00BEL0 4027881.37719374 306998.748539549 4919499.01582683 EPOCH:2020.0 VEL:-0.0136005676831508,0.0167589259554315,0.0103501502632278 0.0010 0.0000 0.4689 JAVRINGANT_DM SCIS SEPT POLARX5TR 28 "0688" LAT:52,24,27.03277 LON:9,48,5.44970 H:123.7785 EPOCH:2026.5 0.0000 0.0000 0.053 29 22 30 # RINEX 23 31 FFMJ01DEU 4053455.66002983 617729.911377446 4869395.86849437 EPOCH:2020.0 VEL:-0.0148149200700258,0.0173394525889122,0.00993903277554994 0.0000 0.0000 0.0450 LEIAR25.R3 LEIT JAVAD TRE_3S DELTA … … 32 40 33 41 ################################################################################################ 34 # Howto extract the correct values from a cumulative SINEX file to fill BNCs coordinates file#42 # Howto extract the correct values from a cumulative SINEX file to fill BNCs coordinates file 35 43 ################################################################################################ 36 44 # Two different "epochs" are in play in a cumulative SINEX file -
trunk/BNC/src/bnchelp.html
r11019 r11027 6088 6088 station's ITRF velocity is unknown; 6089 6089 in that case the a priori coordinate is used unchanged, as before. 6090 </li> 6091 <br> 6092 <li>Instead of a Cartesian XYZ coordinate, the a priori coordinate may alternatively be specified as a geodetic 6093 Latitude/Longitude/Height through the keyword tokens 6094 <span style="font-family:Monospace">LAT:<D,M,S></span>, 6095 <span style="font-family:Monospace">LON:<D,M,S></span> and 6096 <span style="font-family:Monospace">H:<height></span> (in any order, in place of the 'X Y Z' fields). 6097 <span style="font-family:Monospace">D,M,S</span> are comma-separated Degrees, Minutes and decimal Seconds (the 6098 sign of Degrees carries the hemisphere, negative meaning South or West), and 6099 <span style="font-family:Monospace"><height></span> is the ellipsoidal height in meters, e.g.: 6100 <pre><p style="font-family:Monospace">LAT:49,8,39.12 LON:12,52,44.09 H:666.02</p></pre> 6101 BNC converts this internally to a Cartesian XYZ coordinate. 'EPOCH:' and 'VEL:' may be combined with 6102 'LAT:'/'LON:'/'H:' the same way as with a Cartesian coordinate — in particular, 'EPOCH:' may be given on its 6103 own, without 'VEL:', if only the coordinate's reference epoch is known but its velocity is not; in that case no 6104 propagation is performed and the a priori coordinate is used as given. 6090 6105 </li> 6091 6106 <br> -
trunk/BNC/src/bncutils.cpp
r11022 r11027 392 392 } 393 393 394 // Ellipsoidal Coordinates -> Rectangular Coordinates 395 //////////////////////////////////////////////////////////////////////////// 396 void ell2xyz(const double* Ell, double* XYZ) { 397 398 const double bell = t_CST::aell*(1.0-1.0/t_CST::fInv) ; 399 const double e2 = (t_CST::aell*t_CST::aell-bell*bell)/(t_CST::aell*t_CST::aell) ; 400 401 double sinPhi = sin(Ell[0]); 402 double cosPhi = cos(Ell[0]); 403 double sinLam = sin(Ell[1]); 404 double cosLam = cos(Ell[1]); 405 double hh = Ell[2]; 406 407 double nn = t_CST::aell/sqrt(1.0-e2*sinPhi*sinPhi) ; 408 409 XYZ[0] = (nn+hh) * cosPhi * cosLam; 410 XYZ[1] = (nn+hh) * cosPhi * sinLam; 411 XYZ[2] = (nn*(1.0-e2)+hh) * sinPhi; 412 } 413 394 414 // Rectangular Coordinates -> Ellipsoidal Coordinates 395 415 //////////////////////////////////////////////////////////////////////////// -
trunk/BNC/src/bncutils.h
r11022 r11027 92 92 t_irc xyz2geoc(const double* XYZ, double* Geoc); 93 93 94 void ell2xyz(const double* Ell, double* XYZ); 94 95 void xyz2neu(const double* Ell, const double* xyz, double* neu); 95 96 -
trunk/BNC/src/pppCrdFile.cpp
r11022 r11027 40 40 * -----------------------------------------------------------------------*/ 41 41 42 #include <cmath> 42 43 #include <cstdlib> 43 44 #include <fstream> … … 48 49 using namespace std; 49 50 using namespace BNC_PPP; 51 52 // Convert a 'D,M,S' (degrees, minutes, seconds) token into decimal degrees; 53 // the sign of D carries the hemisphere (negative == South/West). 54 ////////////////////////////////////////////////////////////////////////////// 55 static double dmsToDeg(const string& dms) { 56 string str = dms; 57 for (string::iterator it = str.begin(); it != str.end(); ++it) { 58 if (*it == ',') *it = ' '; 59 } 60 istringstream in(str); 61 double d = 0.0, m = 0.0, s = 0.0; 62 in >> d >> m >> s; 63 double sign = (d < 0.0) ? -1.0 : 1.0; 64 return sign * (fabs(d) + m / 60.0 + s / 3600.0); 65 } 50 66 51 67 // … … 81 97 } 82 98 83 in >> staInfo._xyz(1) >> staInfo._xyz(2) >> staInfo._xyz(3); 99 // The a priori coordinate is given either as plain Cartesian 'X Y Z', or, 100 // if the line's first coordinate token is 'LAT:<D,M,S>', as geodetic 101 // 'LAT:<D,M,S> LON:<D,M,S> H:<height>' (converted to XYZ below). 102 streampos posBeforeCoord = in.tellg(); 103 string firstCoordTok; 104 bool geodetic = false; 105 if (in >> firstCoordTok) { 106 geodetic = (firstCoordTok.compare(0, 4, "LAT:") == 0); 107 in.seekg(posBeforeCoord); 108 } 109 if (!geodetic) { 110 in >> staInfo._xyz(1) >> staInfo._xyz(2) >> staInfo._xyz(3); 111 } 84 112 85 // Optional 'EPOCH:<decimalYear>' and 'VEL:<vx>,<vy>,<vz>' keyword tokens 86 // (ITRF reference epoch and velocity in m/year of the coordinate above), 87 // may appear in any order before the antenna eccentricity / name fields. 113 // Optional keyword tokens, may appear in any order before the antenna 114 // eccentricity / name fields: 115 // - 'LAT:<D,M,S>', 'LON:<D,M,S>', 'H:<height>' (geodetic a priori coordinate) 116 // - 'EPOCH:<decimalYear>' (ITRF reference epoch of the coordinate) 117 // - 'VEL:<vx>,<vy>,<vz>' (ITRF velocity [m/year] of the coordinate) 118 double lat = 0.0, lon = 0.0, hgt = 0.0; 119 bool haveLat = false, haveLon = false, haveHgt = false; 88 120 while (!in.eof()) { 89 121 streampos posBeforeToken = in.tellg(); … … 92 124 break; 93 125 } 94 if (token.compare(0, 6, "EPOCH:") == 0) { 126 if (token.compare(0, 4, "LAT:") == 0) { 127 lat = dmsToDeg(token.substr(4)); 128 haveLat = true; 129 } 130 else if (token.compare(0, 4, "LON:") == 0) { 131 lon = dmsToDeg(token.substr(4)); 132 haveLon = true; 133 } 134 else if (token.compare(0, 2, "H:") == 0) { 135 hgt = atof(token.substr(2).c_str()); 136 haveHgt = true; 137 } 138 else if (token.compare(0, 6, "EPOCH:") == 0) { 95 139 staInfo._epoch = atof(token.substr(6).c_str()); 96 140 } … … 107 151 break; 108 152 } 153 } 154 155 if (geodetic && haveLat && haveLon && haveHgt) { 156 double Ell[3] = { lat * M_PI / 180.0, lon * M_PI / 180.0, hgt }; 157 double XYZ[3]; 158 ell2xyz(Ell, XYZ); 159 staInfo._xyz(1) = XYZ[0]; 160 staInfo._xyz(2) = XYZ[1]; 161 staInfo._xyz(3) = XYZ[2]; 109 162 } 110 163
Note:
See TracChangeset
for help on using the changeset viewer.
