lighthouse_system_scaler


Classes

LighthouseSystemScaler

LighthouseSystemScaler()

This class is used to re-scale a system based on various measurements.


Static methods

def calc_intersection_distance(vector1: LighthouseBsVector, vector2: LighthouseBsVector, bs_pose: Pose, cf_pose: Pose) > float

Calculate distance between intersection points of rays on the plane defined by the lighthouse deck


def calc_intersection_point(vector: LighthouseBsVector, bs_pose: Pose, cf_pose: Pose) > numpy.ndarray

Calculate the intersetion point of a lines and a plane. The line is the intersection of the two light planes from a base station, while the plane is defined by the lighthouse deck of the Crazyflie.


def scale_diagonals(bs_poses: dict[int, Pose], cf_poses: list[Pose], matched_samples: list[LhCfPoseSample], expected_diagonal: float) > tuple

Scale a system based on where base station “rays” intersects the lighthouse deck in relation to sensor positions. Calculates the intersection points for all samples and scales the system to match the expected distance between sensors on the deck.

Parameters

Name Description
bs_poses a dictionary with the base station poses in the current reference frame
cf_poses List of CF poses
matched_samples List of samples. Length must be the same as cf_poses.:return: a tuple containing a dictionary with the base station poses in the scaled system, a list of Crazyflie poses in the scaled system and the scaling factor

def scale_fixed_point(bs_poses: dict[int, Pose], cf_poses: list[Pose], expected: npt.ArrayLike, actual: Pose) > tuple

Scale a system based on a position in the physical world in relation to where it is in the estimated system geometry. Assume the system is aligned and simply use the distance to the points for scaling.

Parameters

Name Description
bs_poses a dictionary with the base station poses in the current reference frame
cf_poses List of CF poses
expected The real world position to use as reference
actual The estimated position in the current system geometry:return: a tuple containing a dictionary with the base station poses in the scaled system, a list of Crazyflie poses in the scaled system and the scaling factor