bluepebble.platform
Platform and array-geometry models used in Blue Pebble simulations.
Platform models public API.
- class bluepebble.platform.TowedArrayPlatform(num_sensors, cable_length_m, sensor_spacing_m, array_depth_m, movement_controller=None, sensors=None, id=None, shape=None, velocity_mapping=None, reference_sensor_idx=0)[source]
A Stone Soup compliant platform that can tow an array of sensors.
This platform models a host vehicle towing a linear array of sensors. The sensors follow the host (or the sensor ahead of them) based on a defined cable length and sensor spacing.
- Parameters:
num_sensors (int) – Number of sensors in the array.
cable_length_m (float) – Length of the main tow cable in meters (distance from host to first sensor).
sensor_spacing_m (float) – Spacing between subsequent sensors in meters.
array_depth_m (float) – Depth at which the array is towed in meters.
velocity_mapping (Sequence[int], optional) – Indices for velocity in the state vector. If not set, defaults to
position_mappingindices + 1.reference_sensor_idx (int, optional) – Index of the reference sensor. Defaults to 0.
movement_controller (Movable)
sensors (MutableSequence[Sensor])
id (str)
shape (Shape)
- Variables:
towed_sensors (list[MovingMovable]) – A list of the simulated sensor objects trailing the platform.
platform_history (list[PlatformState]) – A history of the platform’s composite state over time.
- num_sensors: int
Number of sensors in the array
- cable_length_m: float
Length of the main tow cable in meters
- sensor_spacing_m: float
Spacing between sensors in meters
- array_depth_m: float
Depth at which the array is towed in meters
- velocity_mapping: Sequence[int] | None
Indices for velocity in the state vector. If not set, defaults to position_mapping indices + 1
- reference_sensor_idx: int
Index of the reference sensor
- move(timestamp, **kwargs)[source]
Move the platform and all sensor followers.
- Parameters:
timestamp (datetime) – The new timestamp to move the platform to.
**kwargs (dict) – Additional arguments passed to the transition models.
- Return type:
None
- get_platform_state_at(timestamp)[source]
Get the platform state at a specific timestamp.
- Parameters:
timestamp (datetime) – The timestamp to query.
- Returns:
The platform state if found, otherwise None.
- Return type:
PlatformState or None
- get_host_state_at(timestamp)[source]
Get the host vehicle’s state at a specific timestamp.
- Parameters:
timestamp (datetime) – The timestamp to query.
- Returns:
The host state if found, otherwise None.
- Return type:
GroundTruthState or None
- get_sensor_states_at(timestamp)[source]
Get the states of all towed sensors at a specific timestamp.
- Parameters:
timestamp (datetime) – The timestamp to query.
- Returns:
A list of ground truth states for each sensor in order, or None if any sensor state is missing for the timestamp.
- Return type:
list[GroundTruthState] or None
- property host_path: ndarray[tuple[Any, ...], dtype[float64]] | None
Get the complete path of the host vehicle.
- Returns:
Array of shape
(N, D)containing host-position history, whereNis the number of time steps andDis spatial dimension. ReturnsNoneif no states exist.- Return type:
FloatArray | None
- property sensor_paths: list[ndarray[tuple[Any, ...], dtype[float64]]]
Get sensor position paths as a list of arrays.
- Returns:
One array per sensor, each containing position history over time.
- Return type:
list[FloatArray]