- Timestamp:
- Feb 9, 2010, 10:20:10 AM (15 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r2279 r2283 60 60 const double sig_crd_0 = 100.0; 61 61 const double sig_crd_p = 100.0; 62 const double sig_clk_0 = 100.0;63 const double sig_trp_0 = 0.0 5;64 const double sig_trp_p = 1e- 7;62 const double sig_clk_0 = 1000.0; 63 const double sig_trp_0 = 0.01; 64 const double sig_trp_p = 1e-6; 65 65 const double sig_amb_0_GPS = 100.0; 66 66 const double sig_amb_0_GLO = 1000.0; 67 const double sig_P3 = 10.0;68 const double sig_L3_GPS = 0.0 2;69 const double sig_L3_GLO = 0.0 2;67 const double sig_P3 = 1.0; 68 const double sig_L3_GPS = 0.01; 69 const double sig_L3_GLO = 0.01; 70 70 71 71 // Constructor … … 572 572 Matrix AA(nObs, nPar); // first design matrix 573 573 ColumnVector ll(nObs); // tems observed-computed 574 SymmetricMatrixPP(nObs); PP = 0.0;574 DiagonalMatrix PP(nObs); PP = 0.0; 575 575 576 576 unsigned iObs = 0; … … 636 636 QQsav = _QQ; 637 637 638 Matrix ATP = AA.t() * PP; 639 SymmetricMatrix NN = _QQ.i(); 640 NN << NN + ATP * AA; 641 _QQ = NN.i(); 642 dx = _QQ * ATP * ll; 643 vv = ll - AA * dx; 638 // Matrix ATP = AA.t() * PP; 639 // SymmetricMatrix NN = _QQ.i(); 640 // NN << NN + ATP * AA; 641 // _QQ = NN.i(); 642 // dx = _QQ * ATP * ll; 643 644 kalman(AA, ll, PP, _QQ, dx); 645 646 vv = ll - AA * dx; 644 647 645 648 ostringstream str; … … 878 881 emit newNMEAstr(outStr.toAscii()); 879 882 } 883 884 885 //// 886 ////////////////////////////////////////////////////////////////////////////// 887 void bncModel::kalman(const Matrix& AA, const ColumnVector& ll, 888 const DiagonalMatrix& PP, 889 SymmetricMatrix& QQ, ColumnVector& dx) { 890 891 int nObs = AA.Nrows(); 892 int nPar = AA.Ncols(); 893 894 UpperTriangularMatrix SS = Cholesky(QQ).t(); 895 896 Matrix SA = SS*AA.t(); 897 Matrix SRF(nObs+nPar, nObs+nPar); SRF = 0; 898 for (int ii = 1; ii <= nObs; ++ii) { 899 SRF(ii,ii) = 1.0 / sqrt(PP(ii,ii)); 900 } 901 902 SRF.SubMatrix (nObs+1, nObs+nPar, 1, nObs) = SA; 903 SRF.SymSubMatrix(nObs+1, nObs+nPar) = SS; 904 905 UpperTriangularMatrix UU; 906 QRZ(SRF, UU); 907 908 SS = UU.SymSubMatrix(nObs+1, nObs+nPar); 909 UpperTriangularMatrix SH_rt = UU.SymSubMatrix(1, nObs); 910 Matrix YY = UU.SubMatrix(1, nObs, nObs+1, nObs+nPar); 911 912 UpperTriangularMatrix SHi = SH_rt.i(); 913 914 Matrix KT = SHi * YY; 915 SymmetricMatrix Hi; Hi << SHi * SHi.t(); 916 917 dx = KT.t() * ll; 918 QQ << (SS.t() * SS); 919 } -
trunk/BNC/bncmodel.h
r2272 r2283 88 88 void writeNMEAstr(const QString& nmStr); 89 89 90 static void kalman(const Matrix& AA, const ColumnVector& ll, 91 const DiagonalMatrix& PP, 92 SymmetricMatrix& QQ, ColumnVector& dx); 93 90 94 bncTime _time; 91 95 QByteArray _staID; -
trunk/BNC/ppp.gpt
r2278 r2283 5 5 set format x "%H:%M" 6 6 7 ###set term png8 ###set output "ffmj1.png"7 set term png 8 set output "ffmj1.png" 9 9 10 10 set title "FFMJ1" 11 11 12 12 set ylabel "meters" 13 set xlabel " 19-Dec-2009"14 ###set yrange [-1.5:1.5]13 set xlabel "29-Dec-2009" 14 set yrange [-1.5:1.5] 15 15 16 plot "ppp" u 1:4 t "dH" w l p3, \17 "" u 1:2 t "dN" w l p1, \18 "" u 1:3 t "dE" w l p216 plot "ppp" u 1:4 t "dH" w l 3, \ 17 "" u 1:2 t "dN" w l 1, \ 18 "" u 1:3 t "dE" w l 2 19 19 20 pause -120 ###pause -1
Note:
See TracChangeset
for help on using the changeset viewer.