Class DualFrequencyHatchFilter


  • public class DualFrequencyHatchFilter
    extends Object
    Hatch Filter using Carrier-Phase measurements taken at two different frequencies, to form a Divergence-Free phase combination.

    This filter uses a phase combination to mitigate the effects of the temporally varying ionospheric delays. Still, the spatial variation of the ionospheric delays are not compensated by this phase combination.

    Since:
    11.2
    Author:
    Louis Aucouturier
    See Also:
    "Subirana, J. S., Hernandez-Pajares, M., and José Miguel Juan Zornoza. (2013). GNSS Data Processing: Fundamentals and Algorithms. European Space Agency. Section 4.2.3.1.1"
    • Constructor Detail

      • DualFrequencyHatchFilter

        public DualFrequencyHatchFilter​(ObservationData initCode,
                                        ObservationData initPhaseFreq1,
                                        ObservationData initPhaseFreq2,
                                        double wavelengthFreq1,
                                        double wavelengthFreq2,
                                        double threshold,
                                        int N)
        Constructor for the Dual Frequency Hatch Filter.

        The threshold parameter corresponds to the maximum difference between non-smoothed and smoothed pseudo range value, above which the filter is reset.

        Parameters:
        initCode - initial code measurement
        initPhaseFreq1 - initial phase measurement for the first chosen frequency
        initPhaseFreq2 - initial phase measurement for the second chosen frequency
        wavelengthFreq1 - initPhaseFreq1 observed value wavelength (m)
        wavelengthFreq2 - initPhaseFreq2 observed value wavelength (m)
        threshold - threshold for loss of lock detection (it represents the maximum difference between smoothed and measured values for loss of lock detection)
        N - window size of the Hatch Filter
    • Method Detail

      • filterData

        public ObservationData filterData​(ObservationData codeData,
                                          ObservationData phaseDataFreq1,
                                          ObservationData phaseDataFreq2)
        This method filters the provided data given the state of the filter.
        Parameters:
        codeData - input code observation data
        phaseDataFreq1 - input phase observation data for the first frequency
        phaseDataFreq2 - input phase observation data for the second frequency
        Returns:
        the smoothed observation data
      • getFirstFrequencyPhaseHistory

        public ArrayList<Double> getFirstFrequencyPhaseHistory()
        Get the history of phase values of the first frequency.
        Returns:
        the history of phase values of the first frequency
      • getSecondFrequencyPhaseHistory

        public ArrayList<Double> getSecondFrequencyPhaseHistory()
        Get the history of phase values of the second frequency.
        Returns:
        the history of phase values of the second frequency
      • getCodeHistory

        public ArrayList<Double> getCodeHistory()
        Get the history of the pseudo-range values used by the filter.
        Returns:
        the history of the pseudo-range values used by the filter
      • getSmoothedCodeHistory

        public ArrayList<Double> getSmoothedCodeHistory()
        Get the history of the smoothed pseudo-range values used by the filter.
        Returns:
        the smoothedCodeHistory
      • getThreshold

        public double getThreshold()
        Get the threshold for loss of lock detection.

        It represents the maximum difference between smoothed and measured values for loss of lock detection.

        Returns:
        the threshold for loss of lock detection
      • updatePreviousSmoothedCode

        public void updatePreviousSmoothedCode​(double smoothedCode)
        Update the previous smoothed value for the pseudo-range.
        Parameters:
        smoothedCode - the previous smoothed value for the pseudo-range
      • updatePreviousSmoothingValue

        public void updatePreviousSmoothingValue​(double smoothingValue)
        Update the previous smoothing value.
        Parameters:
        smoothingValue - the previous smoothing value
      • addToCodeHistory

        public void addToCodeHistory​(double codeValue)
        Add a value to the history of the pseudo-range value.
        Parameters:
        codeValue - the value to add to the history
      • addToSmoothedCodeHistory

        public void addToSmoothedCodeHistory​(double smoothedCodeValue)
        Add a value to the history of the smoothed pseudo-range value.
        Parameters:
        smoothedCodeValue - the value to add to the history
      • resetFilterNext

        public void resetFilterNext​(double codeValue)
        Reset the filter in the case of a NaN phase value, skipping the smoothing at the present instant and initializing at the next one, keeping the current code value.
        Parameters:
        codeValue - pseudo range value before the reset.
      • resetNextBoolean

        protected void resetNextBoolean()
        Set the flag for resetting the filter to true.
      • resetK

        protected void resetK()
        Reset the current index of the filter to 1.
      • smoothedCode

        protected double smoothedCode​(double codeValue,
                                      double smoothingValue)
        Computes the smoothed code value.

        This method corresponds to Eq. (4.23) of "Subirana, J. S., Hernandez-Pajares, M., and José Miguel Juan Zornoza. GNSS Data Processing: Fundamentals and Algorithms. European Space Agency."

        Parameters:
        codeValue - value of the input code measurement (non-smoothed)
        smoothingValue - value of the measurement used to smooth the code measurement
        Returns:
        the smoothed code value
      • checkValidData

        protected double checkValidData​(double codeValue,
                                        double smoothedValue,
                                        boolean cycleSlip)
        Checks if need to reset the filter or if cycle slip occurred.

        If yes, the smoothed value is reinitialized to the last code value. If no, the smoothed value value is not changed and the filter counter is updated.

        Parameters:
        codeValue - value of the input code measurement (non-smoothed)
        smoothedValue - the smoothed code value
        cycleSlip - true if cycle slip is detected
        Returns:
        the smoothed or non-smoothed value depending if the filter must be reseted