Public Member Functions | Public Attributes | Private Member Functions
pymavlink.tools.quaterniontest.QuaternionBaseTest Class Reference
Inheritance diagram for pymavlink.tools.quaterniontest.QuaternionBaseTest:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def test_constructor
def test_conversion
def test_div
def test_inversed
def test_mul
def test_norm
def test_transform

Public Attributes

 quaternions

Private Member Functions

def _all_angles
def _all_quaternions
def _helper_test_constructor

Detailed Description

Class to test QuaternionBase

Definition at line 20 of file quaterniontest.py.


Constructor & Destructor Documentation

def pymavlink.tools.quaterniontest.QuaternionBaseTest.__init__ (   self,
  args,
  kwargs 
)
Constructor, set up some data that is reused in many tests

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 26 of file quaterniontest.py.


Member Function Documentation

def pymavlink.tools.quaterniontest.QuaternionBaseTest._all_angles (   self,
  step = np.radians(45) 
) [private]
Creates a list of all euler angles

:param step: stepsixe in radians
:returns: euler angles [[phi, thea, psi], [phi, theta, psi], ...]

Definition at line 130 of file quaterniontest.py.

Generate quaternions from all euler angles

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 144 of file quaterniontest.py.

def pymavlink.tools.quaterniontest.QuaternionBaseTest._helper_test_constructor (   self,
  q,
  euler,
  dcm 
) [private]
Helper function for constructor test

Calls constructor for the quaternion from q euler and dcm and checks
if the resulting converions are equivalent to the arguments.
The test for the euler angles is weak as the solution is not unique

:param q: quaternion 4x1, [w, x, y, z]
:param euler: [roll, pitch, yaw], needs to be equivalent to q
:param q: dcm 3x3, needs to be equivalent to q

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 63 of file quaterniontest.py.

Test the constructor functionality

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 31 of file quaterniontest.py.

Tests forward and backward conversions

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 148 of file quaterniontest.py.

Test division

Definition at line 181 of file quaterniontest.py.

Test inverse

Definition at line 165 of file quaterniontest.py.

Test multiplication

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 172 of file quaterniontest.py.

Definition at line 116 of file quaterniontest.py.

Test transform

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 189 of file quaterniontest.py.


Member Data Documentation

Reimplemented in pymavlink.tools.quaterniontest.QuaternionTest.

Definition at line 26 of file quaterniontest.py.


The documentation for this class was generated from the following file:


mavlink
Author(s): Lorenz Meier
autogenerated on Thu Jun 6 2019 19:01:58