ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
orientation.h
Go to the documentation of this file.
1 // Copyright (c) 2014, Freescale Semiconductor, Inc.
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name of Freescale Semiconductor, Inc. nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 // DISCLAIMED. IN NO EVENT SHALL FREESCALE SEMICONDUCTOR, INC. BE LIABLE FOR ANY
19 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 //
26 #ifndef ORIENTATION_H
27 #define ORIENTATION_H
28 
29 // function prototypes
30 void f3DOFTiltNED(float fR[][3], float fGp[]);
31 void f3DOFTiltAndroid(float fR[][3], float fGp[]);
32 void f3DOFTiltWin8(float fR[][3], float fGp[]);
33 void f3DOFMagnetometerMatrixNED(float fR[][3], float fBc[]);
34 void f3DOFMagnetometerMatrixAndroid(float fR[][3], float fBc[]);
35 void f3DOFMagnetometerMatrixWin8(float fR[][3], float fBc[]);
36 void feCompassNED(float fR[][3], float *pfDelta, float fBc[], float fGp[]);
37 void feCompassAndroid(float fR[][3], float *pfDelta, float fBc[], float fGp[]);
38 void feCompassWin8(float fR[][3], float *pfDelta, float fBc[], float fGp[]);
39 void fNEDAnglesDegFromRotationMatrix(float R[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg,
40  float *pfRhoDeg, float *pfChiDeg);
41 void fAndroidAnglesDegFromRotationMatrix(float R[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg,
42  float *pfRhoDeg, float *pfChiDeg);
43 void fWin8AnglesDegFromRotationMatrix(float R[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg,
44  float *pfRhoDeg, float *pfChiDeg);
45 void fQuaternionFromRotationMatrix(float R[][3], struct fquaternion *pq);
46 void fRotationMatrixFromQuaternion(float R[][3], const struct fquaternion *pq);
47 void fLPFScalar(float *pfS, float *pfLPS, float flpf, int32 loopcounter);
48 void qAeqBxC(struct fquaternion *pqA, const struct fquaternion *pqB, const struct fquaternion *pqC);
49 void qAeqAxB(struct fquaternion *pqA, const struct fquaternion *pqB);
50 struct fquaternion qconjgAxB(const struct fquaternion *pqA, const struct fquaternion *pqB);
51 void fqAeqNormqA(struct fquaternion *pqA);
52 void fqAeq1(struct fquaternion *pqA);
53 void fRotationVectorDegFromRotationMatrix(float R[][3], float rvecdeg[]);
54 void fQuaternionFromRotationVectorDeg(struct fquaternion *pq, const float rvecdeg[], float fscaling);
55 void fRotationVectorDegFromQuaternion(struct fquaternion *pq, float rvecdeg[]);
56 void fLPFOrientationQuaternion(struct fquaternion *pq, struct fquaternion *pLPq, float flpf, float fdeltat,
57  float fOmega[], int32 loopcounter);
58 
59 #endif // #ifndef ORIENTATION_H
void f3DOFMagnetometerMatrixAndroid(float fR[][3], float fBc[])
Definition: orientation.c:225
void fqAeqNormqA(struct fquaternion *pqA)
Definition: orientation.c:1056
void qAeqAxB(struct fquaternion *pqA, const struct fquaternion *pqB)
Definition: orientation.c:1026
void fqAeq1(struct fquaternion *pqA)
Definition: orientation.c:1091
void fLPFScalar(float *pfS, float *pfLPS, float flpf, int32 loopcounter)
Definition: orientation.c:1000
void f3DOFTiltWin8(float fR[][3], float fGp[])
Definition: orientation.c:123
void fQuaternionFromRotationMatrix(float R[][3], struct fquaternion *pq)
Definition: orientation.c:734
void f3DOFTiltAndroid(float fR[][3], float fGp[])
Definition: orientation.c:114
void feCompassNED(float fR[][3], float *pfDelta, float fBc[], float fGp[])
Definition: orientation.c:262
void fRotationVectorDegFromRotationMatrix(float R[][3], float rvecdeg[])
Definition: orientation.c:813
void feCompassAndroid(float fR[][3], float *pfDelta, float fBc[], float fGp[])
Definition: orientation.c:330
void f3DOFMagnetometerMatrixWin8(float fR[][3], float fBc[])
Definition: orientation.c:253
void fAndroidAnglesDegFromRotationMatrix(float R[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg, float *pfRhoDeg, float *pfChiDeg)
Definition: orientation.c:520
void fLPFOrientationQuaternion(struct fquaternion *pq, struct fquaternion *pLPq, float flpf, float fdeltat, float fOmega[], int32 loopcounter)
Definition: orientation.c:932
void qAeqBxC(struct fquaternion *pqA, const struct fquaternion *pqB, const struct fquaternion *pqC)
Definition: orientation.c:1015
void f3DOFTiltNED(float fR[][3], float fGp[])
Definition: orientation.c:48
void fQuaternionFromRotationVectorDeg(struct fquaternion *pq, const float rvecdeg[], float fscaling)
Definition: orientation.c:666
struct fquaternion qconjgAxB(const struct fquaternion *pqA, const struct fquaternion *pqB)
Definition: orientation.c:1043
long int32
This defines int32 as long.
Definition: isf_types.h:32
void fWin8AnglesDegFromRotationMatrix(float R[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg, float *pfRhoDeg, float *pfChiDeg)
Definition: orientation.c:575
void fRotationVectorDegFromQuaternion(struct fquaternion *pq, float rvecdeg[])
Definition: orientation.c:882
void fNEDAnglesDegFromRotationMatrix(float R[][3], float *pfPhiDeg, float *pfTheDeg, float *pfPsiDeg, float *pfRhoDeg, float *pfChiDeg)
Definition: orientation.c:466
void f3DOFMagnetometerMatrixNED(float fR[][3], float fBc[])
Definition: orientation.c:197
void fRotationMatrixFromQuaternion(float R[][3], const struct fquaternion *pq)
Definition: orientation.c:775
void feCompassWin8(float fR[][3], float *pfDelta, float fBc[], float fGp[])
Definition: orientation.c:398