pydistsim.network.sensor
Sensors provide a way for node to interact with its environment.
Sensors can also be used to satisfy algorithm prerequisites.
Generally sensors should incorporate some model of measurement insecurity that
is inherent in real world sensors. This is implemented as a
ProbabilityFunction.
Basic usage:
>>> node.compositeSensor = ('DistSensor','AoASensor')
>>> node.compositeSensor.sensors
(<pydistsim.network.sensor.DistSensor at 0x6d3fbb0>,
<pydistsim.network.sensor.AoASensor at 0x6d3f950>)
To manually set sensor parameters first make an sensor instance:
>>> import scipy.stats
>>> aoa_sensor = AoASensor({'pf': scipy.stats.norm, 'scale': 10*pi/180 })
>>> node.compositeSensor = (aoa_sensor,)
Functions
Decorator function that checks if node is in network. |
Classes
Provides azimuth between node and its neighbors. |
|
Wrap multiple sensors, coalesce results and return composite readout. |
|
Provides distance between node and its neighbors. |
|
Provides a way to get noisy reading. |
|
Abstract base class for all Sensors. |
|
Provides node's true position. |
Exceptions