⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 licsdetector.hpp

📁 一个gps小工具包
💻 HPP
📖 第 1 页 / 共 2 页
字号:
        /// Method to get the minimum threshold for cycle slip detection, in meters.        virtual double getMinThreshold() const        {           return minThreshold;        };        /** Method to set the LI combination limit drift, in meters/second         * @param drift     LI combination limit drift, in meters/second.         */        virtual void setLIDrift(const double& drift)        {            // Don't allow drift less than or equal to 0            if (drift > 0.0) LIDrift = drift; else LIDrift = 0.002;        };        /// Method to get the minimum threshold for cycle slip detection, in meters.        virtual double getLIDrift() const        {           return LIDrift;        };        /** Method to set whether the LLI indexes will be used as an aid or not.         * @param use   Boolean value enabling/disabling LLI check         */        virtual void setUseLLI(const bool& use)        {            useLLI = use;        };        /// Method to know if the LLI check is enabled or disabled.        virtual bool getUseLLI() const        {           return useLLI;        };        /** Returns a gnnsSatTypeValue object, adding the new data generated when calling this object.         *         * @param gData    Data object holding the data.         */        virtual gnssSatTypeValue& Process(gnssSatTypeValue& gData)        {            (*this).Process(gData.header.epoch, gData.body);            return gData;        };        /** Returns a gnnsRinex object, adding the new data generated when calling this object.         *         * @param gData    Data object holding the data.         */        virtual gnssRinex& Process(gnssRinex& gData)        {            (*this).Process(gData.header.epoch, gData.body, gData.header.epochFlag);            return gData;        };        /// Returns an index identifying this object.        virtual int getIndex(void) const;        /// Returns a string identifying this object.        virtual std::string getClassName(void) const;        /** Sets the index to a given arbitrary value. Use with caution.         *         * @param newindex      New integer index to be assigned to current object.         */        void setIndex(const int newindex) { (*this).index = newindex; };        /// Destructor        virtual ~LICSDetector() {};    private:        /// Type of code.        TypeID obsType;        /// Type of LLI1 record.        TypeID lliType1;        /// Type of LLI2 record.        TypeID lliType2;        /// Type of result #1.        TypeID resultType1;        /// Type of result #2.        TypeID resultType2;        /// Maximum interval of time allowed between two successive epochs, in seconds.        double deltaTMax;        /// Minimum threshold for declaring cycle slip, in meters.        double minThreshold;        /// LI combination limit drift, in meters/second.        double LIDrift;        /// This field tells whether to use or ignore the LLI indexes as an aid.         bool useLLI;        /// A structure used to store filter data for a SV.        struct filterData        {            // Default constructor initializing the data in the structure            filterData() : formerEpoch(DayTime::BEGINNING_OF_TIME), windowSize(0), formerLI(0.0), formerBias(0.0), formerDeltaT(1.0) {};            DayTime formerEpoch;    ///< The previous epoch time stamp.            int windowSize;         ///< Size of current window, in samples.            double formerLI;        ///< Value of the previous LI observable.            double formerBias;      ///< Previous bias (LI_1 - LI_0).            double formerDeltaT;    ///< Previous time difference, in seconds.        };        /// Map holding the information regarding every satellite        std::map<SatID, filterData> LIData;        /** Returns a satTypeValueMap object, adding the new data generated when calling this object.         *         * @param epoch     Time of observations.         * @param sat       SatID.         * @param tvMap     Data structure of TypeID and values.         * @param epochflag Epoch flag.         * @param li        Current LI observation value.         * @param lli1      LLI1 index.         * @param lli2      LLI2 index.         */        virtual double getDetection(const DayTime& epoch, const SatID& sat, typeValueMap& tvMap, const short& epochflag, const double& li, const double& lli1, const double& lli2)        {            bool reportCS(false);            double currentDeltaT(0.0); // Difference between current and former epochs, in sec            double currentBias(0.0);   // Difference between current and former LI values            double deltaLimit(0.0);    // Limit to declare cycle slip            double delta(0.0);            double tempLLI1(0.0);            double tempLLI2(0.0);            // Get the difference between current epoch and former epoch, in seconds            currentDeltaT = ( epoch.MJDdate() - LIData[sat].formerEpoch.MJDdate() ) * DayTime::SEC_DAY;            // Store current epoch as former epoch            LIData[sat].formerEpoch = epoch;            currentBias = li - LIData[sat].formerLI;   // Current value of LI difference            // Increment size of window            ++LIData[sat].windowSize;            // Check if receiver already declared cycle slip or too much time has elapsed            // Note: If tvMap(lliType1) or tvMap(lliType2) don't exist, then 0 will be returned and those tests will pass            if ( (tvMap(lliType1)==1.0) || (tvMap(lliType1)==3.0) || (tvMap(lliType1)==5.0) || (tvMap(lliType1)==7.0) ) tempLLI1 = 1.0;            if ( (tvMap(lliType2)==1.0) || (tvMap(lliType2)==3.0) || (tvMap(lliType2)==5.0) || (tvMap(lliType2)==7.0) ) tempLLI2 = 1.0;            if ( (epochflag==1) || (epochflag==6) || (tempLLI1==1.0) || (tempLLI2==1.0) || (currentDeltaT > deltaTMax) )            {                LIData[sat].windowSize = 0;      // We reset the filter with this                reportCS = true;            }            if (LIData[sat].windowSize > 1)            {                deltaLimit = minThreshold + std::abs(LIDrift*currentDeltaT);                // Compute a linear interpolation and compute LI_predicted - LI_current                delta = std::abs(currentBias - LIData[sat].formerBias*currentDeltaT/LIData[sat].formerDeltaT);                if (delta > deltaLimit)                {                    LIData[sat].windowSize = 0;      // We reset the filter with this                    reportCS = true;                }            }            // Let's prepare for the next time            LIData[sat].formerLI = li;            LIData[sat].formerBias = currentBias;            LIData[sat].formerDeltaT = currentDeltaT;                           if (reportCS) return 1.0; else return 0.0;        };        /// Initial index assigned to this class.        static int classIndex;        /// Index belonging to this object.        int index;        /// Sets the index and increment classIndex.        void setIndex(void) { (*this).index = classIndex++; };    }; // end class LICSDetector      //@}   }#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -