aboutsummaryrefslogtreecommitdiff
path: root/apps/mathlib/math/Dcm.cpp
diff options
context:
space:
mode:
authorJames Goppert <james.goppert@gmail.com>2013-01-13 18:38:09 -0500
committerJames Goppert <james.goppert@gmail.com>2013-01-13 18:38:09 -0500
commit56e15ab1f42ce29ff0da429d85af4e07dabbb2ed (patch)
tree0c051be0fd7d08cce0d86885d99b944ec85ca4a5 /apps/mathlib/math/Dcm.cpp
parentea3ce8de85ca8167ed66b1b5894f25c695c96796 (diff)
downloadpx4-firmware-56e15ab1f42ce29ff0da429d85af4e07dabbb2ed.tar.gz
px4-firmware-56e15ab1f42ce29ff0da429d85af4e07dabbb2ed.tar.bz2
px4-firmware-56e15ab1f42ce29ff0da429d85af4e07dabbb2ed.zip
Working on comments.
Diffstat (limited to 'apps/mathlib/math/Dcm.cpp')
-rw-r--r--apps/mathlib/math/Dcm.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/mathlib/math/Dcm.cpp b/apps/mathlib/math/Dcm.cpp
index 467c6f34e..25f4913a6 100644
--- a/apps/mathlib/math/Dcm.cpp
+++ b/apps/mathlib/math/Dcm.cpp
@@ -138,25 +138,25 @@ int __EXPORT dcmTest()
Matrix::identity(3)));
// quaternion ctor
ASSERT(matrixEqual(
- Dcm(Quaternion(0.983347, 0.034271, 0.106021, 0.143572)),
- Dcm( 0.9362934, -0.2750958, 0.2183507,
- 0.2896295, 0.9564251, -0.0369570,
- -0.1986693, 0.0978434, 0.9751703)));
+ Dcm(Quaternion(0.983347f, 0.034271f, 0.106021f, 0.143572f)),
+ Dcm( 0.9362934f, -0.2750958f, 0.2183507f,
+ 0.2896295f, 0.9564251f, -0.0369570f,
+ -0.1986693f, 0.0978434f, 0.9751703f)));
// euler angle ctor
ASSERT(matrixEqual(
- Dcm(EulerAngles(0.1, 0.2, 0.3)),
- Dcm( 0.9362934, -0.2750958, 0.2183507,
- 0.2896295, 0.9564251, -0.0369570,
- -0.1986693, 0.0978434, 0.9751703)));
+ Dcm(EulerAngles(0.1f, 0.2f, 0.3f)),
+ Dcm( 0.9362934f, -0.2750958f, 0.2183507f,
+ 0.2896295f, 0.9564251f, -0.0369570f,
+ -0.1986693f, 0.0978434f, 0.9751703f)));
// rotations
Vector3 vB(1, 2, 3);
- ASSERT(vectorEqual(Vector3(-2, 1, 3),
- Dcm(EulerAngles(0, 0, M_PI_2_F))*vB));
- ASSERT(vectorEqual(Vector3(3, 2, -1),
- Dcm(EulerAngles(0, M_PI_2_F, 0))*vB));
- ASSERT(vectorEqual(Vector3(1, -3, 2),
- Dcm(EulerAngles(M_PI_2_F, 0, 0))*vB));
- ASSERT(vectorEqual(Vector3(3, 2, -1),
+ ASSERT(vectorEqual(Vector3(-2.0f, 1.0f, 3.0f),
+ Dcm(EulerAngles(0.0f, 0.0f, M_PI_2_F))*vB));
+ ASSERT(vectorEqual(Vector3(3.0f, 2.0f, -1.0f),
+ Dcm(EulerAngles(0.0f, M_PI_2_F, 0.0f))*vB));
+ ASSERT(vectorEqual(Vector3(1.0f, -3.0f, 2.0f),
+ Dcm(EulerAngles(M_PI_2_F, 0.0f, 0.0f))*vB));
+ ASSERT(vectorEqual(Vector3(3.0f, 2.0f, -1.0f),
Dcm(EulerAngles(
M_PI_2_F, M_PI_2_F, M_PI_2_F))*vB));
printf("PASS\n");