00001 #pragma ident "$Id: ARLambda.hpp 2937 2011-10-23 19:23:33Z yanweignss $"
00002
00008 #ifndef GPSTK_ARLAMBDA_HPP
00009 #define GPSTK_ARLAMBDA_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "ARBase.hpp"
00034
00035 namespace gpstk
00036 {
00045 class ARLambda : public ARBase
00046 {
00047 public:
00048
00050 ARLambda() : squaredRatio(0.0) {}
00051
00052
00054 virtual Vector<double> resolveIntegerAmbiguity(
00055 const Vector<double>& ambFloat,
00056 const Matrix<double>& ambCov )
00057 throw(ARException);
00058
00059
00061 virtual ~ARLambda(){}
00062
00063
00064 bool isFixedSuccessfully(double threshhold = 3.0)
00065 { return (squaredRatio>threshhold)?true:false; }
00066
00067
00068 double squaredRatio;
00069
00070 protected:
00071
00072 double sign(double x)
00073 { return (x<=0.0)?-1.0:1.0; }
00074
00075
00076 double round(double x)
00077 { return double(std::floor(x+0.5));}
00078
00079
00080 void swap(double& a,double& b)
00081 { double t(a); a = b; b = t; }
00082
00083
00084
00085 int factorize( const Matrix<double>& Q,
00086 Matrix<double>& L,
00087 Vector<double>& D );
00088
00089
00091 void gauss(Matrix<double>& L, Matrix<double>& Z, int i, int j );
00092
00093
00095 void permute( Matrix<double>& L,
00096 Vector<double>& D,
00097 int j,
00098 double del,
00099 Matrix<double>& Z);
00100
00101
00103 void reduction( Matrix<double>& L,
00104 Vector<double>& D,
00105 Matrix<double>& Z );
00106
00107
00108
00109 virtual int search( const Matrix<double>& L,
00110 const Vector<double>& D,
00111 const Vector<double>& zs,
00112 Matrix<double>& zn,
00113 Vector<double>& s,
00114 const int& m = 2 );
00115
00116
00117
00118
00119
00120
00121
00122
00123 int lambda( const Vector<double>& a,
00124 const Matrix<double>& Q,
00125 Matrix<double>& F,
00126 Vector<double>& s,
00127 const int& m = 2 );
00128
00129 protected:
00130
00131
00132
00133 };
00134
00135 }
00136
00137
00138 #endif //GPSTK_ARLAMBDA_HPP
00139