ResamplerHermite
The ResamplerHermite operator performs smooth interpolation between irregularly spaced input points to generate regularly spaced output points. It uses cubic Hermite spline interpolation to maintain continuity of both values and derivatives.
Configuration
Required Parameters
id: Unique identifier for the operatorinterval: Time interval between resampled points (must be > 0)t0(optional): Starting time for first emission
Example Configuration
{
"id": "resampler1",
"interval": 5,
"t0": 100
}
Ports
Inputs: 1
Outputs: 1
Operation
- Maintains a 4-point sliding window buffer for interpolation
- Initializes emission times based on t0 or first complete buffer
- Emits interpolated values at regular intervals within valid ranges
- Preserves function characteristics like local extrema
Implementation Details
The operator uses a Buffer base class with:
- Fixed 4-point window size for Hermite interpolation
- Feature flags disabled for statistical tracking
- Efficient interpolation computation
Interpolation Algorithm
The cubic Hermite spline interpolation:
- Uses 4 points to ensure C1 continuity
- Computes tangents from adjacent points
- Applies tension parameter (default: 0) for shape control
- Interpolates using Hermite basis functions
Time Handling
- Input times must be strictly increasing
- Output times are aligned to interval boundaries
- Optional t0 parameter sets first emission time
- Interpolation only within valid buffer range
Error Handling
The operator will throw exceptions for:
- Invalid interval (≤ 0)
- Non-monotonic input times
- Invalid message types
- Buffer overflow conditions
Use Cases
Ideal for:
- Signal resampling
- Regular sampling of irregular data
- Smooth interpolation
- Time series alignment
- Data rate conversion
Performance Characteristics
- O(1) memory usage (fixed buffer size)
- O(1) per message processing
- Output rate determined by interval
- Interpolation preserves C1 continuity