lighthouse_bs_vector


Classes

LighthouseBsVector

LighthouseBsVector(lh_v1_horiz_angle: float, lh_v1_vert_angle: float)

This class is representing a vector from a base station into space, in the base station reference frame. Typically the intersection of two light planes defined by angles measured by a base station. It also provides functionality to convert between lighthouse V1 angles, V2 angles and cartesian coordinates.

Initialize from lighthouse V1 angles

Parameters

Name Description
lh_v1_horiz_angle Horizontal sweep angle, 0 straight forward. Right (seen from the bs) is negative, left is positive
lh_v1_vert_angle Vertical sweep angle, 0 straight forward. Down is negative, up is positive.

Class variables

T

Static methods

def from_cart(cart_vector: list[float]) > cflib.localization.lighthouse_bs_vector.LighthouseBsVector

Create a LighthouseBsVector object from cartesian coordinates.

Parameters

Name Description
cart_vector (x, y, z) to a point

def from_lh2(lh_v2_angle_1: float, lh_v2_angle_2: float) > cflib.localization.lighthouse_bs_vector.LighthouseBsVector

Create a LighthouseBsVector object from lighthouse V2 angles

Parameters

Name Description
lh_v2_angle_1 First sweep angles, 0 straight ahead
lh_v2_angle_2 Second sweep angles, 0 straight ahead

def from_projection(proj_point: list[float]) > cflib.localization.lighthouse_bs_vector.LighthouseBsVector

Create a LighthouseBsVector object from the projection point on the plane x=1.0

Parameters

Name Description
projection point (y, z)

Instance variables

cart: numpy.ndarray

A normalized vector in cartesian coordinates


lh_v1_angle_pair: tuple

Lightouse V1 angle pair (horiz, vert)


lh_v1_horiz_angle: float

Lightouse V1 horizontal sweep angle


lh_v1_vert_angle: float

Lightouse V1 vertical sweep angle


lh_v2_angle_1: float

Lightouse V2 first sweep angle


lh_v2_angle_2: float

Lightouse V2 second sweep angle


projection: numpy.ndarray

The 2D point (y, z) when projected on the plane x=1.0 (one meter in front of the base station)


LighthouseBsVectors

LighthouseBsVectors(*args, **kwargs)

A list of 4 LighthouseBsVector, one for each sensor. LighthouseBsVectors is essentially the same as list[LighthouseBsVector]


Ancestors (in MRO)

  • builtins.list

Methods

def angle_list(self) > numpy.ndarray

Genereate a list of angles for all vectors, the order is horizontal, vertical, horizontal, vertical…


def projection_pair_list(self) > numpy.ndarray

Genereate a list of projection pairs for all vectors