def setUp(self) -> None: self.decimal_precision = 1e-7 g = np.array([0.0, 0.0, -1.0]) + np.random.randn( 3) * self.decimal_precision # Reference gravity vector + noise m = REFERENCE_MAGNETIC_VECTOR + np.random.randn( 3 ) * self.decimal_precision # Reference magnetic field vector + noise self.R = ahrs.DCM(rpy=np.random.random(3) * 90.0 - 45.0) self.Rg = self.R @ g self.Rm = self.R @ m
def setUp(self): self.R1 = ahrs.DCM(rpy=[10.0, -20.0, 30.0]) self.R2 = ahrs.DCM(rpy=[-10.0, 20.0, -30.0])
def setUp(self) -> None: self.R0 = ahrs.DCM() self.vector = np.random.random(3)*180-90 self.R = ahrs.DCM(rpy=self.vector)