Changeset 5337 in ntrip for trunk/BNC


Ignore:
Timestamp:
Aug 18, 2013, 1:46:07 PM (11 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/combination/bnccomb.cpp

    r5134 r5337  
    661661void bncComb::dumpResults(const QMap<QString, t_corr*>& resCorr) {
    662662
    663   ostringstream out; out.setf(std::ios::fixed);
    664   QStringList   corrLines;
     663  QString     outLines;
     664  QStringList corrLines;
    665665
    666666  unsigned year, month, day, hour, minute;
     
    669669  _resTime.civil_time(hour, minute, sec);
    670670
    671   out << "*  "
    672       << setw(4)  << year   << " "
    673       << setw(2)  << month  << " "
    674       << setw(2)  << day    << " "
    675       << setw(2)  << hour   << " "
    676       << setw(2)  << minute << " "
    677       << setw(12) << setprecision(8) << sec << " "
    678       << endl;
     671  outLines.sprintf("*  %4d %2d %2d %d %d %12.8f\n",
     672                   year, month, day, hour, minute, sec);
    679673
    680674  QMapIterator<QString, t_corr*> it(resCorr);
     
    700694    }
    701695   
    702     out << corr->prn.toAscii().data()
    703         << " APC 3 "
    704         << setw(15) << setprecision(4) << xc(1)
    705         << setw(15) << setprecision(4) << xc(2)
    706         << setw(15) << setprecision(4) << xc(3)
    707         << " Clk 1 "
    708         << setw(15) << setprecision(4) << xc(4) * t_CST::c
    709         << " Vel 3 "
    710         << setw(15) << setprecision(4) << vv(1)
    711         << setw(15) << setprecision(4) << vv(2)
    712         << setw(15) << setprecision(4) << vv(3)
    713         << " CoM 3 "
    714         << setw(15) << setprecision(4) << xc(1) - dx(1)
    715         << setw(15) << setprecision(4) << xc(2) - dx(2)
    716         << setw(15) << setprecision(4) << xc(3) - dx(2)
    717         << endl;
     696    outLines += corr->prn;
     697    QString hlp;
     698    hlp.sprintf(" APC 3 %15.4f %15.4f %15.4f"
     699                " Clk 1 %15.4f"
     700                " Vel 3 %15.4f %15.4f %15.4f"
     701                " CoM 3 %15.4f %15.4f %15.4f\n",
     702                xc(1), xc(2), xc(3),
     703                xc(4)*t_CST::c,
     704                vv(1), vv(2), vv(3),
     705                xc(1)-dx(1), xc(2)-dx(2), xc(3)-dx(3));
     706    outLines += hlp;
     707
     708    qDebug() << corr->prn << xc(1) << xc(2) << xc(3) << xc(4)*t_CST::c
     709             << vv(1) << vv(2) << vv(3) << dx(1) << dx(2) << dx(3);
    718710 
    719711    QString line;
     
    744736    delete corr;
    745737  }
    746   out << "EOE" << endl; // End Of Epoch flag
     738
     739  outLines += "EOE\n"; // End Of Epoch flag
    747740
    748741  if (!_rtnetDecoder) {
     
    751744
    752745  vector<string> errmsg;
    753   _rtnetDecoder->Decode((char*) out.str().data(), out.str().size(), errmsg);
     746  _rtnetDecoder->Decode(outLines.toAscii().data(), outLines.length(), errmsg);
    754747
    755748  // Optionally send new Corrections to PPP
Note: See TracChangeset for help on using the changeset viewer.