Class PythonHatchFilter
- java.lang.Object
-
- org.orekit.estimation.measurements.filtering.PythonHatchFilter
-
public class PythonHatchFilter extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToCodeHistory(double codeValue)
Add a value to the history of the pseudo-range value.void
addToSmoothedCodeHistory(double smoothedCodeValue)
Add a value to the history of the smoothed pseudo-range value.protected double
checkValidData(double codeValue, double smoothedValue, boolean cycleSlip)
Checks if need to reset the filter or if cycle slip occurred.ArrayList<Double>
getCodeHistory()
Get the history of the pseudo-range values used by the filter.ArrayList<Double>
getSmoothedCodeHistory()
Get the history of the smoothed pseudo-range values used by the filter.double
getThreshold()
Get the threshold for loss of lock detection.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.protected void
resetK()
Reset the current index of the filter to 1.protected void
resetNextBoolean()
Set the flag for resetting the filter to true.protected double
smoothedCode(double codeValue, double smoothingValue)
Computes the smoothed code value.void
updatePreviousSmoothedCode(double smoothedCode)
Update the previous smoothed value for the pseudo-range.void
updatePreviousSmoothingValue(double smoothingValue)
Update the previous smoothing value.
-
-
-
Method Detail
-
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 valuecycleSlip
- true if cycle slip is detected- Returns:
- the smoothed or non-smoothed value depending if the filter must be reseted
-
-