- Timestamp:
- Oct 18, 2007, 2:19:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncapp.cpp
r518 r519 42 42 #include <QSettings> 43 43 #include <QMessageBox> 44 #include <cmath> 44 45 45 46 #include "bncapp.h" … … 58 59 59 60 _bncVersion = "BNC 1.4"; 61 60 62 // Lists of Ephemeris 61 63 // ------------------ … … 183 185 //////////////////////////////////////////////////////////////////////////// 184 186 void bncApp::printGPSEph(gpsephemeris* ep) { 187 188 const int RINEX_3 = 1; 189 185 190 if (_ephStream) { 186 *_ephStream << "GPS: " << ep->satellite << endl; 191 192 QDateTime datTim = dateAndTimeFromGPSweek(ep->GPSweek, ep->TOC); 193 194 QString line; 195 196 if (RINEX_3) { 197 line.sprintf("G%02d %04d %02d %02d %02d %02d %02d%19.12e%19.12e%19.12e\n", 198 ep->satellite, datTim.date().year(), 199 datTim.date().month(), datTim.date().day(), 200 datTim.time().hour(), datTim.time().minute(), 201 datTim.time().second(), ep->clock_bias, 202 ep->clock_drift, ep->clock_driftrate); 203 } 204 else { 205 line.sprintf("%02d %02d %02d %02d %02d %02d%05.1f%19.12e%19.12e%19.12e\n", 206 ep->satellite, datTim.date().year()%100, 207 datTim.date().month(), datTim.date().day(), 208 datTim.time().hour(), datTim.time().minute(), 209 (double) datTim.time().second(), ep->clock_bias, 210 ep->clock_drift, ep->clock_driftrate); 211 } 212 line.sprintf(" %19.12e%19.12e%19.12e%19.12e\n", (double)ep->IODE, 213 ep->Crs, ep->Delta_n, ep->M0); 214 line.sprintf(" %19.12e%19.12e%19.12e%19.12e\n", ep->Cuc, 215 ep->e, ep->Cus, ep->sqrt_A); 216 line.sprintf(" %19.12e%19.12e%19.12e%19.12e\n", 217 (double) ep->TOE, ep->Cic, ep->OMEGA0, ep->Cis); 218 line.sprintf(" %19.12e%19.12e%19.12e%19.12e\n", ep->i0, 219 ep->Crc, ep->omega, ep->OMEGADOT); 220 double dd = 0; 221 unsigned long ii = ep->flags; 222 if(ii & GPSEPHF_L2CACODE) 223 dd += 2.0; 224 if(ii & GPSEPHF_L2PCODE) 225 dd += 1.0; 226 line.sprintf(" %19.12e%19.12e%19.12e%19.12e\n", ep->IDOT, dd, 227 (double) ep->GPSweek, ii & GPSEPHF_L2PCODEDATA ? 1.0 : 0.0); 228 if(ep->URAindex <= 6) /* URA index */ 229 dd = ceil(10.0*pow(2.0, 1.0+((double)ep->URAindex)/2.0))/10.0; 230 else 231 dd = ceil(10.0*pow(2.0, ((double)ep->URAindex)/2.0))/10.0; 232 /* 15 indicates not to use satellite. We can't handle this special 233 case, so we create a high "non"-accuracy value. */ 234 line.sprintf(" %19.12e%19.12e%19.12e%19.12e\n", dd, 235 ((double) ep->SVhealth), ep->TGD, ((double) ep->IODC)); 236 237 line.sprintf(" %19.12e%19.12e\n", ((double)ep->TOW), 0.0); 238 187 239 _ephStream->flush(); 188 240 }
Note:
See TracChangeset
for help on using the changeset viewer.