bleNaviPy.beacon.beacon module

This is a module for beacon geometry

class bleNaviPy.beacon.beacon.Beacon(location: bleNaviPy.indoorGML.geometry.pointGeometry.Point, beacon_type: Union[bleNaviPy.beacon.beacon.BeaconTypeEnum, bleNaviPy.beacon.beacon.BeaconType] = <BeaconTypeEnum.GENERIC: 'generic'>)

Bases: object

Class beacon Contains information about location of beacon

beaconType = {<BeaconTypeEnum.GENERIC: 'generic'>: <bleNaviPy.beacon.beacon.BeaconType object>}
getDict() → dict

Get save ready beacon dictionary

Returns

save ready beacon dictionary

Return type

dict

getDistanceByRSSI(rssi: float, scale: float = 1) → float

Get distance from a beacon by rssi

Parameters
  • rssi (float) – Signal strength

  • scale (float, optional) – Floor scale. Defaults to 1.

Returns

Distance from beacon using a map units

Return type

float

getRSSI(location: bleNaviPy.indoorGML.geometry.pointGeometry.Point, scale: float = 1, is_wall: bool = False, noise: bool = False) → float

Calculate RSSI on given location

Parameters
  • location (Location)

  • scale (float, optional) – Floor scale. Defaults to 1.

  • is_wall (bool, optional) – Is wall on a way. Defaults to False.

  • noise (bool, optional) – Should noise be added to a signal. Defaults to False.

Returns

RSSI in dB

Return type

float

class bleNaviPy.beacon.beacon.BeaconType(rssi_1: int, n: float, n_wall: float, noise_var: float)

Bases: object

Beacon type with default data

class bleNaviPy.beacon.beacon.BeaconTypeEnum(value)

Bases: enum.Enum

Beacon types enum

Parameters

Enum

GENERIC = 'generic'