:mod:`km3modules.ahrs` ====================== .. py:module:: km3modules.ahrs .. autoapi-nested-parse:: AHRS calibration. .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: km3modules.ahrs.AHRSCalibrator Functions ~~~~~~~~~ .. autoapisummary:: km3modules.ahrs.fit_ahrs km3modules.ahrs.get_latest_ahrs_calibration km3modules.ahrs._extract_calibration .. data:: log .. py:class:: AHRSCalibrator Bases::class:`km3pipe.Module` Calculates AHRS yaw, pitch and roll from median A and H of an interval. .. !! processed by numpydoc !! .. method:: configure(self) .. method:: process(self, blob) .. method:: calibrate(self) Calculate yaw, pitch and roll from the median of A and H. After successful calibration, the `self.A` and `self.H` are reset. DOMs with missing AHRS pre-calibration data are skipped. :Returns: **dict: key=dom_id, value=tuple: (timestamp, du, floor, yaw, pitch, roll)** .. .. !! processed by numpydoc !! .. function:: fit_ahrs(A, H, Aoff, Arot, Hoff, Hrot) Calculate yaw, pitch and roll for given A/H and calibration set. Author: Vladimir Kulikovsky :Parameters: **A: list, tuple or numpy.array of shape (3,)** .. **H: list, tuple or numpy.array of shape (3,)** .. **Aoff: numpy.array of shape(3,)** .. **Arot: numpy.array of shape(3, 3)** .. **Hoff: numpy.array of shape(3,)** .. **Hrot: numpy.array of shape(3, 3)** .. :Returns: **yaw, pitch, roll** .. .. !! processed by numpydoc !! .. function:: get_latest_ahrs_calibration(clb_upi, max_version=3, db=None) Retrieve the latest AHRS calibration data for a given CLB :Parameters: **clb_upi: str** .. **max_version: int, maximum version to check, optional** .. **db: DBManager(), optional** .. :Returns: **Aoff: numpy.array with shape(3,)** .. **Arot: numpy.array with shape(3,3)** .. **Hoff: numpy.array with shape(3,)** .. **Hrot: numpy.array with shape(3,3)** .. **or None if no calibration found.** .. .. !! processed by numpydoc !!