Index: trunk/BNC/bncmodel.cpp
===================================================================
--- trunk/BNC/bncmodel.cpp	(revision 2719)
+++ trunk/BNC/bncmodel.cpp	(revision 2720)
@@ -60,12 +60,4 @@
 const double   MAXRES_PHASE_GPS = 0.10;
 const double   MAXRES_PHASE_GLO = 0.05;
-const double   QUICKSTART       =  120.0;
-const double   sig_clk_0        = 1000.0;
-const double   sig_trp_0        =    0.10;
-const double   sig_trp_p        =    1e-8;
-const double   sig_amb_0_GPS    = 1000.0;
-const double   sig_amb_0_GLO    = 1000.0;
-const double   sig_L3_GPS       =    0.02;
-const double   sig_L3_GLO       =    0.05;
 
 // Constructor
@@ -140,18 +132,47 @@
   bncSettings settings;
 
-  double sig_crd_0 = 100.0;
-
-  if (settings.value("pppOrigin").toString() == "QuickStart - Static" ||
-      settings.value("pppOrigin").toString() == "QuickStart - Mobile") {
-    sig_crd_0 = 000.01;
-  } 
+  // Observation Sigmas
+  // ------------------
+  _sigP3 = 5.0;
+  if (!settings.value("pppSigmaCode").toString().isEmpty()) {
+    _sigP3 = settings.value("pppSigmaCode").toDouble();
+  }
+  _sigL3 = 0.02;
+  if (!settings.value("pppSigmaPhase").toString().isEmpty()) {
+    _sigP3 = settings.value("pppSigmaPhase").toDouble();
+  }
+
+  // Parameter Sigmas
+  // ----------------
+  _sigCrd0 = 100.0;
+  if (!settings.value("pppSigCrd0").toString().isEmpty()) {
+    _sigCrd0 = settings.value("pppSigCrd0").toDouble();
+  }
+  _sigCrdP = 100.0;
+  if (!settings.value("pppSigCrdP").toString().isEmpty()) {
+    _sigCrdP = settings.value("pppSigCrdP").toDouble();
+  }
+  _sigTrp0 = 0.1;
+  if (!settings.value("pppSigTrp0").toString().isEmpty()) {
+    _sigTrp0 = settings.value("pppSigTrp0").toDouble();
+  }
+  _sigTrpP = 1e-6;
+  if (!settings.value("pppSigTrpP").toString().isEmpty()) {
+    _sigTrpP = settings.value("pppSigTrpP").toDouble();
+  }
+  _sigClk0 = 1000.0;
+  _sigAmb0 = 1000.0;
+
+  // Quick-Start Mode
+  // ----------------
+  _quickStart = 0;
+  if (settings.value("pppOrigin").toString() == "PPP" &&
+      !settings.value("pppQuickStart").toString().isEmpty()) {
+    _quickStart = settings.value("pppQuickStart").toDouble() * 60.0;
+    _sigCrd0 = 0.01;
+  }
 
   connect(this, SIGNAL(newMessage(QByteArray,bool)), 
           ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
-
-  _static = false;
-  if ( Qt::CheckState(settings.value("pppStatic").toInt()) == Qt::Checked) {
-    _static = true;
-  }
 
   _usePhase = false;
@@ -194,11 +215,11 @@
     bncParam* pp = _params[iPar-1];
     if      (pp->isCrd()) {
-      _QQ(iPar,iPar) = sig_crd_0 * sig_crd_0; 
+      _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0; 
     }
     else if (pp->type == bncParam::RECCLK) {
-      _QQ(iPar,iPar) = sig_clk_0 * sig_clk_0; 
+      _QQ(iPar,iPar) = _sigClk0 * _sigClk0; 
     }
     else if (pp->type == bncParam::TROPO) {
-      _QQ(iPar,iPar) = sig_trp_0 * sig_trp_0; 
+      _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0; 
     }
   }
@@ -393,12 +414,10 @@
   }
 
