Index: /trunk/BNC/bncmodel.cpp
===================================================================
--- /trunk/BNC/bncmodel.cpp	(revision 2546)
+++ /trunk/BNC/bncmodel.cpp	(revision 2547)
@@ -137,5 +137,6 @@
 
   connect(this, SIGNAL(newMessage(QByteArray,bool)), 
-          ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
+          ((bncApp*)qApp), 
+          SLOT(slotMessage(const QByteArray,bool)));
 
   bncSettings settings;
@@ -235,5 +236,5 @@
 
   if (epoData->sizeGPS() < MINOBS) {
-    _log += "\nNot enough data";
+    _log += "bncModel::cmpBancroft: not enough data\n";
     return failure;
   }
@@ -544,4 +545,8 @@
   _time = epoData->tt;
 
+  _log += "Single Point Positioning of Epoch " 
+        + QByteArray(_time.timestr(1).c_str()) +
+          "\n--------------------------------------------------------------\n";
+
   SymmetricMatrix QQsav;
   ColumnVector    dx;
@@ -555,5 +560,4 @@
     // -----------------
     if (cmpBancroft(epoData) != success) {
-      _log += "\nBancroft failed";
       emit newMessage(_log, false);
       return failure;
@@ -576,5 +580,5 @@
     
     if (nObs < nPar) {
-      _log += "\nnObs < nPar";
+      _log += "bncModel::update: nObs < nPar\n";
       emit newMessage(_log, false);
       return failure;
@@ -651,6 +655,6 @@
     vv = ll - AA * dx;
 
-    ostringstream str;
-    str.setf(ios::fixed);
+    ostringstream strA;
+    strA.setf(ios::fixed);
     ColumnVector vv_code(epoData->sizeGPS());
     ColumnVector vv_phase(epoData->sizeGPS());
@@ -672,12 +676,12 @@
     }
 
-    str << "\nresiduals code  " << setprecision(3) << vv_code.t(); 
+    strA   << "residuals code  " << setw(8) << setprecision(3) << vv_code.t(); 
     if (_usePhase) {
-      str <<  "residuals phase " << setprecision(3) << vv_phase.t();
+      strA << "residuals phase " << setw(8) << setprecision(3) << vv_phase.t();
     }
     if (_useGlonass) {
-      str <<  "residuals glo   " << setprecision(3) << vv_glo.t();
-    }
-    _log += str.str().c_str();
+      strA << "residuals glo   " << setw(8) << setprecision(3) << vv_glo.t();
+    }
+    _log += strA.str().c_str();
 
   } while (outlierDetection(QQsav, vv, epoData->satDataGPS, 
@@ -694,5 +698,5 @@
 
     if      (par->type == bncParam::RECCLK) {
-      strB << "\n    clk = " << setw(6) << setprecision(3) << par->xx 
+      strB << "\n    clk     = " << setw(6) << setprecision(3) << par->xx 
            << " +- " << setw(6) << setprecision(3) 
            << sqrt(_QQ(par->index,par->index));
@@ -705,5 +709,5 @@
     }
     else if (par->type == bncParam::TROPO) {
-      strB << "\n    trp = " << par->prn.toAscii().data()
+      strB << "\n    trp     = " << par->prn.toAscii().data()
            << setw(7) << setprecision(3) << delay_saast(M_PI/2.0) << " "
            << setw(6) << setprecision(3) << showpos << par->xx << noshowpos
@@ -713,10 +717,12 @@
   }
   strB << '\n';
-
-  // Message (both log file and screen)
-  // ----------------------------------
-  ostringstream strA;
-  strA.setf(ios::fixed);
-  strA << _staID.data() << ": PPP " 
+  _log += strB.str().c_str();
+  emit newMessage(_log, false);
+
+  // Final Message (both log file and screen)
+  // ----------------------------------------
+  ostringstream strC;
+  strC.setf(ios::fixed);
+  strC << _staID.data() << "  PPP " 
        << epoData->tt.timestr(1) << " " << epoData->sizeAll() << " " 
        << setw(14) << setprecision(3) << x()                  << " +- "
@@ -726,9 +732,4 @@
        << setw(14) << setprecision(3) << z()                  << " +- "
        << setw(6)  << setprecision(3) << sqrt(_QQ(3,3));
-
-  emit newMessage(QByteArray(strA.str().c_str()), true);
-
-  _log += strB.str().c_str();
-  emit newMessage(_log, false);
 
   // NEU Output
@@ -747,13 +748,13 @@
     xyz2ell(xyzRef, ellRef);
     xyz2neu(ellRef, _xyz, _neu);
-    ostringstream strC;
-    strC.setf(ios::fixed);
-    strC << _staID.data() << ": NEU "
-         << epoData->tt.timestr(1) << " " << epoData->sizeAll() << " "
-         << setw(8)  << setprecision(3) << _neu[0]              << " "
-         << setw(8)  << setprecision(3) << _neu[1]              << " "
-         << setw(8)  << setprecision(3) << _neu[2]              << endl;
-    emit newMessage(QByteArray(strC.str().c_str()), true);
-  }
+    strC << "  NEU "
+         << setw(8) << setprecision(3) << _neu[0] << " "
+         << setw(8) << setprecision(3) << _neu[1] << " "
+         << setw(8) << setprecision(3) << _neu[2];
+  }
+
+  strC << endl;
+  
+  emit newMessage(QByteArray(strC.str().c_str()), true);
 
   // NMEA Output
@@ -859,6 +860,6 @@
     _QQ = QQsav;
 
-    _log += "\nOutlier Phase " + prn.toAscii() + " " 
-          + QByteArray::number(vvMaxPhaseGlo, 'f', 3);
+    _log += "Outlier Phase " + prn.toAscii() + " " 
+          + QByteArray::number(vvMaxPhaseGlo, 'f', 3) + "\n"; 
 
     return 1;
@@ -872,6 +873,6 @@
     _QQ = QQsav;
 
-    _log += "\nOutlier Code " + prn.toAscii() + " " 
-            + QByteArray::number(vvMaxCodeGPS, 'f', 3);
+    _log += "Outlier Code " + prn.toAscii() + " " 
+            + QByteArray::number(vvMaxCodeGPS, 'f', 3) + "\n";
 
     return 1;
@@ -884,6 +885,6 @@
     _QQ = QQsav;
 
-    _log += "\nOutlier Phase " + prn.toAscii() + " " 
-          + QByteArray::number(vvMaxPhaseGPS, 'f', 3);
+    _log += "Outlier Phase " + prn.toAscii() + " " 
+          + QByteArray::number(vvMaxPhaseGPS, 'f', 3)  + "\n";
 
     return 1;
