def _process(self, g, m): z = g / vectors.norm(g) x = m - (z * vectors.dot(m, z)) x /= vectors.norm(x) y = vectors.cross(z, x) return Quaternion.fromVectors(x, y, z)
def _process(self, g, m): z = g / vectors.norm(g) x = m - (z * vectors.dot(m, z)) x /= vectors.norm(x) y = vectors.cross(z, x) return Quaternion.fromVectors(x, y, z)
def _process(self, g, m): """ Estimate the orientation Quaternion from the observed vectors. @param g: the observed gravitational field vector (3x1 L{np.ndarray}) @param m: the observed magnetic field vector (3x1 L{np.ndarray}) @return: The estimated orientation L{Quaternion} """ z = g / vectors.norm(g) y = vectors.cross(z, m) y /= vectors.norm(y) x = vectors.cross(y, z) return Quaternion.fromVectors(x, y, z)
def _process(self, g, m): """ Estimate the orientation Quaternion from the observed vectors. @param g: the observed gravitational field vector (3x1 L{np.ndarray}) @param m: the observed magnetic field vector (3x1 L{np.ndarray}) @return: The estimated orientation L{Quaternion} """ z = g / vectors.norm(g) y = vectors.cross(z, m) y /= vectors.norm(y) x = vectors.cross(y, z) return Quaternion.fromVectors(x, y, z)