-  bool   quickStartInit = false;
-  double sig_crd_p      = 100.0;
-
-  if ( (settings.value("pppOrigin").toString() == "QuickStart - Static" ||
-        settings.value("pppOrigin").toString() == "QuickStart - Mobile") &&
-       _startTime.secsTo(QDateTime::currentDateTime()) < QUICKSTART ) {
-    quickStartInit = true;
-    sig_crd_p       = 0.0;
+  // Use different white noise for quick-start mode
+  // ----------------------------------------------
+  double sigCrdP_used   = _sigCrdP;
+  if ( _quickStart > 0.0 &&
+       _quickStart > _startTime.secsTo(QDateTime::currentDateTime()) ) {
+    sigCrdP_used   = 0.0;
   }
 
@@ -411,6 +430,6 @@
     // -----------
     if      (pp->type == bncParam::CRD_X) {
-      if (firstCrd || !_static) {
-        if (quickStartInit) {
+      if (firstCrd) {
+        if (settings.value("pppOrigin").toString() == "PPP") {
           pp->xx = settings.value("pppRefCrdX").toDouble();
         }
@@ -419,9 +438,9 @@
         }
       }
-      _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
+      _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used;
     }
     else if (pp->type == bncParam::CRD_Y) {
-      if (firstCrd || !_static) {
-        if (quickStartInit) {
+      if (firstCrd) {
+        if (settings.value("pppOrigin").toString() == "PPP") {
           pp->xx = settings.value("pppRefCrdY").toDouble();
         }
@@ -430,9 +449,9 @@
         }
       }
-      _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
+      _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used;
     }
     else if (pp->type == bncParam::CRD_Z) {
-      if (firstCrd || !_static) {
-        if (quickStartInit) {
+      if (firstCrd) {
+        if (settings.value("pppOrigin").toString() == "PPP") {
           pp->xx = settings.value("pppRefCrdZ").toDouble();
         }
@@ -441,5 +460,5 @@
         }
       }
-      _QQ(iPar,iPar) += sig_crd_p * sig_crd_p;
+      _QQ(iPar,iPar) += sigCrdP_used * sigCrdP_used;
     }   
 
@@ -451,5 +470,5 @@
         _QQ(iPar, jj) = 0.0;
       }
-      _QQ(iPar,iPar) = sig_clk_0 * sig_clk_0;
+      _QQ(iPar,iPar) = _sigClk0 * _sigClk0;
     }
 
@@ -457,5 +476,5 @@
     // ------------------
     else if (pp->type == bncParam::TROPO) {
-      _QQ(iPar,iPar) += sig_trp_p * sig_trp_p;
+      _QQ(iPar,iPar) += _sigTrpP * _sigTrpP;
     }
   }
@@ -555,15 +574,9 @@
       bncParam* par = _params[ii-1];
       if (par->index_old == 0) {
-        if (par->prn[0] == 'R') {
-          _QQ(par->index, par->index) = sig_amb_0_GLO * sig_amb_0_GLO;
-        }
-        else {
-          _QQ(par->index, par->index) = sig_amb_0_GPS * sig_amb_0_GPS;
-        }
+        _QQ(par->index, par->index) = _sigAmb0 * _sigAmb0;
       }
       par->index_old = par->index;
     }
   }
-
 }
 
@@ -650,5 +663,5 @@
         ++iObs;
         ll(iObs)      = satData->L3 - cmpValue(satData, true);
-        PP(iObs,iObs) = 1.0 / (sig_L3_GPS * sig_L3_GPS);
+        PP(iObs,iObs) = 1.0 / (_sigL3 * _sigL3);
         for (int iPar = 1; iPar <= _params.size(); iPar++) {
           if (_params[iPar-1]->type == bncParam::AMB_L3 &&
@@ -672,5 +685,5 @@
 
         ll(iObs)      = satData->L3 - cmpValue(satData, true);
-        PP(iObs,iObs) = 1.0 / (sig_L3_GLO * sig_L3_GLO);
+        PP(iObs,iObs) = 1.0 / (_sigL3 * _sigL3);
         for (int iPar = 1; iPar <= _params.size(); iPar++) {
           if (_params[iPar-1]->type == bncParam::AMB_L3 &&
Index: trunk/BNC/bncmodel.h
===================================================================
--- trunk/BNC/bncmodel.h	(revision 2719)
+++ trunk/BNC/bncmodel.h	(revision 2720)
@@ -114,5 +114,4 @@
   ColumnVector          _xcBanc;
   ColumnVector          _ellBanc;
-  bool                  _static;
   bool                  _usePhase;
   bool                  _estTropo;
@@ -124,4 +123,13 @@
   QMap<QString, double> _windUpSum;
   QVector<pppPos*>      _posAverage;
+  double                _quickStart;
+  double                _sigCrd0;
+  double                _sigCrdP;
+  double                _sigTrp0;
+  double                _sigTrpP;
+  double                _sigL3;
+  double                _sigP3;
+  double                _sigAmb0;
+  double                _sigClk0;
 };
 
