Changeset 2670 in ntrip


Ignore:
Timestamp:
Nov 12, 2010, 10:25:48 AM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r2650 r2670  
    724724                            epoData->satDataGlo) != 0);
    725725
     726  // Remember the Epoch-specific Results for the computation of means
     727  // ----------------------------------------------------------------
     728  pppPos* newPos = new pppPos;
     729  newPos->time   = epoData->tt;
     730  _posAverage.push_back(newPos);
     731
    726732  // Set Solution Vector
    727733  // -------------------
     
    745751    }
    746752    else if (par->type == bncParam::TROPO) {
     753      double aprTrp = delay_saast(M_PI/2.0);
    747754      strB << "\n    trp     = " << par->prn.toAscii().data()
    748            << setw(7) << setprecision(3) << delay_saast(M_PI/2.0) << " "
     755           << setw(7) << setprecision(3) << aprTrp << " "
    749756           << setw(6) << setprecision(3) << showpos << par->xx << noshowpos
    750757           << " +- " << setw(6) << setprecision(3)
    751758           << sqrt(_QQ(par->index,par->index));
     759      newPos->xnt[6] = aprTrp + par->xx;
    752760    }
    753761  }
     
    755763  _log += strB.str().c_str();
    756764  emit newMessage(_log, false);
    757 
    758765
    759766  // Final Message (both log file and screen)
     
    780787    xyzRef[2] = settings.value("pppRefCrdZ").toDouble();
    781788
    782     pppPos* newPos = new pppPos;
    783     newPos->time   = epoData->tt;
    784     newPos->xn[0] = x() - xyzRef[0];
    785     newPos->xn[1] = y() - xyzRef[1];
    786     newPos->xn[2] = z() - xyzRef[2];
     789    newPos->xnt[0] = x() - xyzRef[0];
     790    newPos->xnt[1] = y() - xyzRef[1];
     791    newPos->xnt[2] = z() - xyzRef[2];
    787792
    788793    double ellRef[3];
    789794    xyz2ell(xyzRef, ellRef);
    790     xyz2neu(ellRef, newPos->xn, &newPos->xn[3]);
     795    xyz2neu(ellRef, newPos->xnt, &newPos->xnt[3]);
    791796
    792797    strC << "  NEU "
    793          << setw(8) << setprecision(3) << newPos->xn[3] << " "
    794          << setw(8) << setprecision(3) << newPos->xn[4] << " "
    795          << setw(8) << setprecision(3) << newPos->xn[5];
    796 
    797     _posAverage.push_back(newPos); // remember for the computation of mean
     798         << setw(8) << setprecision(3) << newPos->xnt[3] << " "
     799         << setw(8) << setprecision(3) << newPos->xnt[4] << " "
     800         << setw(8) << setprecision(3) << newPos->xnt[5];
     801
    798802  }
    799803
     
    814818    // Compute the Mean
    815819    // ----------------
    816     ColumnVector mean(6); mean = 0.0;
     820    ColumnVector mean(7); mean = 0.0;
    817821
    818822    QMutableVectorIterator<pppPos*> it(_posAverage);
     
    824828      }
    825829      else {
    826         for (int ii = 0; ii < 6; ++ii) {
    827           mean[ii] += pp->xn[ii];
     830        for (int ii = 0; ii < 7; ++ii) {
     831          mean[ii] += pp->xnt[ii];
    828832        }
    829833      }
     
    838842      // Compute the Deviation
    839843      // ---------------------
    840       ColumnVector std(6); std = 0.0;
     844      ColumnVector std(7); std = 0.0;
    841845      QVectorIterator<pppPos*> it2(_posAverage);
    842846      while (it2.hasNext()) {
    843847        pppPos* pp = it2.next();
    844         for (int ii = 0; ii < 6; ++ii) {
    845           std[ii] += (pp->xn[ii] - mean[ii]) * (pp->xn[ii] - mean[ii]);
    846         }
    847       }
    848       for (int ii = 0; ii < 6; ++ii) {
     848        for (int ii = 0; ii < 7; ++ii) {
     849          std[ii] += (pp->xnt[ii] - mean[ii]) * (pp->xnt[ii] - mean[ii]);
     850        }
     851      }
     852      for (int ii = 0; ii < 7; ++ii) {
    849853        std[ii] = sqrt(std[ii] / nn);
    850854      }
     
    869873           << setw(6)  << setprecision(3) << std[4]   << " "
    870874           << setw(14) << setprecision(3) << mean[5]  << " +- "
    871            << setw(6)  << setprecision(3) << std[5]   << endl;
     875           << setw(6)  << setprecision(3) << std[5];
    872876
    873877      emit newMessage(QByteArray(strE.str().c_str()), true);
     878
     879      ostringstream strF; strF.setf(ios::fixed);
     880      strF << _staID.data() << "  AVE-TRP "
     881           << epoData->tt.timestr(1) << " "
     882           << setw(13) << setprecision(3) << mean[6]  << " +- "
     883           << setw(6)  << setprecision(3) << std[6]   << endl;
     884
     885      emit newMessage(QByteArray(strF.str().c_str()), true);
    874886    }
    875887  }
  • trunk/BNC/bncmodel.h

    r2649 r2670  
    9999  class pppPos {
    100100   public:
     101    pppPos() {
     102      for (int ii = 0; ii < 7; ++ii) {
     103        xnt[ii] = 0.0;
     104      }
     105    }
    101106    bncTime time;
    102     double  xn[6];
     107    double  xnt[7];
    103108  };
    104109
Note: See TracChangeset for help on using the changeset viewer.