lighthouse_sweep_angle_reader


Classes

LighthouseMatchedSweepAngleReader

LighthouseMatchedSweepAngleReader(cf: cflib.crazyflie.Crazyflie, data_recevied_cb, timeout_cb=None, sample_count: int = 1, min_bs: int = 2, max_time_ms: int = 25)

Wrapper to simplify reading of matched lighthouse sweep angles from the locSrv stream


Class variables

MATCHED_STREAM_MAX_TIME_PARAM

MATCHED_STREAM_MIN_BS_PARAM

MATCHED_STREAM_PARAM

NR_OF_SENSORS

Methods

def start(self, timeout: float = 0.0)

Start reading sweep angles

Args: timeout (float): timeout in seconds, 0.0 means no timeout


def stop(self)

Stop reading sweep angles


LighthouseSweepAngleAverageReader

LighthouseSweepAngleAverageReader(cf: cflib.crazyflie.Crazyflie, ready_cb: collections.abc.Callable[[dict[int, tuple[int, cflib.localization.lighthouse_bs_vector.LighthouseBsVectors]]], None])

Helper class to make it easy read sweep angles for multiple base stations and average the result


Methods

def is_collecting(self)

True if data collection is in progress


def start_angle_collection(self)

Start collecting angles. The process will terminate when nr_of_samples_required have been received


def stop_angle_collection(self)

Premature stop of data collection


LighthouseSweepAngleReader

LighthouseSweepAngleReader(cf: cflib.crazyflie.Crazyflie, data_recevied_cb)

Wrapper to simplify reading of lighthouse sweep angles from the locSrv stream


Class variables

ANGLE_STREAM_PARAM

NR_OF_SENSORS

Methods

def start(self)

Start reading sweep angles


def stop(self)

Stop reading sweep angles