Public Member Functions | Public Attributes | Private Member Functions | List of all members
test_quaternion.QuaternionBaseTest Class Reference
Inheritance diagram for test_quaternion.QuaternionBaseTest:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, args, kwargs)
 
def test_constructor (self)
 
def test_conversion (self)
 
def test_div (self)
 
def test_inversed (self)
 
def test_mul (self)
 
def test_norm (self)
 
def test_transform (self)
 

Public Attributes

 quaternions
 

Private Member Functions

def _all_angles (self, step=np.radians(45))
 
def _all_quaternions (self)
 
def _helper_test_constructor (self, q, euler, dcm)
 

Detailed Description

Class to test QuaternionBase

Definition at line 20 of file test_quaternion.py.

Constructor & Destructor Documentation

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

Definition at line 26 of file test_quaternion.py.

Member Function Documentation

def test_quaternion.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 test_quaternion.py.

def test_quaternion.QuaternionBaseTest._all_quaternions (   self)
private
Generate quaternions from all euler angles

Definition at line 144 of file test_quaternion.py.

def test_quaternion.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

Definition at line 63 of file test_quaternion.py.

def test_quaternion.QuaternionBaseTest.test_constructor (   self)
Test the constructor functionality

Definition at line 31 of file test_quaternion.py.

def test_quaternion.QuaternionBaseTest.test_conversion (   self)
Tests forward and backward conversions

Definition at line 148 of file test_quaternion.py.

def test_quaternion.QuaternionBaseTest.test_div (   self)
Test division

Definition at line 181 of file test_quaternion.py.

def test_quaternion.QuaternionBaseTest.test_inversed (   self)
Test inverse

Definition at line 165 of file test_quaternion.py.

def test_quaternion.QuaternionBaseTest.test_mul (   self)
Test multiplication

Definition at line 172 of file test_quaternion.py.

def test_quaternion.QuaternionBaseTest.test_norm (   self)

Definition at line 116 of file test_quaternion.py.

def test_quaternion.QuaternionBaseTest.test_transform (   self)
Test transform

Definition at line 189 of file test_quaternion.py.

Member Data Documentation

test_quaternion.QuaternionBaseTest.quaternions

Definition at line 29 of file test_quaternion.py.


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


mavlink
Author(s): Lorenz Meier
autogenerated on Sun Jul 7 2019 03:22:08