State¶
State objects represent the immutable properties of a device at a specific point in time. They are being passed in between the different stages of processing and simulation pipelines instead of references to the actual device objects.
- class State(timestamp, pose, velocity, carrier_frequency, sampling_rate, antennas)[source]¶
Bases:
object
Base of all state data containers.
They describe the information available to different stages of the signal processing pipelines and are used to pass information to the corresponding signal processing algorithms.
- Parameters:
timestamp (float) – Global timestamp of the device state.
pose (Transformation) – Pose of the device with respect to the global coordinate system.
velocity (numpy.ndarray) – Velocity of the device in m/s.
carrier_frequency (float) – Carrier frequency of the device in Hz.
sampling_rate (float) – Sampling rate of the device in Hz.
antennas (AntennaArrayState) – State of the device’s antenna array.
- property antennas: AntennaArrayState¶
State of the device’s antenna array.
- property pose: Transformation¶
Global pose of the device.
- class DeviceState(device_id, timestamp, pose, velocity, carrier_frequency, sampling_rate, num_digital_transmit_ports, num_digital_receive_ports, antennas)[source]¶
Bases:
State
Data container representing the immutable physical state of a device.
Generated by calling the
state
property of aDevice
. In order to avoid confusion with the mutable state of the device, this class is immutable and only references the represented device by its memory address and time stamp.- Parameters:
device_id (int) – Unique identifier of the device this state represents.
timestamp (float) – Time stamp of the device state.
pose (Transformation) – Pose of the device with respect to the global coordinate system.
velocity (numpy.ndarray) – Velocity of the device in m/s.
carrier_frequency (float) – Carrier frequency of the device in Hz.
sampling_rate (float) – Sampling rate of the device in Hz.
num_digital_transmit_ports (int) – Number of digital transmit streams feeding into the device’s signal encoding layer. This is the number of streams expected to be generated by transmit DSP algorithms by default.
num_digital_receive_ports (int) – Number of digital receive streams emerging from the device’s signal decoding layer. This the number of streams expected to be feeding into receive DSP algorithms by default.
antennas (AntennaArrayState) – State of the device’s antenna array.
- static Basic(num_digital_transmit_ports=1, num_digital_receive_ports=1, carrier_frequency=0.0, sampling_rate=1.0, pose=None)[source]¶
Create a basic state initilized with default values.
Useful shorthand for debugging and testing.
- Parameters:
num_digital_transmit_ports (int, optional) – Number of digital transmit streams feeding into the device’s signal encoding layer. This is the number of streams expected to be generated by transmit DSP algorithms by default.
num_digital_receive_ports (int, optional) – Number of digital receive streams emerging from the device’s signal decoding layer. This the number of streams expected to be feeding into receive DSP algorithms by default.
carrier_frequency (float, optional) – Carrier frequency of the device in Hz. If not specified, base band is assumed.
sampling_rate (float, optional) – Sampling rate of the device in Hz. If not specified, 1 Hz is assumed.
pose (Transformation, optional) – Pose of the device with respect to the global coordinate system. If not specified, the identity transformation is assumed, so the device is located in the origin.
- Return type:
Returns: The initialized state.
- receive_state(selected_digital_receive_ports=None)[source]¶
Generate a device state for reception.
- Parameters:
selected_digital_receive_ports (Sequence[int], optional) – Indices of the selected digital receive ports. If not specified, all available receive ports will be considered.
- Return type:
- transmit_state(selected_digital_transmit_ports=None)[source]¶
Generate a device state for transmission.
- Parameters:
selected_digital_transmit_ports (Sequence[int], optional) – Indices of the selected digital transmit ports. If not specified, all available transmit ports will be considered.
- Return type:
- property num_digital_receive_ports: int¶
Number of digital receive streams emerging from the device’s signal decoding layer.
This the number of streams expected to be feeding into receive DSP algorithms by default.
- class TransmitState(timestamp, pose, velocity, carrier_frequency, sampling_rate, antennas, num_digital_transmit_ports)[source]¶
Bases:
State
State of a during transmit signal processing.
Generated by calling the
transmit_state
method of aDeviceState
.- Parameters:
timestamp (float) – Global timestamp of the device state.
pose (Transformation) – Pose of the device with respect to the global coordinate system.
velocity (numpy.ndarray) – Velocity of the device in m/s.
carrier_frequency (float) – Carrier frequency of the device in Hz.
sampling_rate (float) – Sampling rate of the device in Hz.
antennas (AntennaArrayState) – State of the device’s antenna array.
num_digital_transmit_ports (int) – Number of digital transmit streams to be generated by the signal processing algorithm.
- class ReceiveState(timestamp, pose, velocity, carrier_frequency, sampling_rate, antennas, num_digital_receive_ports)[source]¶
Bases:
State
State of a device during receive signal processing.
Generated by calling the
receive_state
method of aDeviceState
.- Parameters:
timestamp (float) – Global timestamp of the device state.
pose (Transformation) – Pose of the device with respect to the global coordinate system.
velocity (numpy.ndarray) – Velocity of the device in m/s.
carrier_frequency (float) – Carrier frequency of the device in Hz.
sampling_rate (float) – Sampling rate of the device in Hz.
antennas (AntennaArrayState) – State of the device’s antenna array.
num_digital_receive_ports (int) – Number of digital receive streams to be consumed by the signal processing algorithm.