- Timestamp:
- Dec 12, 2010, 4:03:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncapp.cpp
r2770 r2772 258 258 QMutexLocker locker(&_mutex); 259 259 260 galileoephemeris copy_galileoeph = *galileoeph; 261 emit newEphGalileo(copy_galileoeph); 262 263 printEphHeader(); 264 265 galileoephemeris** ee = &_galileoEph[galileoeph->satellite-1]; 266 267 if ( *ee == 0 || 268 galileoeph->Week > (*ee)->Week || 269 (galileoeph->Week == (*ee)->Week && galileoeph->TOC > (*ee)->TOC) ) { 270 delete *ee; 271 *ee = galileoeph; 272 printGalileoEph(galileoeph, true); 273 } 274 else { 275 printGalileoEph(galileoeph, false); 276 delete galileoeph; 277 } 260 278 } 261 279 … … 559 577 //////////////////////////////////////////////////////////////////////////// 560 578 void bncApp::printGalileoEph(galileoephemeris* ep, bool printFile) { 579 580 QString lineV2; 581 QString lineV3; 582 583 struct converttimeinfo cti; 584 converttime(&cti, ep->Week, ep->TOC); 585 586 lineV3.sprintf("E%02d %04d %02d %02d %02d %02d %02d %18.11e %18.11e %18.11e\n", 587 ep->satellite, cti.year, cti.month, cti.day, cti.hour, 588 cti.minute, cti.second, ep->clock_bias, ep->clock_drift, 589 ep->clock_driftrate); 590 591 QString line; 592 QByteArray allLines; 593 594 QByteArray fmt4 = " %18.11e %18.11e %18.11e %18.11e\n"; 595 QByteArray fmt3 = " %18.11e %18.11e %18.11e\n"; 596 QByteArray fmt1 = " %18.11e\n"; 597 598 line.sprintf(fmt4.data(), (double)ep->IODnav, ep->Crs, ep->Delta_n, ep->M0); 599 allLines += line; 600 601 line.sprintf(fmt4.data(), ep->Cuc, ep->e, ep->Cus, ep->sqrt_A); 602 allLines += line; 603 604 line.sprintf(fmt4.data(), (double) ep->TOE, ep->Cic, ep->OMEGA0, ep->Cis); 605 allLines += line; 606 607 line.sprintf(fmt4.data(), ep->i0, ep->Crc, ep->omega, ep->OMEGADOT); 608 allLines += line; 609 610 double dataSources = 0.0; // TODO 611 line.sprintf(fmt3.data(), ep->IDOT, dataSources, (double) ep->Week); 612 allLines += line; 613 614 double health = 0.0; // TODO 615 double BGD_1_5B = ep->BGD_1_5A; // TODO 616 line.sprintf(fmt4.data(), ep->SISA, health, ep->BGD_1_5A, BGD_1_5B); 617 allLines += line; 618 619 double TOW = ep->TOC; // TODO 620 line.sprintf(fmt1.data(), TOW); 621 allLines += line; 622 623 printOutput(printFile, _ephStreamGalileo, lineV2, lineV3, allLines); 561 624 } 562 625
Note:
See TracChangeset
for help on using the changeset viewer.