eflatun_uav.filters¶
Filter implementations for moving objects
Classes
|
A base class representing a generic filter for moving objects. |
- class eflatun_uav.filters.BaseFilter(input_size: List, output_size: List)[source]¶
Bases:
objectA base class representing a generic filter for moving objects.
This class serves as a foundation for more specific filter implementations. It is designed to be subclassed, and does not provide a full implementation that can be used on its own.
- __init__(input_size: List, output_size: List) None[source]¶
Initializes the base filter with the given input and output size.
- Parameters:
input_size (List) – The size of the input state. This is usually a list where each element represents the size of a different aspect of the input state.
output_size (List) – The size of the output state. Similar to the input size, this is a list where each element represents the size of a different aspect of the output state.
- predict() ndarray[source]¶
Predicts the next state based on the current state of the filter.
This method is intended to be overridden by subclasses.
- Raises:
NotImplementedError – This method must be implemented in a subclass.
- Returns:
- The predicted next state. The size and structure of this output should match the output_size
specified when the filter was initialized.
- Return type:
np.ndarray
- update(input_state: ndarray)[source]¶
Updates the state of the filter based on the given input state.
This method is intended to be overridden by subclasses.
- Parameters:
input_state (np.ndarray) – The input state used to update the filter. The size and structure of this input should match the input_size specified when the filter was initialized.
- Raises:
NotImplementedError – This method must be implemented in a subclass.