├── OrientEstimation_AEKF ├── jni │ ├── AHRS │ │ ├── Eigen │ │ │ ├── src │ │ │ │ ├── Sparse │ │ │ │ │ ├── SparseAssign.h │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── SparseFuzzy.h │ │ │ │ │ ├── SparseRedux.h │ │ │ │ │ ├── SparseTranspose.h │ │ │ │ │ ├── CoreIterators.h │ │ │ │ │ └── SparseDot.h │ │ │ │ ├── Core │ │ │ │ │ ├── util │ │ │ │ │ │ ├── EnableMSVCWarnings.h │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── DisableMSVCWarnings.h │ │ │ │ │ ├── arch │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── NEON │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ ├── SSE │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ ├── AltiVec │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ └── Default │ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ │ └── Settings.h │ │ │ │ │ ├── products │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── QR │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SVD │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── misc │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Solve.h │ │ │ │ ├── Jacobi │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── LU │ │ │ │ │ ├── arch │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── plugins │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── CommonCwiseBinaryOps.h │ │ │ │ │ └── MatrixCwiseUnaryOps.h │ │ │ │ ├── Cholesky │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Eigenvalues │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── EigenvaluesCommon.h │ │ │ │ ├── Householder │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── BlockHouseholder.h │ │ │ │ ├── StlSupport │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── details.h │ │ │ │ ├── Eigen2Support │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── TriangularSolver.h │ │ │ │ │ └── Lazy.h │ │ │ │ └── Geometry │ │ │ │ │ ├── arch │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── EulerAngles.h │ │ │ ├── Eigen │ │ │ ├── README │ │ │ ├── Dense │ │ │ ├── Array │ │ │ ├── Householder │ │ │ ├── QtAlignedMalloc │ │ │ ├── Jacobi │ │ │ ├── SVD │ │ │ ├── Cholesky │ │ │ ├── QR │ │ │ ├── LU │ │ │ ├── Eigenvalues │ │ │ ├── StdList │ │ │ ├── StdDeque │ │ │ ├── StdVector │ │ │ ├── Geometry │ │ │ ├── Sparse │ │ │ └── Eigen2Support │ │ ├── Android.mk │ │ ├── EKF │ │ │ └── EKF.h │ │ └── AHRSModuleExport.cpp │ ├── Android.mk │ └── Application.mk ├── lint.xml ├── res │ ├── drawable │ │ └── pp_logo1.png │ └── values │ │ └── strings.xml ├── .settings │ ├── org.eclipse.ltk.core.refactoring.prefs │ └── org.eclipse.jdt.core.prefs ├── gen │ └── org │ │ └── put │ │ └── dg │ │ └── orientAEKFEigen │ │ ├── BuildConfig.java │ │ └── R.java ├── .classpath ├── project.properties ├── AndroidManifest.xml ├── LICENSE ├── src │ └── org │ │ └── put │ │ └── dg │ │ └── inertialSensors │ │ ├── AHRSModule.java │ │ └── InertialSensors.java └── .project ├── OrientEstimation_EKF_EIGEN ├── jni │ ├── AHRS │ │ ├── Eigen │ │ │ ├── src │ │ │ │ ├── Sparse │ │ │ │ │ ├── SparseAssign.h │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── SparseFuzzy.h │ │ │ │ │ ├── SparseRedux.h │ │ │ │ │ ├── SparseTranspose.h │ │ │ │ │ ├── CoreIterators.h │ │ │ │ │ └── SparseDot.h │ │ │ │ ├── Core │ │ │ │ │ ├── util │ │ │ │ │ │ ├── EnableMSVCWarnings.h │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── DisableMSVCWarnings.h │ │ │ │ │ ├── arch │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── NEON │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ ├── SSE │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ ├── AltiVec │ │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ │ └── Default │ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ │ └── Settings.h │ │ │ │ │ ├── products │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── QR │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── SVD │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── misc │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── Solve.h │ │ │ │ ├── Jacobi │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── LU │ │ │ │ │ ├── arch │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── plugins │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── CommonCwiseBinaryOps.h │ │ │ │ │ └── MatrixCwiseUnaryOps.h │ │ │ │ ├── Cholesky │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── Eigenvalues │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── EigenvaluesCommon.h │ │ │ │ ├── Householder │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── StlSupport │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── details.h │ │ │ │ ├── Eigen2Support │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── TriangularSolver.h │ │ │ │ │ └── Lazy.h │ │ │ │ └── Geometry │ │ │ │ │ ├── arch │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── EulerAngles.h │ │ │ ├── Eigen │ │ │ ├── README │ │ │ ├── Dense │ │ │ ├── Array │ │ │ ├── Householder │ │ │ ├── QtAlignedMalloc │ │ │ ├── Jacobi │ │ │ ├── SVD │ │ │ ├── Cholesky │ │ │ ├── QR │ │ │ ├── LU │ │ │ ├── Eigenvalues │ │ │ ├── StdList │ │ │ ├── StdDeque │ │ │ ├── StdVector │ │ │ ├── Geometry │ │ │ ├── Sparse │ │ │ └── Eigen2Support │ │ ├── Android.mk │ │ ├── EKF │ │ │ └── EKF.h │ │ └── AHRSModuleExport.cpp │ ├── Android.mk │ └── Application.mk ├── lint.xml ├── res │ ├── drawable │ │ └── pp_logo1.png │ └── values │ │ └── strings.xml ├── .settings │ ├── org.eclipse.ltk.core.refactoring.prefs │ └── org.eclipse.jdt.core.prefs ├── gen │ └── org │ │ └── put │ │ └── dg │ │ └── orientEigen │ │ ├── BuildConfig.java │ │ └── R.java ├── .classpath ├── project.properties ├── AndroidManifest.xml ├── LICENSE ├── src │ └── org │ │ └── put │ │ └── dg │ │ └── inertialSensors │ │ ├── AHRSModule.java │ │ └── InertialSensors.java └── .project ├── OrientEstimation_EKF_OpenCV ├── jni │ ├── Android.mk │ ├── Application.mk │ └── AHRS │ │ ├── Android.mk │ │ ├── EKF │ │ └── EKF.h │ │ └── AHRSModuleExport.cpp ├── lint.xml ├── res │ ├── drawable │ │ └── pp_logo1.png │ └── values │ │ └── strings.xml ├── .settings │ ├── org.eclipse.ltk.core.refactoring.prefs │ └── org.eclipse.jdt.core.prefs ├── gen │ └── org │ │ ├── put │ │ └── dg │ │ │ └── orientOpenCV │ │ │ └── BuildConfig.java │ │ └── opencv │ │ └── R.java ├── .classpath ├── project.properties ├── AndroidManifest.xml ├── LICENSE ├── src │ └── org │ │ └── put │ │ └── dg │ │ └── inertialSensors │ │ ├── AHRSModule.java │ │ └── InertialSensors.java └── .project ├── OrientEstimation_AEKF.apk ├── OrientEstimation_EKF_EIGEN.apk ├── OrientEstimation_EKF_OpenCV.apk ├── LICENSE └── README.md /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Sparse/SparseAssign.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/SparseAssign.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | #include "Sparse" 3 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | #include "Sparse" 3 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichalNowicki/PUT_AndroidOrientation/HEAD/OrientEstimation_AEKF.apk -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichalNowicki/PUT_AndroidOrientation/HEAD/OrientEstimation_EKF_EIGEN.apk -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/util/EnableMSVCWarnings.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef _MSC_VER 3 | #pragma warning( pop ) 4 | #endif 5 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichalNowicki/PUT_AndroidOrientation/HEAD/OrientEstimation_EKF_OpenCV.apk -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/util/EnableMSVCWarnings.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef _MSC_VER 3 | #pragma warning( pop ) 4 | #endif 5 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/README: -------------------------------------------------------------------------------- 1 | The Eigen library for Android was downloaded from the repository at: 2 | https://bitbucket.org/erublee/eigen-android/ -------------------------------------------------------------------------------- /OrientEstimation_AEKF/res/drawable/pp_logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichalNowicki/PUT_AndroidOrientation/HEAD/OrientEstimation_AEKF/res/drawable/pp_logo1.png -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/README: -------------------------------------------------------------------------------- 1 | The Eigen library for Android was downloaded from the repository at: 2 | https://bitbucket.org/erublee/eigen-android/ -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(SSE) 2 | ADD_SUBDIRECTORY(AltiVec) 3 | ADD_SUBDIRECTORY(NEON) 4 | ADD_SUBDIRECTORY(Default) 5 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/res/drawable/pp_logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichalNowicki/PUT_AndroidOrientation/HEAD/OrientEstimation_EKF_EIGEN/res/drawable/pp_logo1.png -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/res/drawable/pp_logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichalNowicki/PUT_AndroidOrientation/HEAD/OrientEstimation_EKF_OpenCV/res/drawable/pp_logo1.png -------------------------------------------------------------------------------- /OrientEstimation_AEKF/.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(SSE) 2 | ADD_SUBDIRECTORY(AltiVec) 3 | ADD_SUBDIRECTORY(NEON) 4 | ADD_SUBDIRECTORY(Default) 5 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/QR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_QR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_QR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/QR COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_OPTIM := release 2 | APP_STL := gnustl_shared 3 | APP_CPPFLAGS := -frtti -fexceptions 4 | APP_ABI := armeabi-v7a 5 | APP_PLATFORM := android-8 6 | APP_MODULES := AHRSModule -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/SVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SVD_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SVD_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SVD COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/QR/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_QR_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_QR_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/QR COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_OPTIM := release 2 | APP_STL := gnustl_shared 3 | APP_CPPFLAGS := -frtti -fexceptions 4 | APP_ABI := armeabi-v7a 5 | APP_PLATFORM := android-8 6 | APP_MODULES := AHRSModule -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_OPTIM := release 2 | APP_STL := gnustl_shared 3 | APP_CPPFLAGS := -frtti -fexceptions 4 | APP_ABI := armeabi-v7a 5 | APP_PLATFORM := android-8 6 | APP_MODULES := AHRSModule -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_misc_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_misc_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/misc COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/SVD/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_SVD_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_SVD_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/SVD COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Jacobi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Jacobi_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Jacobi_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Jacobi COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_misc_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_misc_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/misc COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB Eigen_src_subdirectories "*") 2 | foreach(f ${Eigen_src_subdirectories}) 3 | if(NOT f MATCHES ".txt") 4 | add_subdirectory(${f}) 5 | endif() 6 | endforeach() 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/LU/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Sparse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Sparse_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Sparse_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Sparse COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_plugins_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_plugins_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/plugins COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Jacobi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Jacobi_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Jacobi_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Jacobi COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Cholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Cholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Cholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Cholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB Eigen_src_subdirectories "*") 2 | foreach(f ${Eigen_src_subdirectories}) 3 | if(NOT f MATCHES ".txt") 4 | add_subdirectory(${f}) 5 | endif() 6 | endforeach() 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/LU/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Sparse_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Sparse_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Sparse COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_plugins_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_plugins_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/plugins COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_util_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_util_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/util COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Cholesky/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Cholesky_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Cholesky_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Cholesky COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Eigenvalues/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_EIGENVALUES_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Householder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Householder_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Householder_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Householder COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/LU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/StlSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_StlSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_StlSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/StlSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_util_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_util_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/util COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/gen/org/put/dg/orientAEKFEigen/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package org.put.dg.orientAEKFEigen; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/gen/org/put/dg/orientEigen/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package org.put.dg.orientEigen; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Eigenvalues/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_EIGENVALUES_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_EIGENVALUES_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigenvalues COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Householder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Householder_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Householder_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Householder COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/LU/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_LU_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_LU_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/LU COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/StlSupport/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_StlSupport_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_StlSupport_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/StlSupport COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/gen/org/put/dg/orientOpenCV/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package org.put.dg.orientOpenCV; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/arch/NEON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_NEON_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_NEON_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/NEON COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/arch/SSE/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_SSE_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_SSE_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/SSE COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/products/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_Product_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_Product_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/products COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Eigen2Support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Geometry/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Orientation AEKF 4 | Contact: michal.nowicki@put.poznan.pl 5 | 6 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/arch/NEON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_NEON_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_NEON_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/NEON COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/arch/SSE/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_SSE_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_SSE_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/SSE COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/products/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_Product_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_Product_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/products COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Eigen2Support/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Eigen2Support_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Eigen2Support_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Eigen2Support COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Geometry/arch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_arch_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_arch_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry/arch COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Orientation Eigen 4 | Contact: michal.nowicki@put.poznan.pl 5 | 6 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Orientation OpenCV 4 | Contact: michal.nowicki@put.poznan.pl 5 | 6 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/arch/AltiVec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_AltiVec_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_AltiVec_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/AltiVec COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/arch/Default/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_Default_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_Default_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/Default COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Geometry_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Geometry_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Geometry COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(arch) 9 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/arch/AltiVec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_AltiVec_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_AltiVec_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/AltiVec COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/arch/Default/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_arch_Default_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_arch_Default_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core/arch/Default COMPONENT Devel 6 | ) 7 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # Extended Kalman Filter library 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := AHRSModule 7 | LOCAL_SRC_FILES := EKF/EKF.cpp AHRSModuleExport.cpp 8 | LOCAL_LDLIBS += -llog -ldl 9 | 10 | include $(BUILD_SHARED_LIBRARY) -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # Extended Kalman Filter library 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := AHRSModule 7 | LOCAL_SRC_FILES := EKF/EKF.cpp AHRSModuleExport.cpp 8 | LOCAL_LDLIBS += -llog -ldl 9 | 10 | include $(BUILD_SHARED_LIBRARY) -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(products) 9 | ADD_SUBDIRECTORY(util) 10 | ADD_SUBDIRECTORY(arch) 11 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FILE(GLOB Eigen_Core_SRCS "*.h") 2 | 3 | INSTALL(FILES 4 | ${Eigen_Core_SRCS} 5 | DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen/src/Core COMPONENT Devel 6 | ) 7 | 8 | ADD_SUBDIRECTORY(products) 9 | ADD_SUBDIRECTORY(util) 10 | ADD_SUBDIRECTORY(arch) 11 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/jni/AHRS/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # Extended Kalman Filter library 4 | include $(CLEAR_VARS) 5 | include C:/DiamentowyGrant/OpenCV-2.4.10-android-sdk/sdk/native/jni/OpenCV.mk 6 | 7 | LOCAL_MODULE := AHRSModule 8 | LOCAL_SRC_FILES := EKF/EKF.cpp AHRSModuleExport.cpp 9 | LOCAL_LDLIBS += -llog -ldl 10 | 11 | include $(BUILD_SHARED_LIBRARY) -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Array: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ARRAY_MODULE_H 2 | #define EIGEN_ARRAY_MODULE_H 3 | 4 | #ifdef _MSC_VER 5 | #pragma message("The inclusion of Eigen/Array is deprecated. \ 6 | The array module is available as soon as Eigen/Core is included.") 7 | #elif __GNUC__ 8 | #warning "The inclusion of Eigen/Array is deprecated. \ 9 | The array module is available as soon as Eigen/Core is included." 10 | #endif 11 | 12 | #include "Core" 13 | 14 | #endif // EIGEN_ARRAY_MODULE_H 15 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Array: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_ARRAY_MODULE_H 2 | #define EIGEN_ARRAY_MODULE_H 3 | 4 | #ifdef _MSC_VER 5 | #pragma message("The inclusion of Eigen/Array is deprecated. \ 6 | The array module is available as soon as Eigen/Core is included.") 7 | #elif __GNUC__ 8 | #warning "The inclusion of Eigen/Array is deprecated. \ 9 | The array module is available as soon as Eigen/Core is included." 10 | #endif 11 | 12 | #include "Core" 13 | 14 | #endif // EIGEN_ARRAY_MODULE_H 15 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-15 15 | android.library=false 16 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-15 15 | android.library=false 16 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.6 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-18 15 | android.library.reference.1=../../DiamentowyGrant/OpenCV-2.4.10-android-sdk/sdk/java 16 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Householder: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 2 | #define EIGEN_HOUSEHOLDER_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup Householder_Module Householder module 11 | * This module provides Householder transformations. 12 | * 13 | * \code 14 | * #include 15 | * \endcode 16 | */ 17 | 18 | #include "src/Householder/Householder.h" 19 | #include "src/Householder/HouseholderSequence.h" 20 | #include "src/Householder/BlockHouseholder.h" 21 | 22 | } // namespace Eigen 23 | 24 | #include "src/Core/util/EnableMSVCWarnings.h" 25 | 26 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 27 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 28 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Householder: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 2 | #define EIGEN_HOUSEHOLDER_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup Householder_Module Householder module 11 | * This module provides Householder transformations. 12 | * 13 | * \code 14 | * #include 15 | * \endcode 16 | */ 17 | 18 | #include "src/Householder/Householder.h" 19 | #include "src/Householder/HouseholderSequence.h" 20 | #include "src/Householder/BlockHouseholder.h" 21 | 22 | } // namespace Eigen 23 | 24 | #include "src/Core/util/EnableMSVCWarnings.h" 25 | 26 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 27 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 28 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EIGEN_QTMALLOC_MODULE_H 3 | #define EIGEN_QTMALLOC_MODULE_H 4 | 5 | #include "Core" 6 | 7 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 8 | 9 | #include "src/Core/util/DisableMSVCWarnings.h" 10 | 11 | void *qMalloc(size_t size) 12 | { 13 | return Eigen::ei_aligned_malloc(size); 14 | } 15 | 16 | void qFree(void *ptr) 17 | { 18 | Eigen::ei_aligned_free(ptr); 19 | } 20 | 21 | void *qRealloc(void *ptr, size_t size) 22 | { 23 | void* newPtr = Eigen::ei_aligned_malloc(size); 24 | memcpy(newPtr, ptr, size); 25 | Eigen::ei_aligned_free(ptr); 26 | return newPtr; 27 | } 28 | 29 | #include "src/Core/util/EnableMSVCWarnings.h" 30 | 31 | #endif 32 | 33 | #endif // EIGEN_QTMALLOC_MODULE_H 34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 35 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | 2 | #ifndef EIGEN_QTMALLOC_MODULE_H 3 | #define EIGEN_QTMALLOC_MODULE_H 4 | 5 | #include "Core" 6 | 7 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 8 | 9 | #include "src/Core/util/DisableMSVCWarnings.h" 10 | 11 | void *qMalloc(size_t size) 12 | { 13 | return Eigen::ei_aligned_malloc(size); 14 | } 15 | 16 | void qFree(void *ptr) 17 | { 18 | Eigen::ei_aligned_free(ptr); 19 | } 20 | 21 | void *qRealloc(void *ptr, size_t size) 22 | { 23 | void* newPtr = Eigen::ei_aligned_malloc(size); 24 | memcpy(newPtr, ptr, size); 25 | Eigen::ei_aligned_free(ptr); 26 | return newPtr; 27 | } 28 | 29 | #include "src/Core/util/EnableMSVCWarnings.h" 30 | 31 | #endif 32 | 33 | #endif // EIGEN_QTMALLOC_MODULE_H 34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 35 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_JACOBI_MODULE_H 2 | #define EIGEN_JACOBI_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup Jacobi_Module Jacobi module 11 | * This module provides Jacobi and Givens rotations. 12 | * 13 | * \code 14 | * #include 15 | * \endcode 16 | * 17 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 18 | * - MatrixBase::applyOnTheLeft() 19 | * - MatrixBase::applyOnTheRight(). 20 | */ 21 | 22 | #include "src/Jacobi/Jacobi.h" 23 | 24 | } // namespace Eigen 25 | 26 | #include "src/Core/util/EnableMSVCWarnings.h" 27 | 28 | #endif // EIGEN_JACOBI_MODULE_H 29 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 30 | 31 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_JACOBI_MODULE_H 2 | #define EIGEN_JACOBI_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup Jacobi_Module Jacobi module 11 | * This module provides Jacobi and Givens rotations. 12 | * 13 | * \code 14 | * #include 15 | * \endcode 16 | * 17 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 18 | * - MatrixBase::applyOnTheLeft() 19 | * - MatrixBase::applyOnTheRight(). 20 | */ 21 | 22 | #include "src/Jacobi/Jacobi.h" 23 | 24 | } // namespace Eigen 25 | 26 | #include "src/Core/util/EnableMSVCWarnings.h" 27 | 28 | #endif // EIGEN_JACOBI_MODULE_H 29 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 30 | 31 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/SVD: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SVD_MODULE_H 2 | #define EIGEN_SVD_MODULE_H 3 | 4 | #include "QR" 5 | #include "Householder" 6 | #include "Jacobi" 7 | 8 | #include "src/Core/util/DisableMSVCWarnings.h" 9 | 10 | namespace Eigen { 11 | 12 | /** \defgroup SVD_Module SVD module 13 | * 14 | * 15 | * 16 | * This module provides SVD decomposition for (currently) real matrices. 17 | * This decomposition is accessible via the following MatrixBase method: 18 | * - MatrixBase::svd() 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | #include "src/misc/Solve.h" 26 | #include "src/SVD/JacobiSVD.h" 27 | #include "src/SVD/UpperBidiagonalization.h" 28 | 29 | } // namespace Eigen 30 | 31 | #include "src/Core/util/EnableMSVCWarnings.h" 32 | 33 | #endif // EIGEN_SVD_MODULE_H 34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 35 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/SVD: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SVD_MODULE_H 2 | #define EIGEN_SVD_MODULE_H 3 | 4 | #include "QR" 5 | #include "Householder" 6 | #include "Jacobi" 7 | 8 | #include "src/Core/util/DisableMSVCWarnings.h" 9 | 10 | namespace Eigen { 11 | 12 | /** \defgroup SVD_Module SVD module 13 | * 14 | * 15 | * 16 | * This module provides SVD decomposition for (currently) real matrices. 17 | * This decomposition is accessible via the following MatrixBase method: 18 | * - MatrixBase::svd() 19 | * 20 | * \code 21 | * #include 22 | * \endcode 23 | */ 24 | 25 | #include "src/misc/Solve.h" 26 | #include "src/SVD/JacobiSVD.h" 27 | #include "src/SVD/UpperBidiagonalization.h" 28 | 29 | } // namespace Eigen 30 | 31 | #include "src/Core/util/EnableMSVCWarnings.h" 32 | 33 | #endif // EIGEN_SVD_MODULE_H 34 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 35 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/gen/org/opencv/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | package org.opencv; 8 | 9 | public final class R { 10 | public static final class attr { 11 | public static final int camera_id = 0x7f010001; 12 | public static final int show_fps = 0x7f010000; 13 | } 14 | public static final class id { 15 | public static final int any = 0x7f050000; 16 | public static final int back = 0x7f050001; 17 | public static final int front = 0x7f050002; 18 | } 19 | public static final class styleable { 20 | public static final int[] CameraBridgeViewBase = { 0x7f010000, 0x7f010001 }; 21 | public static final int CameraBridgeViewBase_camera_id = 1; 22 | public static final int CameraBridgeViewBase_show_fps = 0; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLESKY_MODULE_H 2 | #define EIGEN_CHOLESKY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup Cholesky_Module Cholesky module 11 | * 12 | * 13 | * 14 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 15 | * Those decompositions are accessible via the following MatrixBase methods: 16 | * - MatrixBase::llt(), 17 | * - MatrixBase::ldlt() 18 | * 19 | * \code 20 | * #include 21 | * \endcode 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/Cholesky/LLT.h" 26 | #include "src/Cholesky/LDLT.h" 27 | 28 | } // namespace Eigen 29 | 30 | #include "src/Core/util/EnableMSVCWarnings.h" 31 | 32 | #endif // EIGEN_CHOLESKY_MODULE_H 33 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 34 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_CHOLESKY_MODULE_H 2 | #define EIGEN_CHOLESKY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup Cholesky_Module Cholesky module 11 | * 12 | * 13 | * 14 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 15 | * Those decompositions are accessible via the following MatrixBase methods: 16 | * - MatrixBase::llt(), 17 | * - MatrixBase::ldlt() 18 | * 19 | * \code 20 | * #include 21 | * \endcode 22 | */ 23 | 24 | #include "src/misc/Solve.h" 25 | #include "src/Cholesky/LLT.h" 26 | #include "src/Cholesky/LDLT.h" 27 | 28 | } // namespace Eigen 29 | 30 | #include "src/Core/util/EnableMSVCWarnings.h" 31 | 32 | #endif // EIGEN_CHOLESKY_MODULE_H 33 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 34 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/util/DisableMSVCWarnings.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef _MSC_VER 3 | // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) 4 | // 4101 - unreferenced local variable 5 | // 4127 - conditional expression is constant 6 | // 4181 - qualifier applied to reference type ignored 7 | // 4211 - nonstandard extension used : redefined extern to static 8 | // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data 9 | // 4273 - QtAlignedMalloc, inconsistent DLL linkage 10 | // 4324 - structure was padded due to declspec(align()) 11 | // 4512 - assignment operator could not be generated 12 | // 4522 - 'class' : multiple assignment operators specified 13 | // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow 14 | #pragma warning( push ) 15 | #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4717 ) 16 | #endif 17 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/util/DisableMSVCWarnings.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef _MSC_VER 3 | // 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p)) 4 | // 4101 - unreferenced local variable 5 | // 4127 - conditional expression is constant 6 | // 4181 - qualifier applied to reference type ignored 7 | // 4211 - nonstandard extension used : redefined extern to static 8 | // 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data 9 | // 4273 - QtAlignedMalloc, inconsistent DLL linkage 10 | // 4324 - structure was padded due to declspec(align()) 11 | // 4512 - assignment operator could not be generated 12 | // 4522 - 'class' : multiple assignment operators specified 13 | // 4717 - 'function' : recursive on all control paths, function will cause runtime stack overflow 14 | #pragma warning( push ) 15 | #pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4512 4522 4717 ) 16 | #endif 17 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/QR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_QR_MODULE_H 2 | #define EIGEN_QR_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | 12 | namespace Eigen { 13 | 14 | /** \defgroup QR_Module QR module 15 | * 16 | * 17 | * 18 | * This module provides various QR decompositions 19 | * This module also provides some MatrixBase methods, including: 20 | * - MatrixBase::qr(), 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | */ 26 | 27 | #include "src/misc/Solve.h" 28 | #include "src/QR/HouseholderQR.h" 29 | #include "src/QR/FullPivHouseholderQR.h" 30 | #include "src/QR/ColPivHouseholderQR.h" 31 | 32 | 33 | } // namespace Eigen 34 | 35 | #include "src/Core/util/EnableMSVCWarnings.h" 36 | 37 | // FIXME for compatibility we include Eigenvalues here: 38 | #include "Eigenvalues" 39 | 40 | #endif // EIGEN_QR_MODULE_H 41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 42 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/QR: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_QR_MODULE_H 2 | #define EIGEN_QR_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | 12 | namespace Eigen { 13 | 14 | /** \defgroup QR_Module QR module 15 | * 16 | * 17 | * 18 | * This module provides various QR decompositions 19 | * This module also provides some MatrixBase methods, including: 20 | * - MatrixBase::qr(), 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | */ 26 | 27 | #include "src/misc/Solve.h" 28 | #include "src/QR/HouseholderQR.h" 29 | #include "src/QR/FullPivHouseholderQR.h" 30 | #include "src/QR/ColPivHouseholderQR.h" 31 | 32 | 33 | } // namespace Eigen 34 | 35 | #include "src/Core/util/EnableMSVCWarnings.h" 36 | 37 | // FIXME for compatibility we include Eigenvalues here: 38 | #include "Eigenvalues" 39 | 40 | #endif // EIGEN_QR_MODULE_H 41 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 42 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/LU: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_LU_MODULE_H 2 | #define EIGEN_LU_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup LU_Module LU module 11 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 12 | * This module defines the following MatrixBase methods: 13 | * - MatrixBase::inverse() 14 | * - MatrixBase::determinant() 15 | * 16 | * \code 17 | * #include 18 | * \endcode 19 | */ 20 | 21 | #include "src/misc/Solve.h" 22 | #include "src/misc/Kernel.h" 23 | #include "src/misc/Image.h" 24 | #include "src/LU/FullPivLU.h" 25 | #include "src/LU/PartialPivLU.h" 26 | #include "src/LU/Determinant.h" 27 | #include "src/LU/Inverse.h" 28 | 29 | #if defined EIGEN_VECTORIZE_SSE 30 | #include "src/LU/arch/Inverse_SSE.h" 31 | #endif 32 | 33 | } // namespace Eigen 34 | 35 | #include "src/Core/util/EnableMSVCWarnings.h" 36 | 37 | #endif // EIGEN_LU_MODULE_H 38 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 39 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/LU: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_LU_MODULE_H 2 | #define EIGEN_LU_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | namespace Eigen { 9 | 10 | /** \defgroup LU_Module LU module 11 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 12 | * This module defines the following MatrixBase methods: 13 | * - MatrixBase::inverse() 14 | * - MatrixBase::determinant() 15 | * 16 | * \code 17 | * #include 18 | * \endcode 19 | */ 20 | 21 | #include "src/misc/Solve.h" 22 | #include "src/misc/Kernel.h" 23 | #include "src/misc/Image.h" 24 | #include "src/LU/FullPivLU.h" 25 | #include "src/LU/PartialPivLU.h" 26 | #include "src/LU/Determinant.h" 27 | #include "src/LU/Inverse.h" 28 | 29 | #if defined EIGEN_VECTORIZE_SSE 30 | #include "src/LU/arch/Inverse_SSE.h" 31 | #endif 32 | 33 | } // namespace Eigen 34 | 35 | #include "src/Core/util/EnableMSVCWarnings.h" 36 | 37 | #endif // EIGEN_LU_MODULE_H 38 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | he MIT License (MIT) 2 | 3 | Copyright (c) 2014 Michał Nowicki and Poznań Univerisity of Technology 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /OrientEstimation_AEKF/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_EIGENVALUES_MODULE_H 2 | #define EIGEN_EIGENVALUES_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | #include "LU" 12 | 13 | namespace Eigen { 14 | 15 | /** \defgroup Eigenvalues_Module Eigenvalues module 16 | * 17 | * 18 | * 19 | * This module mainly provides various eigenvalue solvers. 20 | * This module also provides some MatrixBase methods, including: 21 | * - MatrixBase::eigenvalues(), 22 | * - MatrixBase::operatorNorm() 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | */ 28 | 29 | #include "src/Eigenvalues/Tridiagonalization.h" 30 | #include "src/Eigenvalues/RealSchur.h" 31 | #include "src/Eigenvalues/EigenSolver.h" 32 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 33 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 34 | #include "src/Eigenvalues/HessenbergDecomposition.h" 35 | #include "src/Eigenvalues/ComplexSchur.h" 36 | #include "src/Eigenvalues/ComplexEigenSolver.h" 37 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 38 | 39 | } // namespace Eigen 40 | 41 | #include "src/Core/util/EnableMSVCWarnings.h" 42 | 43 | #endif // EIGEN_EIGENVALUES_MODULE_H 44 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 45 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Eigenvalues: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_EIGENVALUES_MODULE_H 2 | #define EIGEN_EIGENVALUES_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include "Cholesky" 9 | #include "Jacobi" 10 | #include "Householder" 11 | #include "LU" 12 | 13 | namespace Eigen { 14 | 15 | /** \defgroup Eigenvalues_Module Eigenvalues module 16 | * 17 | * 18 | * 19 | * This module mainly provides various eigenvalue solvers. 20 | * This module also provides some MatrixBase methods, including: 21 | * - MatrixBase::eigenvalues(), 22 | * - MatrixBase::operatorNorm() 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | */ 28 | 29 | #include "src/Eigenvalues/Tridiagonalization.h" 30 | #include "src/Eigenvalues/RealSchur.h" 31 | #include "src/Eigenvalues/EigenSolver.h" 32 | #include "src/Eigenvalues/SelfAdjointEigenSolver.h" 33 | #include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" 34 | #include "src/Eigenvalues/HessenbergDecomposition.h" 35 | #include "src/Eigenvalues/ComplexSchur.h" 36 | #include "src/Eigenvalues/ComplexEigenSolver.h" 37 | #include "src/Eigenvalues/MatrixBaseEigenvalues.h" 38 | 39 | } // namespace Eigen 40 | 41 | #include "src/Core/util/EnableMSVCWarnings.h" 42 | 43 | #endif // EIGEN_EIGENVALUES_MODULE_H 44 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 45 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Eigenvalues/EigenvaluesCommon.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Jitse Niesen 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_EIGENVALUES_COMMON_H 26 | #define EIGEN_EIGENVALUES_COMMON_H 27 | 28 | 29 | 30 | #endif // EIGEN_EIGENVALUES_COMMON_H 31 | 32 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Eigenvalues/EigenvaluesCommon.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Jitse Niesen 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_EIGENVALUES_COMMON_H 26 | #define EIGEN_EIGENVALUES_COMMON_H 27 | 28 | 29 | 30 | #endif // EIGEN_EIGENVALUES_COMMON_H 31 | 32 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/jni/AHRS/EKF/EKF.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | #include 6 | #include 7 | 8 | class EKF { 9 | // Correct/Predict uncertainty 10 | cv::Mat R, Q; 11 | 12 | // State estimates (apriori and posteriori) 13 | cv::Mat x_apriori, x_aposteriori; // 7x1 matrices 14 | 15 | // State estimates uncertainties (apriori and posteriori) 16 | cv::Mat P_apriori, P_aposteriori; // 7x7 matrices 17 | 18 | // Measurement matrix 19 | cv::Mat H; 20 | 21 | bool firstMeasurement; 22 | bool correctTime; 23 | 24 | public: 25 | // Constructor: 26 | // - Qq, Qw, Rr meaning is the same as in the article published in IEEE Sensors Journal: 27 | // J. Goslinski, M. Nowicki, P. Skrzypczynski, "Performance Comparison of EKF-based Algorithms for Orientation Estimation Android Platform" 28 | EKF(float Qq, float Qw, float Rr); 29 | 30 | // Prediction step 31 | // - takes gyroscope measurements 32 | // - returns currentEstimate 33 | void predict(float *addrW, float dt, float *currentEstimate); 34 | 35 | // Correction step 36 | // - takes accelerometer and magnetometer coordinate system 37 | // - returns currentEstimate 38 | void correct(float *addrZ, float *currentEstimate); 39 | 40 | private: 41 | // Additional methods to compute the jacobian 42 | cv::Mat jacobian(float *addrW, float dt); 43 | 44 | // Predict based on last estimate and gyroscope measurement 45 | cv::Mat state(float * addrW, float dt); 46 | }; 47 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_STDLIST_MODULE_H 26 | #define EIGEN_STDLIST_MODULE_H 27 | 28 | #include "Core" 29 | #include 30 | 31 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 32 | 33 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 34 | 35 | #else 36 | 37 | #include "src/StlSupport/StdList.h" 38 | 39 | #endif 40 | 41 | #endif // EIGEN_STDLIST_MODULE_H 42 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/gen/org/put/dg/orientAEKFEigen/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package org.put.dg.orientAEKFEigen; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class drawable { 14 | public static final int pp_logo1=0x7f020000; 15 | } 16 | public static final class id { 17 | public static final int TextView01=0x7f050008; 18 | public static final int TextView03=0x7f050005; 19 | public static final int TextViewX=0x7f050009; 20 | public static final int TextViewY=0x7f050006; 21 | public static final int TextViewZ=0x7f050003; 22 | public static final int buttonClick=0x7f05000b; 23 | public static final int imageView2=0x7f05000d; 24 | public static final int layout=0x7f050000; 25 | public static final int tableRow1=0x7f050001; 26 | public static final int tableRow2=0x7f050004; 27 | public static final int tableRow3=0x7f050007; 28 | public static final int textView1=0x7f05000a; 29 | public static final int textView2=0x7f050002; 30 | public static final int textView4=0x7f05000c; 31 | } 32 | public static final class layout { 33 | public static final int main_surface_view=0x7f030000; 34 | } 35 | public static final class string { 36 | public static final int ContactInfo=0x7f040001; 37 | public static final int app_name=0x7f040000; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/gen/org/put/dg/orientEigen/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package org.put.dg.orientEigen; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class drawable { 14 | public static final int pp_logo1=0x7f020000; 15 | } 16 | public static final class id { 17 | public static final int TextView01=0x7f050008; 18 | public static final int TextView03=0x7f050005; 19 | public static final int TextViewX=0x7f050009; 20 | public static final int TextViewY=0x7f050006; 21 | public static final int TextViewZ=0x7f050003; 22 | public static final int buttonClick=0x7f05000b; 23 | public static final int imageView2=0x7f05000d; 24 | public static final int layout=0x7f050000; 25 | public static final int tableRow1=0x7f050001; 26 | public static final int tableRow2=0x7f050004; 27 | public static final int tableRow3=0x7f050007; 28 | public static final int textView1=0x7f05000a; 29 | public static final int textView2=0x7f050002; 30 | public static final int textView4=0x7f05000c; 31 | } 32 | public static final class layout { 33 | public static final int main_surface_view=0x7f030000; 34 | } 35 | public static final class string { 36 | public static final int ContactInfo=0x7f040001; 37 | public static final int app_name=0x7f040000; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_STDLIST_MODULE_H 26 | #define EIGEN_STDLIST_MODULE_H 27 | 28 | #include "Core" 29 | #include 30 | 31 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 32 | 33 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 34 | 35 | #else 36 | 37 | #include "src/StlSupport/StdList.h" 38 | 39 | #endif 40 | 41 | #endif // EIGEN_STDLIST_MODULE_H 42 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/EKF/EKF.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | #include "../Eigen/Eigen" 7 | 8 | class EKF { 9 | private: 10 | // Correct/Predict uncertainty 11 | Eigen::Matrix R; 12 | Eigen::Matrix Q; 13 | 14 | // State estimates (apriori and posteriori) 15 | Eigen::Matrix x_apriori, x_aposteriori; 16 | 17 | // State estimates uncertainties (apriori and posteriori) 18 | Eigen::Matrix P_apriori, P_aposteriori; 19 | Eigen::Matrix H; 20 | 21 | // Additional values to detect estimation start and distinguish between predict/correct order 22 | bool firstMeasurement; 23 | bool correctTime; 24 | 25 | public: 26 | // Constructor: 27 | // - Qq, Qw, Rr meaning is the same as in the article published in IEEE Sensors Journal: 28 | // J. Goslinski, M. Nowicki, P. Skrzypczynski, "Performance Comparison of EKF-based Algorithms for Orientation Estimation Android Platform" 29 | EKF(float Qq, float Qw, float Rr); 30 | 31 | // Prediction step 32 | // - takes gyroscope measurements 33 | // - returns currentEstimate 34 | void predict(float *inputArray, float dt, float *currentEstimate); 35 | 36 | // Correction step 37 | // - takes accelerometer and magnetometer coordinate system 38 | // - returns currentEstimate 39 | void correct(float *measurement, float *currentEstimate); 40 | 41 | private: 42 | // Additional methods to compute the jacobian 43 | Eigen::Matrix jacobian(float* w, float dt); 44 | 45 | // Predict based on last estimate and gyroscope measurement 46 | Eigen::Matrix statePrediction(float* w, float dt); 47 | }; 48 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STDDEQUE_MODULE_H 27 | #define EIGEN_STDDEQUE_MODULE_H 28 | 29 | #include "Core" 30 | #include 31 | 32 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 33 | 34 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 35 | 36 | #else 37 | 38 | #include "src/StlSupport/StdDeque.h" 39 | 40 | #endif 41 | 42 | #endif // EIGEN_STDDEQUE_MODULE_H 43 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STDVECTOR_MODULE_H 27 | #define EIGEN_STDVECTOR_MODULE_H 28 | 29 | #include "Core" 30 | #include 31 | 32 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 33 | 34 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 35 | 36 | #else 37 | 38 | #include "src/StlSupport/StdVector.h" 39 | 40 | #endif 41 | 42 | #endif // EIGEN_STDVECTOR_MODULE_H 43 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STDDEQUE_MODULE_H 27 | #define EIGEN_STDDEQUE_MODULE_H 28 | 29 | #include "Core" 30 | #include 31 | 32 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 33 | 34 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 35 | 36 | #else 37 | 38 | #include "src/StlSupport/StdDeque.h" 39 | 40 | #endif 41 | 42 | #endif // EIGEN_STDDEQUE_MODULE_H 43 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STDVECTOR_MODULE_H 27 | #define EIGEN_STDVECTOR_MODULE_H 28 | 29 | #include "Core" 30 | #include 31 | 32 | #if (defined(_MSC_VER) && defined(_WIN64)) /* MSVC auto aligns in 64 bit builds */ 33 | 34 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 35 | 36 | #else 37 | 38 | #include "src/StlSupport/StdVector.h" 39 | 40 | #endif 41 | 42 | #endif // EIGEN_STDVECTOR_MODULE_H 43 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_GEOMETRY_MODULE_H 2 | #define EIGEN_GEOMETRY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include "SVD" 9 | #include "LU" 10 | #include 11 | 12 | #ifndef M_PI 13 | #define M_PI 3.14159265358979323846 14 | #endif 15 | 16 | namespace Eigen { 17 | 18 | /** \defgroup Geometry_Module Geometry module 19 | * 20 | * 21 | * 22 | * This module provides support for: 23 | * - fixed-size homogeneous transformations 24 | * - translation, scaling, 2D and 3D rotations 25 | * - quaternions 26 | * - \ref MatrixBase::cross() "cross product" 27 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation" 28 | * - some linear components: parametrized-lines and hyperplanes 29 | * 30 | * \code 31 | * #include 32 | * \endcode 33 | */ 34 | 35 | #include "src/Geometry/OrthoMethods.h" 36 | #include "src/Geometry/Homogeneous.h" 37 | #include "src/Geometry/RotationBase.h" 38 | #include "src/Geometry/Rotation2D.h" 39 | #include "src/Geometry/Quaternion.h" 40 | #include "src/Geometry/AngleAxis.h" 41 | #include "src/Geometry/EulerAngles.h" 42 | #include "src/Geometry/Transform.h" 43 | #include "src/Geometry/Translation.h" 44 | #include "src/Geometry/Scaling.h" 45 | #include "src/Geometry/Hyperplane.h" 46 | #include "src/Geometry/ParametrizedLine.h" 47 | #include "src/Geometry/AlignedBox.h" 48 | #include "src/Geometry/Umeyama.h" 49 | 50 | #if defined EIGEN_VECTORIZE_SSE 51 | #include "src/Geometry/arch/Geometry_SSE.h" 52 | #endif 53 | 54 | } // namespace Eigen 55 | 56 | #include "src/Core/util/EnableMSVCWarnings.h" 57 | 58 | #endif // EIGEN_GEOMETRY_MODULE_H 59 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 60 | 61 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Geometry: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_GEOMETRY_MODULE_H 2 | #define EIGEN_GEOMETRY_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include "SVD" 9 | #include "LU" 10 | #include 11 | 12 | #ifndef M_PI 13 | #define M_PI 3.14159265358979323846 14 | #endif 15 | 16 | namespace Eigen { 17 | 18 | /** \defgroup Geometry_Module Geometry module 19 | * 20 | * 21 | * 22 | * This module provides support for: 23 | * - fixed-size homogeneous transformations 24 | * - translation, scaling, 2D and 3D rotations 25 | * - quaternions 26 | * - \ref MatrixBase::cross() "cross product" 27 | * - \ref MatrixBase::unitOrthogonal() "orthognal vector generation" 28 | * - some linear components: parametrized-lines and hyperplanes 29 | * 30 | * \code 31 | * #include 32 | * \endcode 33 | */ 34 | 35 | #include "src/Geometry/OrthoMethods.h" 36 | #include "src/Geometry/Homogeneous.h" 37 | #include "src/Geometry/RotationBase.h" 38 | #include "src/Geometry/Rotation2D.h" 39 | #include "src/Geometry/Quaternion.h" 40 | #include "src/Geometry/AngleAxis.h" 41 | #include "src/Geometry/EulerAngles.h" 42 | #include "src/Geometry/Transform.h" 43 | #include "src/Geometry/Translation.h" 44 | #include "src/Geometry/Scaling.h" 45 | #include "src/Geometry/Hyperplane.h" 46 | #include "src/Geometry/ParametrizedLine.h" 47 | #include "src/Geometry/AlignedBox.h" 48 | #include "src/Geometry/Umeyama.h" 49 | 50 | #if defined EIGEN_VECTORIZE_SSE 51 | #include "src/Geometry/arch/Geometry_SSE.h" 52 | #endif 53 | 54 | } // namespace Eigen 55 | 56 | #include "src/Core/util/EnableMSVCWarnings.h" 57 | 58 | #endif // EIGEN_GEOMETRY_MODULE_H 59 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 60 | 61 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_MODULE_H 2 | #define EIGEN_SPARSE_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace Eigen { 15 | 16 | /** \defgroup Sparse_Module Sparse module 17 | * 18 | * 19 | * 20 | * See the \ref TutorialSparse "Sparse tutorial" 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | */ 26 | 27 | /** The type used to identify a general sparse storage. */ 28 | struct Sparse {}; 29 | 30 | #include "src/Sparse/SparseUtil.h" 31 | #include "src/Sparse/SparseMatrixBase.h" 32 | #include "src/Sparse/CompressedStorage.h" 33 | #include "src/Sparse/AmbiVector.h" 34 | #include "src/Sparse/SparseMatrix.h" 35 | #include "src/Sparse/DynamicSparseMatrix.h" 36 | #include "src/Sparse/MappedSparseMatrix.h" 37 | #include "src/Sparse/SparseVector.h" 38 | #include "src/Sparse/CoreIterators.h" 39 | #include "src/Sparse/SparseBlock.h" 40 | #include "src/Sparse/SparseTranspose.h" 41 | #include "src/Sparse/SparseCwiseUnaryOp.h" 42 | #include "src/Sparse/SparseCwiseBinaryOp.h" 43 | #include "src/Sparse/SparseDot.h" 44 | #include "src/Sparse/SparseAssign.h" 45 | #include "src/Sparse/SparseRedux.h" 46 | #include "src/Sparse/SparseFuzzy.h" 47 | #include "src/Sparse/SparseProduct.h" 48 | #include "src/Sparse/SparseSparseProduct.h" 49 | #include "src/Sparse/SparseDenseProduct.h" 50 | #include "src/Sparse/SparseDiagonalProduct.h" 51 | #include "src/Sparse/SparseTriangularView.h" 52 | #include "src/Sparse/SparseSelfAdjointView.h" 53 | #include "src/Sparse/TriangularSolver.h" 54 | #include "src/Sparse/SparseView.h" 55 | 56 | } // namespace Eigen 57 | 58 | #include "src/Core/util/EnableMSVCWarnings.h" 59 | 60 | #endif // EIGEN_SPARSE_MODULE_H 61 | 62 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | #ifndef EIGEN_SPARSE_MODULE_H 2 | #define EIGEN_SPARSE_MODULE_H 3 | 4 | #include "Core" 5 | 6 | #include "src/Core/util/DisableMSVCWarnings.h" 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace Eigen { 15 | 16 | /** \defgroup Sparse_Module Sparse module 17 | * 18 | * 19 | * 20 | * See the \ref TutorialSparse "Sparse tutorial" 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | */ 26 | 27 | /** The type used to identify a general sparse storage. */ 28 | struct Sparse {}; 29 | 30 | #include "src/Sparse/SparseUtil.h" 31 | #include "src/Sparse/SparseMatrixBase.h" 32 | #include "src/Sparse/CompressedStorage.h" 33 | #include "src/Sparse/AmbiVector.h" 34 | #include "src/Sparse/SparseMatrix.h" 35 | #include "src/Sparse/DynamicSparseMatrix.h" 36 | #include "src/Sparse/MappedSparseMatrix.h" 37 | #include "src/Sparse/SparseVector.h" 38 | #include "src/Sparse/CoreIterators.h" 39 | #include "src/Sparse/SparseBlock.h" 40 | #include "src/Sparse/SparseTranspose.h" 41 | #include "src/Sparse/SparseCwiseUnaryOp.h" 42 | #include "src/Sparse/SparseCwiseBinaryOp.h" 43 | #include "src/Sparse/SparseDot.h" 44 | #include "src/Sparse/SparseAssign.h" 45 | #include "src/Sparse/SparseRedux.h" 46 | #include "src/Sparse/SparseFuzzy.h" 47 | #include "src/Sparse/SparseProduct.h" 48 | #include "src/Sparse/SparseSparseProduct.h" 49 | #include "src/Sparse/SparseDenseProduct.h" 50 | #include "src/Sparse/SparseDiagonalProduct.h" 51 | #include "src/Sparse/SparseTriangularView.h" 52 | #include "src/Sparse/SparseSelfAdjointView.h" 53 | #include "src/Sparse/TriangularSolver.h" 54 | #include "src/Sparse/SparseView.h" 55 | 56 | } // namespace Eigen 57 | 58 | #include "src/Core/util/EnableMSVCWarnings.h" 59 | 60 | #endif // EIGEN_SPARSE_MODULE_H 61 | 62 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/EKF/EKF.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | #include "../Eigen/Eigen" 7 | #include 8 | 9 | class EKF { 10 | private: 11 | // Correct/Predict uncertainty 12 | Eigen::Matrix R; 13 | Eigen::Matrix Q, Qmin, Qmax, Qdiff; 14 | 15 | // State estimates (apriori and posteriori) 16 | Eigen::Matrix x_apriori, x_aposteriori; 17 | 18 | // State estimates uncertainties (apriori and posteriori) 19 | Eigen::Matrix P_apriori, P_aposteriori; 20 | Eigen::Matrix H; 21 | 22 | // Additional values to detect estimation start and distinguish between predict/correct order 23 | bool firstMeasurement; 24 | bool correctTime; 25 | 26 | // Measurement window used in AEKF 27 | std::deque measurementWindow; 28 | static const int measurementWindowSize = 10; 29 | 30 | public: 31 | // Constructor: 32 | // - Qq, Qw, Rr meaning is the same as in the article published in IEEE Sensors Journal: 33 | // J. Goslinski, M. Nowicki, P. Skrzypczynski, "Performance Comparison of EKF-based Algorithms for Orientation Estimation Android Platform" 34 | EKF(float Qqmin, float Qwmin, float Qqmax, float Qwmax, float Rr); 35 | 36 | // Prediction step 37 | // - takes gyroscope measurements 38 | // - returns currentEstimate 39 | void predict(float *inputArray, float dt, float *currentEstimate); 40 | 41 | // Correction step 42 | // - takes accelerometer and magnetometer coordinate system 43 | // - returns currentEstimate 44 | void correct(float *measurement, float *currentEstimate); 45 | 46 | private: 47 | // Additional methods to compute the jacobian 48 | Eigen::Matrix jacobian(float* w, float dt); 49 | 50 | // Predict based on last estimate and gyroscope measurement 51 | Eigen::Matrix statePrediction(float* w, float dt); 52 | }; 53 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/LICENSE: -------------------------------------------------------------------------------- 1 | By downloading, copying, installing or using the software you agree to this license. 2 | If you do not agree to this license, do not download, install, 3 | copy or use the software. 4 | 5 | 6 | License Agreement 7 | For Open Source Computer Vision Library 8 | (3-clause BSD License) 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, 14 | this list of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, 17 | this list of conditions and the following disclaimer in the documentation 18 | and/or other materials provided with the distribution. 19 | 20 | * Neither the names of the copyright holders nor the names of the contributors 21 | may be used to endorse or promote products derived from this software 22 | without specific prior written permission. 23 | 24 | This software is provided by the copyright holders and contributors "as is" and 25 | any express or implied warranties, including, but not limited to, the implied 26 | warranties of merchantability and fitness for a particular purpose are disclaimed. 27 | In no event shall copyright holders or contributors be liable for any direct, 28 | indirect, incidental, special, exemplary, or consequential damages 29 | (including, but not limited to, procurement of substitute goods or services; 30 | loss of use, data, or profits; or business interruption) however caused 31 | and on any theory of liability, whether in contract, strict liability, 32 | or tort (including negligence or otherwise) arising in any way out of 33 | the use of this software, even if advised of the possibility of such damage. 34 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/LICENSE: -------------------------------------------------------------------------------- 1 | By downloading, copying, installing or using the software you agree to this license. 2 | If you do not agree to this license, do not download, install, 3 | copy or use the software. 4 | 5 | 6 | License Agreement 7 | For Open Source Computer Vision Library 8 | (3-clause BSD License) 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, 14 | this list of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, 17 | this list of conditions and the following disclaimer in the documentation 18 | and/or other materials provided with the distribution. 19 | 20 | * Neither the names of the copyright holders nor the names of the contributors 21 | may be used to endorse or promote products derived from this software 22 | without specific prior written permission. 23 | 24 | This software is provided by the copyright holders and contributors "as is" and 25 | any express or implied warranties, including, but not limited to, the implied 26 | warranties of merchantability and fitness for a particular purpose are disclaimed. 27 | In no event shall copyright holders or contributors be liable for any direct, 28 | indirect, incidental, special, exemplary, or consequential damages 29 | (including, but not limited to, procurement of substitute goods or services; 30 | loss of use, data, or profits; or business interruption) however caused 31 | and on any theory of liability, whether in contract, strict liability, 32 | or tort (including negligence or otherwise) arising in any way out of 33 | the use of this software, even if advised of the possibility of such damage. 34 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/LICENSE: -------------------------------------------------------------------------------- 1 | By downloading, copying, installing or using the software you agree to this license. 2 | If you do not agree to this license, do not download, install, 3 | copy or use the software. 4 | 5 | 6 | License Agreement 7 | For Open Source Computer Vision Library 8 | (3-clause BSD License) 9 | 10 | Redistribution and use in source and binary forms, with or without modification, 11 | are permitted provided that the following conditions are met: 12 | 13 | * Redistributions of source code must retain the above copyright notice, 14 | this list of conditions and the following disclaimer. 15 | 16 | * Redistributions in binary form must reproduce the above copyright notice, 17 | this list of conditions and the following disclaimer in the documentation 18 | and/or other materials provided with the distribution. 19 | 20 | * Neither the names of the copyright holders nor the names of the contributors 21 | may be used to endorse or promote products derived from this software 22 | without specific prior written permission. 23 | 24 | This software is provided by the copyright holders and contributors "as is" and 25 | any express or implied warranties, including, but not limited to, the implied 26 | warranties of merchantability and fitness for a particular purpose are disclaimed. 27 | In no event shall copyright holders or contributors be liable for any direct, 28 | indirect, incidental, special, exemplary, or consequential damages 29 | (including, but not limited to, procurement of substitute goods or services; 30 | loss of use, data, or profits; or business interruption) however caused 31 | and on any theory of liability, whether in contract, strict liability, 32 | or tort (including negligence or otherwise) arising in any way out of 33 | the use of this software, even if advised of the possibility of such damage. 34 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Sparse/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSE_FUZZY_H 26 | #define EIGEN_SPARSE_FUZZY_H 27 | 28 | // template 29 | // template 30 | // bool SparseMatrixBase::isApprox( 31 | // const OtherDerived& other, 32 | // typename NumTraits::Real prec 33 | // ) const 34 | // { 35 | // const typename ei_nested::type nested(derived()); 36 | // const typename ei_nested::type otherNested(other.derived()); 37 | // return (nested - otherNested).cwise().abs2().sum() 38 | // <= prec * prec * std::min(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); 39 | // } 40 | 41 | #endif // EIGEN_SPARSE_FUZZY_H 42 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSE_FUZZY_H 26 | #define EIGEN_SPARSE_FUZZY_H 27 | 28 | // template 29 | // template 30 | // bool SparseMatrixBase::isApprox( 31 | // const OtherDerived& other, 32 | // typename NumTraits::Real prec 33 | // ) const 34 | // { 35 | // const typename ei_nested::type nested(derived()); 36 | // const typename ei_nested::type otherNested(other.derived()); 37 | // return (nested - otherNested).cwise().abs2().sum() 38 | // <= prec * prec * std::min(nested.cwise().abs2().sum(), otherNested.cwise().abs2().sum()); 39 | // } 40 | 41 | #endif // EIGEN_SPARSE_FUZZY_H 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PUT_AndroidOrientation 2 | ====================== 3 | 4 | The EKF-based quaternion orientation estimation for Android devices using accelerometer, magnetometer and gyroscope (more precise than Android estimation). The repository contains free simple examples estimating the orientation of the Android smartphone: 5 | - implementation in NDK using Eigen library (OrientEstimation_EKF_EIGEN) 6 | - implementation in NDK using OpenCV library (OrientEstimation_EKF_OpenCV) 7 | - implementation of AKEF (!) in NDK using Eigen library (OrientEstimation_AEKF) [recommended!] 8 | 9 | Screenshots: 10 | - OrientEstimation_EKF_EIGEN: [1](https://dl.dropboxusercontent.com/u/2559505/IEEESensors/OrientationEigen.png) [2](https://dl.dropboxusercontent.com/u/2559505/IEEESensors/OrientationEigen2.png) 11 | - OrientEstimation_EKF_OpenCV: [1](https://dl.dropboxusercontent.com/u/2559505/IEEESensors/OrientationAEKF.png) [2](https://dl.dropboxusercontent.com/u/2559505/IEEESensors/OrientationAEKF2.png) 12 | - OrientEstimation_AEKF: [1](https://dl.dropboxusercontent.com/u/2559505/IEEESensors/OrientationOpenCV.png) [2](https://dl.dropboxusercontent.com/u/2559505/IEEESensors/OrientationOpenCV2.png) 13 | 14 | The code is published under the MiT license, so feel free to use it for your own purposes. 15 | 16 | More information about the implemented methods can be found in (please share and cite if you found this code useful): 17 | 18 | J. Gośliński, M. Nowicki, P. Skrzypczyński, "Performance Comparison of EKF-based Algorithms for Orientation Estimation on Android Platform", IEEE Sensors, Journal, 2015 19 | 20 | When having problems running the software , found some bug or anything relevant concerning the method or code, please contact: 21 | 22 | michal.nowicki (at) put.poznan.pl 23 | 24 | ====================== 25 | 26 | Expect a new open indoor localization library for Android combining all mayor algorithms fused together in 2015 (just polishing the results right now): 27 | - WiFi fingerprinting 28 | - Magnetic distortions 29 | - Orientation estimation 30 | - Stepometer 31 | - Vision-based motion estimation 32 | - Barometer 33 | - ... 34 | More soon ... -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/src/org/put/dg/inertialSensors/AHRSModule.java: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | package org.put.dg.inertialSensors; 7 | 8 | import android.util.Log; 9 | 10 | public class AHRSModule { 11 | 12 | static { 13 | System.loadLibrary("AHRSModule"); 14 | Log.d("EKF", "EKF lib loaded!\n"); 15 | } 16 | 17 | // Definitions of methods available in NDK 18 | public native long EKFcreate(float Qq, float Qw, float Rr); 19 | public native float[] EKFpredict(long addrEKF, float[] input, float dt); 20 | public native float[] EKFcorrect(long addrEKF, float[] measurement); 21 | public native void EKFdestroy(long addrEKF); 22 | 23 | // Address of EKF instance 24 | private long addrEKF; 25 | 26 | // Most up-to-date estimate 27 | float[] orientationEstimate = { 0.0f, 0.0f, 0.0f, 0.0f }; 28 | 29 | public AHRSModule() { 30 | final float Qq = (float) (9.342 * Math.pow(10, -7)); 31 | final float Qw = (float) (8.159 * Math.pow(10, -7)); 32 | final float Rr = 3.672f; 33 | create(Qq, Qw, Rr); 34 | } 35 | 36 | public AHRSModule(float Qq, float Qw, float Rr) { 37 | // Experimentally found values 38 | // - for slow and steady motions: 39 | // Qq = 2.528 * 10^7, Qw = 4.483 * 10^7, Rr = 3.672 40 | // - for dynamic motions: 41 | // Qq = 9.342 * 10^7, Qw = 8.159 * 10^7, Rr = 3.672 42 | create(Qq, Qw, Rr); 43 | } 44 | 45 | private void create(float Qq, float Qw, float Rr) { 46 | addrEKF = EKFcreate(Qq, Qw, Rr); 47 | } 48 | 49 | public void predict(float wx, float wy, float wz, float dt) { 50 | // w is 3x1 gyro measurement 51 | float[] w = new float[3]; 52 | w[0] = wx; 53 | w[1] = wy; 54 | w[2] = wz; 55 | 56 | orientationEstimate = EKFpredict(addrEKF, w, dt); 57 | } 58 | 59 | public void correct(float q1, float q2, float q3, float q4) { 60 | // z is 4x1 quat orientation 61 | float[] z = new float[4]; 62 | z[0] = (float) q1; 63 | z[1] = (float) q2; 64 | z[2] = (float) q3; 65 | z[3] = (float) q4; 66 | 67 | orientationEstimate = EKFcorrect(addrEKF, z); 68 | } 69 | 70 | public float[] getEstimate() { 71 | return orientationEstimate; 72 | } 73 | 74 | public void destroy() { 75 | EKFdestroy(addrEKF); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/src/org/put/dg/inertialSensors/AHRSModule.java: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | package org.put.dg.inertialSensors; 7 | 8 | import android.util.Log; 9 | 10 | public class AHRSModule { 11 | 12 | static { 13 | System.loadLibrary("AHRSModule"); 14 | Log.d("EKF", "EKF lib loaded!\n"); 15 | } 16 | 17 | // Definitions of methods available in NDK 18 | public native long EKFcreate(float Qq, float Qw, float Rr); 19 | public native float[] EKFpredict(long addrEKF, float[] input, float dt); 20 | public native float[] EKFcorrect(long addrEKF, float[] measurement); 21 | public native void EKFdestroy(long addrEKF); 22 | 23 | // Address of EKF instance 24 | private long addrEKF; 25 | 26 | // Most up-to-date estimate 27 | float[] orientationEstimate = { 0.0f, 0.0f, 0.0f, 0.0f }; 28 | 29 | public AHRSModule() { 30 | final float Qq = (float) (9.342 * Math.pow(10, -7)); 31 | final float Qw = (float) (8.159 * Math.pow(10, -7)); 32 | final float Rr = 3.672f; 33 | create(Qq, Qw, Rr); 34 | } 35 | 36 | public AHRSModule(float Qq, float Qw, float Rr) { 37 | // Experimentally found values 38 | // - for slow and steady motions: 39 | // Qq = 2.528 * 10^7, Qw = 4.483 * 10^7, Rr = 3.672 40 | // - for dynamic motions: 41 | // Qq = 9.342 * 10^7, Qw = 8.159 * 10^7, Rr = 3.672 42 | create(Qq, Qw, Rr); 43 | } 44 | 45 | private void create(float Qq, float Qw, float Rr) { 46 | addrEKF = EKFcreate(Qq, Qw, Rr); 47 | } 48 | 49 | public void predict(float wx, float wy, float wz, float dt) { 50 | // w is 3x1 gyro measurement 51 | float[] w = new float[3]; 52 | w[0] = wx; 53 | w[1] = wy; 54 | w[2] = wz; 55 | 56 | orientationEstimate = EKFpredict(addrEKF, w, dt); 57 | } 58 | 59 | public void correct(float q1, float q2, float q3, float q4) { 60 | // z is 4x1 quat orientation 61 | float[] z = new float[4]; 62 | z[0] = (float) q1; 63 | z[1] = (float) q2; 64 | z[2] = (float) q3; 65 | z[3] = (float) q4; 66 | 67 | orientationEstimate = EKFcorrect(addrEKF, z); 68 | } 69 | 70 | public float[] getEstimate() { 71 | return orientationEstimate; 72 | } 73 | 74 | public void destroy() { 75 | EKFdestroy(addrEKF); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Eigen2Support/TriangularSolver.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_TRIANGULAR_SOLVER2_H 26 | #define EIGEN_TRIANGULAR_SOLVER2_H 27 | 28 | const unsigned int UnitDiagBit = UnitDiag; 29 | const unsigned int SelfAdjointBit = SelfAdjoint; 30 | const unsigned int UpperTriangularBit = Upper; 31 | const unsigned int LowerTriangularBit = Lower; 32 | 33 | const unsigned int UpperTriangular = Upper; 34 | const unsigned int LowerTriangular = Lower; 35 | const unsigned int UnitUpperTriangular = UnitUpper; 36 | const unsigned int UnitLowerTriangular = UnitLower; 37 | 38 | template 39 | template 40 | typename ExpressionType::PlainObject 41 | Flagged::solveTriangular(const MatrixBase& other) const 42 | { 43 | return m_matrix.template triangularView.solve(other.derived()); 44 | } 45 | 46 | template 47 | template 48 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const 49 | { 50 | m_matrix.template triangularView.solveInPlace(other.derived()); 51 | } 52 | 53 | #endif // EIGEN_TRIANGULAR_SOLVER2_H 54 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Eigen2Support/TriangularSolver.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_TRIANGULAR_SOLVER2_H 26 | #define EIGEN_TRIANGULAR_SOLVER2_H 27 | 28 | const unsigned int UnitDiagBit = UnitDiag; 29 | const unsigned int SelfAdjointBit = SelfAdjoint; 30 | const unsigned int UpperTriangularBit = Upper; 31 | const unsigned int LowerTriangularBit = Lower; 32 | 33 | const unsigned int UpperTriangular = Upper; 34 | const unsigned int LowerTriangular = Lower; 35 | const unsigned int UnitUpperTriangular = UnitUpper; 36 | const unsigned int UnitLowerTriangular = UnitLower; 37 | 38 | template 39 | template 40 | typename ExpressionType::PlainObject 41 | Flagged::solveTriangular(const MatrixBase& other) const 42 | { 43 | return m_matrix.template triangularView.solve(other.derived()); 44 | } 45 | 46 | template 47 | template 48 | void Flagged::solveTriangularInPlace(const MatrixBase& other) const 49 | { 50 | m_matrix.template triangularView.solveInPlace(other.derived()); 51 | } 52 | 53 | #endif // EIGEN_TRIANGULAR_SOLVER2_H 54 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Sparse/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSEREDUX_H 26 | #define EIGEN_SPARSEREDUX_H 27 | 28 | template 29 | typename ei_traits::Scalar 30 | SparseMatrixBase::sum() const 31 | { 32 | ei_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 33 | Scalar res = 0; 34 | for (Index j=0; j 41 | typename ei_traits >::Scalar 42 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 43 | { 44 | ei_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 45 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 46 | } 47 | 48 | template 49 | typename ei_traits >::Scalar 50 | SparseVector<_Scalar,_Options,_Index>::sum() const 51 | { 52 | ei_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 53 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 54 | } 55 | 56 | #endif // EIGEN_SPARSEREDUX_H 57 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/SparseRedux.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSEREDUX_H 26 | #define EIGEN_SPARSEREDUX_H 27 | 28 | template 29 | typename ei_traits::Scalar 30 | SparseMatrixBase::sum() const 31 | { 32 | ei_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 33 | Scalar res = 0; 34 | for (Index j=0; j 41 | typename ei_traits >::Scalar 42 | SparseMatrix<_Scalar,_Options,_Index>::sum() const 43 | { 44 | ei_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 45 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 46 | } 47 | 48 | template 49 | typename ei_traits >::Scalar 50 | SparseVector<_Scalar,_Options,_Index>::sum() const 51 | { 52 | ei_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); 53 | return Matrix::Map(&m_data.value(0), m_data.size()).sum(); 54 | } 55 | 56 | #endif // EIGEN_SPARSEREDUX_H 57 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/src/org/put/dg/inertialSensors/AHRSModule.java: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | package org.put.dg.inertialSensors; 7 | 8 | import android.util.Log; 9 | 10 | public class AHRSModule { 11 | 12 | static { 13 | System.loadLibrary("AHRSModule"); 14 | Log.d("EKF", "EKF lib loaded!\n"); 15 | } 16 | 17 | // Definitions of methods available in NDK 18 | public native long EKFcreate(float Qqmin, float Qwmin, float Qqmax, 19 | float Qwmax, float Rr); 20 | 21 | public native float[] EKFpredict(long addrEKF, float[] input, float dt); 22 | 23 | public native float[] EKFcorrect(long addrEKF, float[] measurement); 24 | 25 | public native void EKFdestroy(long addrEKF); 26 | 27 | // Address of EKF instance 28 | private long addrEKF; 29 | 30 | // Most up-to-date estimate 31 | float[] orientationEstimate = { 0.0f, 0.0f, 0.0f, 0.0f }; 32 | 33 | public AHRSModule() { 34 | final float Qqmin = (float) (2.528 * Math.pow(10, -7)); 35 | final float Qwmin = (float) (4.483 * Math.pow(10, -7)); 36 | final float Qqmax = (float) (9.342 * Math.pow(10, -7)); 37 | final float Qwmax = (float) (8.159 * Math.pow(10, -7)); 38 | final float Rr = 3.672f; 39 | create(Qqmin, Qwmin, Qqmax, Qwmax, Rr); 40 | } 41 | 42 | public AHRSModule(float Qqmin, float Qwmin, float Qqmax, float Qwmax, 43 | float Rr) { 44 | // Experimentally found values 45 | // - for slow and steady motions: 46 | // Qq = 2.528 * 10^7, Qw = 4.483 * 10^7, Rr = 3.672 47 | // - for dynamic motions: 48 | // Qq = 9.342 * 10^7, Qw = 8.159 * 10^7, Rr = 3.672 49 | create(Qqmin, Qwmin, Qqmax, Qwmax, Rr); 50 | } 51 | 52 | private void create(float Qqmin, float Qwmin, float Qqmax, float Qwmax, 53 | float Rr) { 54 | addrEKF = EKFcreate(Qqmin, Qwmin, Qqmax, Qwmax, Rr); 55 | } 56 | 57 | public void predict(float wx, float wy, float wz, float dt) { 58 | // w is 3x1 gyro measurement 59 | float[] w = new float[3]; 60 | w[0] = wx; 61 | w[1] = wy; 62 | w[2] = wz; 63 | 64 | orientationEstimate = EKFpredict(addrEKF, w, dt); 65 | } 66 | 67 | public void correct(float q1, float q2, float q3, float q4) { 68 | // z is 4x1 quat orientation 69 | float[] z = new float[4]; 70 | z[0] = (float) q1; 71 | z[1] = (float) q2; 72 | z[2] = (float) q3; 73 | z[3] = (float) q4; 74 | 75 | orientationEstimate = EKFcorrect(addrEKF, z); 76 | } 77 | 78 | public float[] getEstimate() { 79 | return orientationEstimate; 80 | } 81 | 82 | public void destroy() { 83 | EKFdestroy(addrEKF); 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/AHRSModuleExport.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | #include 7 | 8 | #include "EKF/EKF.h" 9 | 10 | using namespace std; 11 | 12 | extern "C" { 13 | 14 | // Export declarations 15 | JNIEXPORT jlong JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcreate( 16 | JNIEnv*, jobject, jfloat Qq, jfloat Qw, jfloat Rr); 17 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFpredict( 18 | JNIEnv* env, jobject obj, jlong addrEKF, jfloatArray x, jfloat dt); 19 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcorrect( 20 | JNIEnv* env, jobject, jlong addrEKF, jfloatArray measurement); 21 | JNIEXPORT void JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFdestroy( 22 | JNIEnv*, jobject, jlong addrEKF); 23 | // 24 | // Implementation of export methods 25 | // 26 | 27 | JNIEXPORT jlong JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcreate( 28 | JNIEnv*, jobject, jfloat Qq, jfloat Qw, jfloat Rr) { 29 | 30 | // Create new object and return the pointer to it's instance 31 | return (long) (new EKF(Qq, Qw, Rr)); 32 | } 33 | 34 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFpredict( 35 | JNIEnv* env, jobject obj, jlong addrEKF, jfloatArray x, jfloat dt) { 36 | 37 | // Extracting array initialized in Java 38 | jfloat *inputArray = env->GetFloatArrayElements(x, 0); 39 | 40 | // Calling predict 41 | EKF &ekf = *(EKF*) addrEKF; 42 | float currentEstimate[4]; 43 | ekf.predict(inputArray, dt, currentEstimate); 44 | 45 | // Releasing NDK 46 | env->ReleaseFloatArrayElements(x, inputArray, 0); 47 | env->DeleteLocalRef(x); 48 | 49 | // Copying data to return 50 | jfloatArray state = (env)->NewFloatArray(4); 51 | (env)->SetFloatArrayRegion(state, 0, 4, currentEstimate); 52 | return state; 53 | } 54 | 55 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcorrect( 56 | JNIEnv* env, jobject, jlong addrEKF, jfloatArray measurement) { 57 | 58 | // Extracting array initialized in Java 59 | jfloat *measurementArray = env->GetFloatArrayElements(measurement, 0); 60 | 61 | // Calling correct 62 | EKF &ekf = *(EKF*) addrEKF; 63 | float currentEstimate[4]; 64 | ekf.correct(measurementArray, currentEstimate); 65 | 66 | // Releasing NDK 67 | env->ReleaseFloatArrayElements(measurement, measurementArray, 0); 68 | env->DeleteLocalRef(measurement); 69 | 70 | // Copying data to return 71 | jfloatArray state = (env)->NewFloatArray(4); 72 | (env)->SetFloatArrayRegion(state, 0, 4, currentEstimate); 73 | return state; 74 | } 75 | 76 | JNIEXPORT void JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFdestroy( 77 | JNIEnv* env, jobject, jlong addrEKF) { 78 | 79 | // Destroy object 80 | delete (EKF*) (addrEKF); 81 | } 82 | 83 | } 84 | 85 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/jni/AHRS/AHRSModuleExport.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | #include 7 | 8 | #include "EKF/EKF.h" 9 | 10 | using namespace std; 11 | 12 | extern "C" { 13 | 14 | // Export declarations 15 | JNIEXPORT jlong JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcreate( 16 | JNIEnv*, jobject, jfloat Qq, jfloat Qw, jfloat Rr); 17 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFpredict( 18 | JNIEnv* env, jobject obj, jlong addrEKF, jfloatArray x, jfloat dt); 19 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcorrect( 20 | JNIEnv* env, jobject, jlong addrEKF, jfloatArray measurement); 21 | JNIEXPORT void JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFdestroy( 22 | JNIEnv*, jobject, jlong addrEKF); 23 | // 24 | // Implementation of export methods 25 | // 26 | 27 | JNIEXPORT jlong JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcreate( 28 | JNIEnv*, jobject, jfloat Qq, jfloat Qw, jfloat Rr) { 29 | 30 | // Create new object and return the pointer to it's instance 31 | return (long) (new EKF(Qq, Qw, Rr)); 32 | } 33 | 34 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFpredict( 35 | JNIEnv* env, jobject obj, jlong addrEKF, jfloatArray x, jfloat dt) { 36 | 37 | // Extracting array initialized in Java 38 | jfloat *inputArray = env->GetFloatArrayElements(x, 0); 39 | 40 | // Calling predict 41 | EKF &ekf = *(EKF*) addrEKF; 42 | float currentEstimate[4]; 43 | ekf.predict(inputArray, dt, currentEstimate); 44 | 45 | // Releasing NDK 46 | env->ReleaseFloatArrayElements(x, inputArray, 0); 47 | env->DeleteLocalRef(x); 48 | 49 | // Copying data to return 50 | jfloatArray state = (env)->NewFloatArray(4); 51 | (env)->SetFloatArrayRegion(state, 0, 4, currentEstimate); 52 | return state; 53 | } 54 | 55 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcorrect( 56 | JNIEnv* env, jobject, jlong addrEKF, jfloatArray measurement) { 57 | 58 | // Extracting array initialized in Java 59 | jfloat *measurementArray = env->GetFloatArrayElements(measurement, 0); 60 | 61 | // Calling correct 62 | EKF &ekf = *(EKF*) addrEKF; 63 | float currentEstimate[4]; 64 | ekf.correct(measurementArray, currentEstimate); 65 | 66 | // Releasing NDK 67 | env->ReleaseFloatArrayElements(measurement, measurementArray, 0); 68 | env->DeleteLocalRef(measurement); 69 | 70 | // Copying data to return 71 | jfloatArray state = (env)->NewFloatArray(4); 72 | (env)->SetFloatArrayRegion(state, 0, 4, currentEstimate); 73 | return state; 74 | } 75 | 76 | JNIEXPORT void JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFdestroy( 77 | JNIEnv* env, jobject, jlong addrEKF) { 78 | 79 | // Destroy object 80 | delete (EKF*) (addrEKF); 81 | } 82 | 83 | } 84 | 85 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/Eigen2Support: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN2SUPPORT_H 26 | #define EIGEN2SUPPORT_H 27 | 28 | #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H)) 29 | #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header 30 | #endif 31 | 32 | #include "src/Core/util/DisableMSVCWarnings.h" 33 | 34 | namespace Eigen { 35 | 36 | /** \defgroup Eigen2Support_Module Eigen2 support module 37 | * This module provides a couple of deprecated functions improving the compatibility with Eigen2. 38 | * 39 | * To use it, define EIGEN2_SUPPORT before including any Eigen header 40 | * \code 41 | * #define EIGEN2_SUPPORT 42 | * \endcode 43 | * 44 | */ 45 | 46 | #include "src/Eigen2Support/Lazy.h" 47 | #include "src/Eigen2Support/Cwise.h" 48 | #include "src/Eigen2Support/CwiseOperators.h" 49 | #include "src/Eigen2Support/TriangularSolver.h" 50 | #include "src/Eigen2Support/Block.h" 51 | #include "src/Eigen2Support/VectorBlock.h" 52 | #include "src/Eigen2Support/Minor.h" 53 | 54 | 55 | } // namespace Eigen 56 | 57 | #include "src/Core/util/EnableMSVCWarnings.h" 58 | 59 | // Eigen2 used to include iostream 60 | #include 61 | 62 | #define USING_PART_OF_NAMESPACE_EIGEN \ 63 | EIGEN_USING_MATRIX_TYPEDEFS \ 64 | using Eigen::Matrix; \ 65 | using Eigen::MatrixBase; \ 66 | using Eigen::ei_random; \ 67 | using Eigen::ei_real; \ 68 | using Eigen::ei_imag; \ 69 | using Eigen::ei_conj; \ 70 | using Eigen::ei_abs; \ 71 | using Eigen::ei_abs2; \ 72 | using Eigen::ei_sqrt; \ 73 | using Eigen::ei_exp; \ 74 | using Eigen::ei_log; \ 75 | using Eigen::ei_sin; \ 76 | using Eigen::ei_cos; 77 | 78 | #endif // EIGEN2SUPPORT_H 79 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/Eigen2Support: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN2SUPPORT_H 26 | #define EIGEN2SUPPORT_H 27 | 28 | #if (!defined(EIGEN2_SUPPORT)) || (!defined(EIGEN_CORE_H)) 29 | #error Eigen2 support must be enabled by defining EIGEN2_SUPPORT before including any Eigen header 30 | #endif 31 | 32 | #include "src/Core/util/DisableMSVCWarnings.h" 33 | 34 | namespace Eigen { 35 | 36 | /** \defgroup Eigen2Support_Module Eigen2 support module 37 | * This module provides a couple of deprecated functions improving the compatibility with Eigen2. 38 | * 39 | * To use it, define EIGEN2_SUPPORT before including any Eigen header 40 | * \code 41 | * #define EIGEN2_SUPPORT 42 | * \endcode 43 | * 44 | */ 45 | 46 | #include "src/Eigen2Support/Lazy.h" 47 | #include "src/Eigen2Support/Cwise.h" 48 | #include "src/Eigen2Support/CwiseOperators.h" 49 | #include "src/Eigen2Support/TriangularSolver.h" 50 | #include "src/Eigen2Support/Block.h" 51 | #include "src/Eigen2Support/VectorBlock.h" 52 | #include "src/Eigen2Support/Minor.h" 53 | 54 | 55 | } // namespace Eigen 56 | 57 | #include "src/Core/util/EnableMSVCWarnings.h" 58 | 59 | // Eigen2 used to include iostream 60 | #include 61 | 62 | #define USING_PART_OF_NAMESPACE_EIGEN \ 63 | EIGEN_USING_MATRIX_TYPEDEFS \ 64 | using Eigen::Matrix; \ 65 | using Eigen::MatrixBase; \ 66 | using Eigen::ei_random; \ 67 | using Eigen::ei_real; \ 68 | using Eigen::ei_imag; \ 69 | using Eigen::ei_conj; \ 70 | using Eigen::ei_abs; \ 71 | using Eigen::ei_abs2; \ 72 | using Eigen::ei_sqrt; \ 73 | using Eigen::ei_exp; \ 74 | using Eigen::ei_log; \ 75 | using Eigen::ei_sin; \ 76 | using Eigen::ei_cos; 77 | 78 | #endif // EIGEN2SUPPORT_H 79 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Sparse/SparseTranspose.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSETRANSPOSE_H 26 | #define EIGEN_SPARSETRANSPOSE_H 27 | 28 | template class TransposeImpl 29 | : public SparseMatrixBase > 30 | { 31 | typedef typename ei_cleantype::type _MatrixTypeNested; 32 | public: 33 | 34 | EIGEN_SPARSE_PUBLIC_INTERFACE(Transpose) 35 | 36 | class InnerIterator; 37 | class ReverseInnerIterator; 38 | 39 | inline Index nonZeros() const { return derived().nestedExpression().nonZeros(); } 40 | }; 41 | 42 | template class TransposeImpl::InnerIterator 43 | : public _MatrixTypeNested::InnerIterator 44 | { 45 | typedef typename _MatrixTypeNested::InnerIterator Base; 46 | public: 47 | 48 | EIGEN_STRONG_INLINE InnerIterator(const TransposeImpl& trans, Index outer) 49 | : Base(trans.derived().nestedExpression(), outer) 50 | {} 51 | inline Index row() const { return Base::col(); } 52 | inline Index col() const { return Base::row(); } 53 | }; 54 | 55 | template class TransposeImpl::ReverseInnerIterator 56 | : public _MatrixTypeNested::ReverseInnerIterator 57 | { 58 | typedef typename _MatrixTypeNested::ReverseInnerIterator Base; 59 | public: 60 | 61 | EIGEN_STRONG_INLINE ReverseInnerIterator(const TransposeImpl& xpr, Index outer) 62 | : Base(xpr.derived().nestedExpression(), outer) 63 | {} 64 | inline Index row() const { return Base::col(); } 65 | inline Index col() const { return Base::row(); } 66 | }; 67 | 68 | #endif // EIGEN_SPARSETRANSPOSE_H 69 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/SparseTranspose.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSETRANSPOSE_H 26 | #define EIGEN_SPARSETRANSPOSE_H 27 | 28 | template class TransposeImpl 29 | : public SparseMatrixBase > 30 | { 31 | typedef typename ei_cleantype::type _MatrixTypeNested; 32 | public: 33 | 34 | EIGEN_SPARSE_PUBLIC_INTERFACE(Transpose) 35 | 36 | class InnerIterator; 37 | class ReverseInnerIterator; 38 | 39 | inline Index nonZeros() const { return derived().nestedExpression().nonZeros(); } 40 | }; 41 | 42 | template class TransposeImpl::InnerIterator 43 | : public _MatrixTypeNested::InnerIterator 44 | { 45 | typedef typename _MatrixTypeNested::InnerIterator Base; 46 | public: 47 | 48 | EIGEN_STRONG_INLINE InnerIterator(const TransposeImpl& trans, Index outer) 49 | : Base(trans.derived().nestedExpression(), outer) 50 | {} 51 | inline Index row() const { return Base::col(); } 52 | inline Index col() const { return Base::row(); } 53 | }; 54 | 55 | template class TransposeImpl::ReverseInnerIterator 56 | : public _MatrixTypeNested::ReverseInnerIterator 57 | { 58 | typedef typename _MatrixTypeNested::ReverseInnerIterator Base; 59 | public: 60 | 61 | EIGEN_STRONG_INLINE ReverseInnerIterator(const TransposeImpl& xpr, Index outer) 62 | : Base(xpr.derived().nestedExpression(), outer) 63 | {} 64 | inline Index row() const { return Base::col(); } 65 | inline Index col() const { return Base::row(); } 66 | }; 67 | 68 | #endif // EIGEN_SPARSETRANSPOSE_H 69 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/AHRSModuleExport.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | #include 7 | 8 | #include "EKF/EKF.h" 9 | 10 | using namespace std; 11 | 12 | extern "C" { 13 | 14 | // Export declarations 15 | JNIEXPORT jlong JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcreate( 16 | JNIEnv*, jobject, jfloat Qqmin, jfloat Qwmin, jfloat Qqmax, jfloat Qwmax, jfloat Rr); 17 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFpredict( 18 | JNIEnv* env, jobject obj, jlong addrEKF, jfloatArray x, jfloat dt); 19 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcorrect( 20 | JNIEnv* env, jobject, jlong addrEKF, jfloatArray measurement); 21 | JNIEXPORT void JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFdestroy( 22 | JNIEnv*, jobject, jlong addrEKF); 23 | // 24 | // Implementation of export methods 25 | // 26 | 27 | JNIEXPORT jlong JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcreate( 28 | JNIEnv*, jobject, jfloat Qqmin, jfloat Qwmin, jfloat Qqmax, jfloat Qwmax, jfloat Rr) { 29 | 30 | // Create new object and return the pointer to it's instance 31 | return (long) (new EKF(Qqmin, Qwmin, Qqmax, Qwmax, Rr)); 32 | } 33 | 34 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFpredict( 35 | JNIEnv* env, jobject obj, jlong addrEKF, jfloatArray x, jfloat dt) { 36 | 37 | // Extracting array initialized in Java 38 | jfloat *inputArray = env->GetFloatArrayElements(x, 0); 39 | 40 | // Calling predict 41 | EKF &ekf = *(EKF*) addrEKF; 42 | float currentEstimate[4]; 43 | ekf.predict(inputArray, dt, currentEstimate); 44 | 45 | // Releasing NDK 46 | env->ReleaseFloatArrayElements(x, inputArray, 0); 47 | env->DeleteLocalRef(x); 48 | 49 | // Copying data to return 50 | jfloatArray state = (env)->NewFloatArray(4); 51 | (env)->SetFloatArrayRegion(state, 0, 4, currentEstimate); 52 | return state; 53 | } 54 | 55 | JNIEXPORT jfloatArray JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFcorrect( 56 | JNIEnv* env, jobject, jlong addrEKF, jfloatArray measurement) { 57 | 58 | // Extracting array initialized in Java 59 | jfloat *measurementArray = env->GetFloatArrayElements(measurement, 0); 60 | 61 | // Calling correct 62 | EKF &ekf = *(EKF*) addrEKF; 63 | float currentEstimate[4]; 64 | ekf.correct(measurementArray, currentEstimate); 65 | 66 | // Releasing NDK 67 | env->ReleaseFloatArrayElements(measurement, measurementArray, 0); 68 | env->DeleteLocalRef(measurement); 69 | 70 | // Copying data to return 71 | jfloatArray state = (env)->NewFloatArray(4); 72 | (env)->SetFloatArrayRegion(state, 0, 4, currentEstimate); 73 | return state; 74 | } 75 | 76 | JNIEXPORT void JNICALL Java_org_put_dg_inertialSensors_AHRSModule_EKFdestroy( 77 | JNIEnv* env, jobject, jlong addrEKF) { 78 | 79 | // Destroy object 80 | delete (EKF*) (addrEKF); 81 | } 82 | 83 | } 84 | 85 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/plugins/CommonCwiseBinaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | // This file is a base class plugin containing common coefficient wise functions. 27 | 28 | /** \returns an expression of the difference of \c *this and \a other 29 | * 30 | * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-(). 31 | * 32 | * \sa class CwiseBinaryOp, operator-=() 33 | */ 34 | EIGEN_MAKE_CWISE_BINARY_OP(operator-,ei_scalar_difference_op) 35 | 36 | /** \returns an expression of the sum of \c *this and \a other 37 | * 38 | * \note If you want to add a given scalar to all coefficients, see Cwise::operator+(). 39 | * 40 | * \sa class CwiseBinaryOp, operator+=() 41 | */ 42 | EIGEN_MAKE_CWISE_BINARY_OP(operator+,ei_scalar_sum_op) 43 | 44 | /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other 45 | * 46 | * The template parameter \a CustomBinaryOp is the type of the functor 47 | * of the custom operator (see class CwiseBinaryOp for an example) 48 | * 49 | * Here is an example illustrating the use of custom functors: 50 | * \include class_CwiseBinaryOp.cpp 51 | * Output: \verbinclude class_CwiseBinaryOp.out 52 | * 53 | * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() 54 | */ 55 | template 56 | EIGEN_STRONG_INLINE const CwiseBinaryOp 57 | binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const 58 | { 59 | return CwiseBinaryOp(derived(), other.derived(), func); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Sparse/CoreIterators.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_COREITERATORS_H 26 | #define EIGEN_COREITERATORS_H 27 | 28 | /* This file contains the respective InnerIterator definition of the expressions defined in Eigen/Core 29 | */ 30 | 31 | /** \class InnerIterator 32 | * \brief An InnerIterator allows to loop over the element of a sparse (or dense) matrix or expression 33 | * 34 | * todo 35 | */ 36 | 37 | // generic version for dense matrix and expressions 38 | template class DenseBase::InnerIterator 39 | { 40 | protected: 41 | typedef typename Derived::Scalar Scalar; 42 | typedef typename Derived::Index Index; 43 | 44 | enum { IsRowMajor = (Derived::Flags&RowMajorBit)==RowMajorBit }; 45 | public: 46 | EIGEN_STRONG_INLINE InnerIterator(const Derived& expr, Index outer) 47 | : m_expression(expr), m_inner(0), m_outer(outer), m_end(expr.innerSize()) 48 | {} 49 | 50 | EIGEN_STRONG_INLINE Scalar value() const 51 | { 52 | return (IsRowMajor) ? m_expression.coeff(m_outer, m_inner) 53 | : m_expression.coeff(m_inner, m_outer); 54 | } 55 | 56 | EIGEN_STRONG_INLINE InnerIterator& operator++() { m_inner++; return *this; } 57 | 58 | EIGEN_STRONG_INLINE Index index() const { return m_inner; } 59 | inline Index row() const { return IsRowMajor ? m_outer : index(); } 60 | inline Index col() const { return IsRowMajor ? index() : m_outer; } 61 | 62 | EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } 63 | 64 | protected: 65 | const Derived& m_expression; 66 | Index m_inner; 67 | const Index m_outer; 68 | const Index m_end; 69 | }; 70 | 71 | #endif // EIGEN_COREITERATORS_H 72 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/plugins/CommonCwiseBinaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | // This file is a base class plugin containing common coefficient wise functions. 27 | 28 | /** \returns an expression of the difference of \c *this and \a other 29 | * 30 | * \note If you want to substract a given scalar from all coefficients, see Cwise::operator-(). 31 | * 32 | * \sa class CwiseBinaryOp, operator-=() 33 | */ 34 | EIGEN_MAKE_CWISE_BINARY_OP(operator-,ei_scalar_difference_op) 35 | 36 | /** \returns an expression of the sum of \c *this and \a other 37 | * 38 | * \note If you want to add a given scalar to all coefficients, see Cwise::operator+(). 39 | * 40 | * \sa class CwiseBinaryOp, operator+=() 41 | */ 42 | EIGEN_MAKE_CWISE_BINARY_OP(operator+,ei_scalar_sum_op) 43 | 44 | /** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other 45 | * 46 | * The template parameter \a CustomBinaryOp is the type of the functor 47 | * of the custom operator (see class CwiseBinaryOp for an example) 48 | * 49 | * Here is an example illustrating the use of custom functors: 50 | * \include class_CwiseBinaryOp.cpp 51 | * Output: \verbinclude class_CwiseBinaryOp.out 52 | * 53 | * \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct() 54 | */ 55 | template 56 | EIGEN_STRONG_INLINE const CwiseBinaryOp 57 | binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other, const CustomBinaryOp& func = CustomBinaryOp()) const 58 | { 59 | return CwiseBinaryOp(derived(), other.derived(), func); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/CoreIterators.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_COREITERATORS_H 26 | #define EIGEN_COREITERATORS_H 27 | 28 | /* This file contains the respective InnerIterator definition of the expressions defined in Eigen/Core 29 | */ 30 | 31 | /** \class InnerIterator 32 | * \brief An InnerIterator allows to loop over the element of a sparse (or dense) matrix or expression 33 | * 34 | * todo 35 | */ 36 | 37 | // generic version for dense matrix and expressions 38 | template class DenseBase::InnerIterator 39 | { 40 | protected: 41 | typedef typename Derived::Scalar Scalar; 42 | typedef typename Derived::Index Index; 43 | 44 | enum { IsRowMajor = (Derived::Flags&RowMajorBit)==RowMajorBit }; 45 | public: 46 | EIGEN_STRONG_INLINE InnerIterator(const Derived& expr, Index outer) 47 | : m_expression(expr), m_inner(0), m_outer(outer), m_end(expr.innerSize()) 48 | {} 49 | 50 | EIGEN_STRONG_INLINE Scalar value() const 51 | { 52 | return (IsRowMajor) ? m_expression.coeff(m_outer, m_inner) 53 | : m_expression.coeff(m_inner, m_outer); 54 | } 55 | 56 | EIGEN_STRONG_INLINE InnerIterator& operator++() { m_inner++; return *this; } 57 | 58 | EIGEN_STRONG_INLINE Index index() const { return m_inner; } 59 | inline Index row() const { return IsRowMajor ? m_outer : index(); } 60 | inline Index col() const { return IsRowMajor ? index() : m_outer; } 61 | 62 | EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } 63 | 64 | protected: 65 | const Derived& m_expression; 66 | Index m_inner; 67 | const Index m_outer; 68 | const Index m_end; 69 | }; 70 | 71 | #endif // EIGEN_COREITERATORS_H 72 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/src/org/put/dg/inertialSensors/InertialSensors.java: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | package org.put.dg.inertialSensors; 7 | 8 | import android.hardware.Sensor; 9 | import android.hardware.SensorEvent; 10 | import android.hardware.SensorEventListener; 11 | import android.hardware.SensorManager; 12 | 13 | public class InertialSensors { 14 | 15 | // Main Android handler 16 | SensorManager sensorManager; 17 | 18 | // AHRS 19 | AHRSModule ahrs; 20 | 21 | // Last timestamp 22 | long lastTimestamp; 23 | 24 | // Last estimates 25 | float gyro[], quaternion[]; 26 | 27 | // isRunning 28 | boolean isStarted; 29 | 30 | public InertialSensors(SensorManager _sensorManager) { 31 | sensorManager = _sensorManager; 32 | isStarted = false; 33 | 34 | ahrs = new AHRSModule(); 35 | 36 | gyro = new float[3]; 37 | quaternion = new float[4]; 38 | } 39 | 40 | public boolean getState() 41 | { 42 | return isStarted; 43 | } 44 | 45 | public void start() { 46 | isStarted = true; 47 | lastTimestamp = -1; 48 | 49 | // Sensor handlers 50 | Sensor gyro = sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); 51 | Sensor orientation = sensorManager 52 | .getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); 53 | 54 | // Starting listeners 55 | sensorManager.registerListener(sensorEventListener, gyro, 56 | SensorManager.SENSOR_DELAY_FASTEST); 57 | sensorManager.registerListener(sensorEventListener, orientation, 58 | SensorManager.SENSOR_DELAY_FASTEST); 59 | 60 | } 61 | 62 | public void stop() { 63 | isStarted = false; 64 | sensorManager.unregisterListener(sensorEventListener); 65 | } 66 | 67 | public float[] getCurrentOrientationEstimate() 68 | { 69 | return ahrs.getEstimate(); 70 | } 71 | 72 | private SensorEventListener sensorEventListener = new SensorEventListener() { 73 | 74 | public void onSensorChanged(SensorEvent event) { 75 | 76 | if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) { 77 | gyro[0] = event.values[0]; 78 | gyro[1] = event.values[1]; 79 | gyro[2] = event.values[2]; 80 | 81 | 82 | // Time from last update converted from ns to s 83 | final float convertNs2s = 1000000000.0f; 84 | 85 | float dt = 0.0f; 86 | if ( lastTimestamp >= 0) 87 | dt = (lastTimestamp - event.timestamp)/convertNs2s; 88 | lastTimestamp = event.timestamp; 89 | 90 | ahrs.predict(event.values[0], event.values[1], event.values[2], dt); 91 | 92 | } else if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { 93 | // Convention (qw, qx, qy, qz) 94 | SensorManager.getQuaternionFromVector(quaternion, event.values); 95 | ahrs.correct(quaternion[0], quaternion[1], quaternion[2], quaternion[3]); 96 | } 97 | } 98 | 99 | @Override 100 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 101 | // TODO Auto-generated method stub 102 | } 103 | }; 104 | 105 | } 106 | 107 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/src/org/put/dg/inertialSensors/InertialSensors.java: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | package org.put.dg.inertialSensors; 7 | 8 | import android.hardware.Sensor; 9 | import android.hardware.SensorEvent; 10 | import android.hardware.SensorEventListener; 11 | import android.hardware.SensorManager; 12 | 13 | public class InertialSensors { 14 | 15 | // Main Android handler 16 | SensorManager sensorManager; 17 | 18 | // AHRS 19 | AHRSModule ahrs; 20 | 21 | // Last timestamp 22 | long lastTimestamp; 23 | 24 | // Last estimates 25 | float gyro[], quaternion[]; 26 | 27 | // isRunning 28 | boolean isStarted; 29 | 30 | public InertialSensors(SensorManager _sensorManager) { 31 | sensorManager = _sensorManager; 32 | isStarted = false; 33 | 34 | ahrs = new AHRSModule(); 35 | 36 | gyro = new float[3]; 37 | quaternion = new float[4]; 38 | } 39 | 40 | public boolean getState() 41 | { 42 | return isStarted; 43 | } 44 | 45 | public void start() { 46 | isStarted = true; 47 | lastTimestamp = -1; 48 | 49 | // Sensor handlers 50 | Sensor gyro = sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); 51 | Sensor orientation = sensorManager 52 | .getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); 53 | 54 | // Starting listeners 55 | sensorManager.registerListener(sensorEventListener, gyro, 56 | SensorManager.SENSOR_DELAY_FASTEST); 57 | sensorManager.registerListener(sensorEventListener, orientation, 58 | SensorManager.SENSOR_DELAY_FASTEST); 59 | 60 | } 61 | 62 | public void stop() { 63 | isStarted = false; 64 | sensorManager.unregisterListener(sensorEventListener); 65 | } 66 | 67 | public float[] getCurrentOrientationEstimate() 68 | { 69 | return ahrs.getEstimate(); 70 | } 71 | 72 | private SensorEventListener sensorEventListener = new SensorEventListener() { 73 | 74 | public void onSensorChanged(SensorEvent event) { 75 | 76 | if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) { 77 | gyro[0] = event.values[0]; 78 | gyro[1] = event.values[1]; 79 | gyro[2] = event.values[2]; 80 | 81 | 82 | // Time from last update converted from ns to s 83 | final float convertNs2s = 1000000000.0f; 84 | 85 | float dt = 0.0f; 86 | if ( lastTimestamp >= 0) 87 | dt = (lastTimestamp - event.timestamp)/convertNs2s; 88 | lastTimestamp = event.timestamp; 89 | 90 | ahrs.predict(event.values[0], event.values[1], event.values[2], dt); 91 | 92 | } else if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { 93 | // Convention (qw, qx, qy, qz) 94 | SensorManager.getQuaternionFromVector(quaternion, event.values); 95 | ahrs.correct(quaternion[0], quaternion[1], quaternion[2], quaternion[3]); 96 | } 97 | } 98 | 99 | @Override 100 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 101 | // TODO Auto-generated method stub 102 | } 103 | }; 104 | 105 | } 106 | 107 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/src/org/put/dg/inertialSensors/InertialSensors.java: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Michal Nowicki michal.nowicki@put.poznan.pl 3 | * 4 | */ 5 | 6 | package org.put.dg.inertialSensors; 7 | 8 | import android.hardware.Sensor; 9 | import android.hardware.SensorEvent; 10 | import android.hardware.SensorEventListener; 11 | import android.hardware.SensorManager; 12 | 13 | public class InertialSensors { 14 | 15 | // Main Android handler 16 | SensorManager sensorManager; 17 | 18 | // AHRS 19 | AHRSModule ahrs; 20 | 21 | // Last timestamp 22 | long lastTimestamp; 23 | 24 | // Last estimates 25 | float gyro[], quaternion[]; 26 | 27 | // isRunning 28 | boolean isStarted; 29 | 30 | public InertialSensors(SensorManager _sensorManager) { 31 | sensorManager = _sensorManager; 32 | isStarted = false; 33 | 34 | 35 | 36 | gyro = new float[3]; 37 | quaternion = new float[4]; 38 | } 39 | 40 | public boolean getState() 41 | { 42 | return isStarted; 43 | } 44 | 45 | public void start() { 46 | ahrs = new AHRSModule(); 47 | isStarted = true; 48 | lastTimestamp = -1; 49 | 50 | // Sensor handlers 51 | Sensor gyro = sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); 52 | Sensor orientation = sensorManager 53 | .getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); 54 | 55 | // Starting listeners 56 | sensorManager.registerListener(sensorEventListener, gyro, 57 | SensorManager.SENSOR_DELAY_FASTEST); 58 | sensorManager.registerListener(sensorEventListener, orientation, 59 | SensorManager.SENSOR_DELAY_FASTEST); 60 | 61 | } 62 | 63 | public void stop() { 64 | isStarted = false; 65 | sensorManager.unregisterListener(sensorEventListener); 66 | } 67 | 68 | public float[] getCurrentOrientationEstimate() 69 | { 70 | return ahrs.getEstimate(); 71 | } 72 | 73 | private SensorEventListener sensorEventListener = new SensorEventListener() { 74 | 75 | public void onSensorChanged(SensorEvent event) { 76 | 77 | if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) { 78 | gyro[0] = event.values[0]; 79 | gyro[1] = event.values[1]; 80 | gyro[2] = event.values[2]; 81 | 82 | 83 | // Time from last update converted from ns to s 84 | final float convertNs2s = 1000000000.0f; 85 | 86 | float dt = 0.0f; 87 | if ( lastTimestamp >= 0) 88 | dt = (lastTimestamp - event.timestamp)/convertNs2s; 89 | lastTimestamp = event.timestamp; 90 | 91 | ahrs.predict(event.values[0], event.values[1], event.values[2], dt); 92 | 93 | } else if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { 94 | // Convention (qw, qx, qy, qz) 95 | SensorManager.getQuaternionFromVector(quaternion, event.values); 96 | ahrs.correct(quaternion[0], quaternion[1], quaternion[2], quaternion[3]); 97 | } 98 | } 99 | 100 | @Override 101 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 102 | // TODO Auto-generated method stub 103 | } 104 | }; 105 | 106 | } 107 | 108 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | 27 | /* All the parameters defined in this file can be specialized in the 28 | * architecture specific files, and/or by the user. 29 | * More to come... */ 30 | 31 | #ifndef EIGEN_DEFAULT_SETTINGS_H 32 | #define EIGEN_DEFAULT_SETTINGS_H 33 | 34 | /** Defines the maximal loop size to enable meta unrolling of loops. 35 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 36 | * it does not correspond to the number of iterations or the number of instructions 37 | */ 38 | #ifndef EIGEN_UNROLLING_LIMIT 39 | #define EIGEN_UNROLLING_LIMIT 100 40 | #endif 41 | 42 | /** Defines the threshold between a "small" and a "large" matrix. 43 | * This threshold is mainly used to select the proper product implementation. 44 | */ 45 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 46 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 47 | #endif 48 | 49 | /** Defines the maximal size in Bytes of blocks fitting in CPU cache. 50 | * The current value is set to generate blocks of 256x256 for float 51 | * 52 | * Typically for a single-threaded application you would set that to 25% of the size of your CPU caches in bytes 53 | */ 54 | #ifndef EIGEN_TUNE_FOR_CPU_CACHE_SIZE 55 | #define EIGEN_TUNE_FOR_CPU_CACHE_SIZE (sizeof(float)*512*512) 56 | #endif 57 | 58 | /** Defines the maximal width of the blocks used in the triangular product and solver 59 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 60 | */ 61 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 62 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 63 | #endif 64 | 65 | 66 | /** Defines the default number of registers available for that architecture. 67 | * Currently it must be 8 or 16. Other values will fail. 68 | */ 69 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 70 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 71 | #endif 72 | 73 | #endif // EIGEN_DEFAULT_SETTINGS_H 74 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Core/arch/Default/Settings.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2010 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | 27 | /* All the parameters defined in this file can be specialized in the 28 | * architecture specific files, and/or by the user. 29 | * More to come... */ 30 | 31 | #ifndef EIGEN_DEFAULT_SETTINGS_H 32 | #define EIGEN_DEFAULT_SETTINGS_H 33 | 34 | /** Defines the maximal loop size to enable meta unrolling of loops. 35 | * Note that the value here is expressed in Eigen's own notion of "number of FLOPS", 36 | * it does not correspond to the number of iterations or the number of instructions 37 | */ 38 | #ifndef EIGEN_UNROLLING_LIMIT 39 | #define EIGEN_UNROLLING_LIMIT 100 40 | #endif 41 | 42 | /** Defines the threshold between a "small" and a "large" matrix. 43 | * This threshold is mainly used to select the proper product implementation. 44 | */ 45 | #ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 46 | #define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 8 47 | #endif 48 | 49 | /** Defines the maximal size in Bytes of blocks fitting in CPU cache. 50 | * The current value is set to generate blocks of 256x256 for float 51 | * 52 | * Typically for a single-threaded application you would set that to 25% of the size of your CPU caches in bytes 53 | */ 54 | #ifndef EIGEN_TUNE_FOR_CPU_CACHE_SIZE 55 | #define EIGEN_TUNE_FOR_CPU_CACHE_SIZE (sizeof(float)*512*512) 56 | #endif 57 | 58 | /** Defines the maximal width of the blocks used in the triangular product and solver 59 | * for vectors (level 2 blas xTRMV and xTRSV). The default is 8. 60 | */ 61 | #ifndef EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 62 | #define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH 8 63 | #endif 64 | 65 | 66 | /** Defines the default number of registers available for that architecture. 67 | * Currently it must be 8 or 16. Other values will fail. 68 | */ 69 | #ifndef EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 70 | #define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS 8 71 | #endif 72 | 73 | #endif // EIGEN_DEFAULT_SETTINGS_H 74 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Eigen2Support/Lazy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Benoit Jacob 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_LAZY_H 26 | #define EIGEN_LAZY_H 27 | 28 | /** \deprecated it is only used by lazy() which is deprecated 29 | * 30 | * \returns an expression of *this with added flags 31 | * 32 | * Example: \include MatrixBase_marked.cpp 33 | * Output: \verbinclude MatrixBase_marked.out 34 | * 35 | * \sa class Flagged, extract(), part() 36 | */ 37 | template 38 | template 39 | inline const Flagged 40 | MatrixBase::marked() const 41 | { 42 | return derived(); 43 | } 44 | 45 | /** \deprecated use MatrixBase::noalias() 46 | * 47 | * \returns an expression of *this with the EvalBeforeAssigningBit flag removed. 48 | * 49 | * Example: \include MatrixBase_lazy.cpp 50 | * Output: \verbinclude MatrixBase_lazy.out 51 | * 52 | * \sa class Flagged, marked() 53 | */ 54 | template 55 | inline const Flagged 56 | MatrixBase::lazy() const 57 | { 58 | return derived(); 59 | } 60 | 61 | 62 | /** \internal 63 | * Overloaded to perform an efficient C += (A*B).lazy() */ 64 | template 65 | template 66 | Derived& MatrixBase::operator+=(const Flagged, 0, 67 | EvalBeforeAssigningBit>& other) 68 | { 69 | other._expression().derived().addTo(derived()); return derived(); 70 | } 71 | 72 | /** \internal 73 | * Overloaded to perform an efficient C -= (A*B).lazy() */ 74 | template 75 | template 76 | Derived& MatrixBase::operator-=(const Flagged, 0, 77 | EvalBeforeAssigningBit>& other) 78 | { 79 | other._expression().derived().subTo(derived()); return derived(); 80 | } 81 | 82 | #endif // EIGEN_LAZY_H 83 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Eigen2Support/Lazy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Benoit Jacob 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_LAZY_H 26 | #define EIGEN_LAZY_H 27 | 28 | /** \deprecated it is only used by lazy() which is deprecated 29 | * 30 | * \returns an expression of *this with added flags 31 | * 32 | * Example: \include MatrixBase_marked.cpp 33 | * Output: \verbinclude MatrixBase_marked.out 34 | * 35 | * \sa class Flagged, extract(), part() 36 | */ 37 | template 38 | template 39 | inline const Flagged 40 | MatrixBase::marked() const 41 | { 42 | return derived(); 43 | } 44 | 45 | /** \deprecated use MatrixBase::noalias() 46 | * 47 | * \returns an expression of *this with the EvalBeforeAssigningBit flag removed. 48 | * 49 | * Example: \include MatrixBase_lazy.cpp 50 | * Output: \verbinclude MatrixBase_lazy.out 51 | * 52 | * \sa class Flagged, marked() 53 | */ 54 | template 55 | inline const Flagged 56 | MatrixBase::lazy() const 57 | { 58 | return derived(); 59 | } 60 | 61 | 62 | /** \internal 63 | * Overloaded to perform an efficient C += (A*B).lazy() */ 64 | template 65 | template 66 | Derived& MatrixBase::operator+=(const Flagged, 0, 67 | EvalBeforeAssigningBit>& other) 68 | { 69 | other._expression().derived().addTo(derived()); return derived(); 70 | } 71 | 72 | /** \internal 73 | * Overloaded to perform an efficient C -= (A*B).lazy() */ 74 | template 75 | template 76 | Derived& MatrixBase::operator-=(const Flagged, 0, 77 | EvalBeforeAssigningBit>& other) 78 | { 79 | other._expression().derived().subTo(derived()); return derived(); 80 | } 81 | 82 | #endif // EIGEN_LAZY_H 83 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PUTOrientation 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | auto,full,incremental, 11 | 12 | 13 | ?name? 14 | 15 | 16 | 17 | org.eclipse.cdt.make.core.append_environment 18 | true 19 | 20 | 21 | org.eclipse.cdt.make.core.autoBuildTarget 22 | 23 | 24 | 25 | org.eclipse.cdt.make.core.buildArguments 26 | 27 | 28 | 29 | org.eclipse.cdt.make.core.buildCommand 30 | ${NDKROOT}/ndk-build.cmd 31 | 32 | 33 | org.eclipse.cdt.make.core.cleanBuildTarget 34 | clean 35 | 36 | 37 | org.eclipse.cdt.make.core.contents 38 | org.eclipse.cdt.make.core.activeConfigSettings 39 | 40 | 41 | org.eclipse.cdt.make.core.enableAutoBuild 42 | true 43 | 44 | 45 | org.eclipse.cdt.make.core.enableCleanBuild 46 | false 47 | 48 | 49 | org.eclipse.cdt.make.core.enableFullBuild 50 | true 51 | 52 | 53 | org.eclipse.cdt.make.core.fullBuildTarget 54 | 55 | 56 | 57 | org.eclipse.cdt.make.core.stopOnError 58 | true 59 | 60 | 61 | org.eclipse.cdt.make.core.useDefaultBuildCmd 62 | false 63 | 64 | 65 | 66 | 67 | com.android.ide.eclipse.adt.ResourceManagerBuilder 68 | 69 | 70 | 71 | 72 | com.android.ide.eclipse.adt.PreCompilerBuilder 73 | 74 | 75 | 76 | 77 | org.eclipse.jdt.core.javabuilder 78 | 79 | 80 | 81 | 82 | com.android.ide.eclipse.adt.ApkBuilder 83 | 84 | 85 | 86 | 87 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 88 | full,incremental, 89 | 90 | 91 | 92 | 93 | 94 | com.android.ide.eclipse.adt.AndroidNature 95 | org.eclipse.jdt.core.javanature 96 | org.eclipse.cdt.core.cnature 97 | org.eclipse.cdt.core.ccnature 98 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 99 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 100 | 101 | 102 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PUTOrientation 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | auto,full,incremental, 11 | 12 | 13 | ?name? 14 | 15 | 16 | 17 | org.eclipse.cdt.make.core.append_environment 18 | true 19 | 20 | 21 | org.eclipse.cdt.make.core.autoBuildTarget 22 | 23 | 24 | 25 | org.eclipse.cdt.make.core.buildArguments 26 | 27 | 28 | 29 | org.eclipse.cdt.make.core.buildCommand 30 | ${NDKROOT}/ndk-build.cmd 31 | 32 | 33 | org.eclipse.cdt.make.core.cleanBuildTarget 34 | clean 35 | 36 | 37 | org.eclipse.cdt.make.core.contents 38 | org.eclipse.cdt.make.core.activeConfigSettings 39 | 40 | 41 | org.eclipse.cdt.make.core.enableAutoBuild 42 | true 43 | 44 | 45 | org.eclipse.cdt.make.core.enableCleanBuild 46 | false 47 | 48 | 49 | org.eclipse.cdt.make.core.enableFullBuild 50 | true 51 | 52 | 53 | org.eclipse.cdt.make.core.fullBuildTarget 54 | 55 | 56 | 57 | org.eclipse.cdt.make.core.stopOnError 58 | true 59 | 60 | 61 | org.eclipse.cdt.make.core.useDefaultBuildCmd 62 | false 63 | 64 | 65 | 66 | 67 | com.android.ide.eclipse.adt.ResourceManagerBuilder 68 | 69 | 70 | 71 | 72 | com.android.ide.eclipse.adt.PreCompilerBuilder 73 | 74 | 75 | 76 | 77 | org.eclipse.jdt.core.javabuilder 78 | 79 | 80 | 81 | 82 | com.android.ide.eclipse.adt.ApkBuilder 83 | 84 | 85 | 86 | 87 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 88 | full,incremental, 89 | 90 | 91 | 92 | 93 | 94 | com.android.ide.eclipse.adt.AndroidNature 95 | org.eclipse.jdt.core.javanature 96 | org.eclipse.cdt.core.cnature 97 | org.eclipse.cdt.core.ccnature 98 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 99 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 100 | 101 | 102 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_OpenCV/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PUTOrientation 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | auto,full,incremental, 11 | 12 | 13 | ?name? 14 | 15 | 16 | 17 | org.eclipse.cdt.make.core.append_environment 18 | true 19 | 20 | 21 | org.eclipse.cdt.make.core.autoBuildTarget 22 | 23 | 24 | 25 | org.eclipse.cdt.make.core.buildArguments 26 | 27 | 28 | 29 | org.eclipse.cdt.make.core.buildCommand 30 | ${NDKROOT}/ndk-build.cmd 31 | 32 | 33 | org.eclipse.cdt.make.core.cleanBuildTarget 34 | clean 35 | 36 | 37 | org.eclipse.cdt.make.core.contents 38 | org.eclipse.cdt.make.core.activeConfigSettings 39 | 40 | 41 | org.eclipse.cdt.make.core.enableAutoBuild 42 | true 43 | 44 | 45 | org.eclipse.cdt.make.core.enableCleanBuild 46 | false 47 | 48 | 49 | org.eclipse.cdt.make.core.enableFullBuild 50 | true 51 | 52 | 53 | org.eclipse.cdt.make.core.fullBuildTarget 54 | 55 | 56 | 57 | org.eclipse.cdt.make.core.stopOnError 58 | true 59 | 60 | 61 | org.eclipse.cdt.make.core.useDefaultBuildCmd 62 | false 63 | 64 | 65 | 66 | 67 | com.android.ide.eclipse.adt.ResourceManagerBuilder 68 | 69 | 70 | 71 | 72 | com.android.ide.eclipse.adt.PreCompilerBuilder 73 | 74 | 75 | 76 | 77 | org.eclipse.jdt.core.javabuilder 78 | 79 | 80 | 81 | 82 | com.android.ide.eclipse.adt.ApkBuilder 83 | 84 | 85 | 86 | 87 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 88 | full,incremental, 89 | 90 | 91 | 92 | 93 | 94 | com.android.ide.eclipse.adt.AndroidNature 95 | org.eclipse.jdt.core.javanature 96 | org.eclipse.cdt.core.cnature 97 | org.eclipse.cdt.core.ccnature 98 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 99 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 100 | 101 | 102 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/misc/Solve.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_MISC_SOLVE_H 26 | #define EIGEN_MISC_SOLVE_H 27 | 28 | /** \class ei_solve_retval_base 29 | * 30 | */ 31 | template 32 | struct ei_traits > 33 | { 34 | typedef typename DecompositionType::MatrixType MatrixType; 35 | typedef Matrix ReturnType; 41 | }; 42 | 43 | template struct ei_solve_retval_base 44 | : public ReturnByValue > 45 | { 46 | typedef typename ei_cleantype::type RhsNestedCleaned; 47 | typedef _DecompositionType DecompositionType; 48 | typedef ReturnByValue Base; 49 | typedef typename Base::Index Index; 50 | 51 | ei_solve_retval_base(const DecompositionType& dec, const Rhs& rhs) 52 | : m_dec(dec), m_rhs(rhs) 53 | {} 54 | 55 | inline Index rows() const { return m_dec.cols(); } 56 | inline Index cols() const { return m_rhs.cols(); } 57 | inline const DecompositionType& dec() const { return m_dec; } 58 | inline const RhsNestedCleaned& rhs() const { return m_rhs; } 59 | 60 | template inline void evalTo(Dest& dst) const 61 | { 62 | static_cast*>(this)->evalTo(dst); 63 | } 64 | 65 | protected: 66 | const DecompositionType& m_dec; 67 | const typename Rhs::Nested m_rhs; 68 | }; 69 | 70 | #define EIGEN_MAKE_SOLVE_HELPERS(DecompositionType,Rhs) \ 71 | typedef typename DecompositionType::MatrixType MatrixType; \ 72 | typedef typename MatrixType::Scalar Scalar; \ 73 | typedef typename MatrixType::RealScalar RealScalar; \ 74 | typedef typename MatrixType::Index Index; \ 75 | typedef ei_solve_retval_base Base; \ 76 | using Base::dec; \ 77 | using Base::rhs; \ 78 | using Base::rows; \ 79 | using Base::cols; \ 80 | ei_solve_retval(const DecompositionType& dec, const Rhs& rhs) \ 81 | : Base(dec, rhs) {} 82 | 83 | #endif // EIGEN_MISC_SOLVE_H 84 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/misc/Solve.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Benoit Jacob 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_MISC_SOLVE_H 26 | #define EIGEN_MISC_SOLVE_H 27 | 28 | /** \class ei_solve_retval_base 29 | * 30 | */ 31 | template 32 | struct ei_traits > 33 | { 34 | typedef typename DecompositionType::MatrixType MatrixType; 35 | typedef Matrix ReturnType; 41 | }; 42 | 43 | template struct ei_solve_retval_base 44 | : public ReturnByValue > 45 | { 46 | typedef typename ei_cleantype::type RhsNestedCleaned; 47 | typedef _DecompositionType DecompositionType; 48 | typedef ReturnByValue Base; 49 | typedef typename Base::Index Index; 50 | 51 | ei_solve_retval_base(const DecompositionType& dec, const Rhs& rhs) 52 | : m_dec(dec), m_rhs(rhs) 53 | {} 54 | 55 | inline Index rows() const { return m_dec.cols(); } 56 | inline Index cols() const { return m_rhs.cols(); } 57 | inline const DecompositionType& dec() const { return m_dec; } 58 | inline const RhsNestedCleaned& rhs() const { return m_rhs; } 59 | 60 | template inline void evalTo(Dest& dst) const 61 | { 62 | static_cast*>(this)->evalTo(dst); 63 | } 64 | 65 | protected: 66 | const DecompositionType& m_dec; 67 | const typename Rhs::Nested m_rhs; 68 | }; 69 | 70 | #define EIGEN_MAKE_SOLVE_HELPERS(DecompositionType,Rhs) \ 71 | typedef typename DecompositionType::MatrixType MatrixType; \ 72 | typedef typename MatrixType::Scalar Scalar; \ 73 | typedef typename MatrixType::RealScalar RealScalar; \ 74 | typedef typename MatrixType::Index Index; \ 75 | typedef ei_solve_retval_base Base; \ 76 | using Base::dec; \ 77 | using Base::rhs; \ 78 | using Base::rows; \ 79 | using Base::cols; \ 80 | ei_solve_retval(const DecompositionType& dec, const Rhs& rhs) \ 81 | : Base(dec, rhs) {} 82 | 83 | #endif // EIGEN_MISC_SOLVE_H 84 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/plugins/MatrixCwiseUnaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | // This file is a base class plugin containing matrix specifics coefficient wise functions. 27 | 28 | /** \returns an expression of the coefficient-wise absolute value of \c *this 29 | * 30 | * Example: \include MatrixBase_cwiseAbs.cpp 31 | * Output: \verbinclude MatrixBase_cwiseAbs.out 32 | * 33 | * \sa cwiseAbs2() 34 | */ 35 | EIGEN_STRONG_INLINE const CwiseUnaryOp,Derived> 36 | cwiseAbs() const { return derived(); } 37 | 38 | /** \returns an expression of the coefficient-wise squared absolute value of \c *this 39 | * 40 | * Example: \include MatrixBase_cwiseAbs2.cpp 41 | * Output: \verbinclude MatrixBase_cwiseAbs2.out 42 | * 43 | * \sa cwiseAbs() 44 | */ 45 | EIGEN_STRONG_INLINE const CwiseUnaryOp,Derived> 46 | cwiseAbs2() const { return derived(); } 47 | 48 | /** \returns an expression of the coefficient-wise square root of *this. 49 | * 50 | * Example: \include MatrixBase_cwiseSqrt.cpp 51 | * Output: \verbinclude MatrixBase_cwiseSqrt.out 52 | * 53 | * \sa cwisePow(), cwiseSquare() 54 | */ 55 | inline const CwiseUnaryOp,Derived> 56 | cwiseSqrt() const { return derived(); } 57 | 58 | /** \returns an expression of the coefficient-wise inverse of *this. 59 | * 60 | * Example: \include MatrixBase_cwiseInverse.cpp 61 | * Output: \verbinclude MatrixBase_cwiseInverse.out 62 | * 63 | * \sa cwiseProduct() 64 | */ 65 | inline const CwiseUnaryOp,Derived> 66 | cwiseInverse() const { return derived(); } 67 | 68 | /** \returns an expression of the coefficient-wise == operator of \c *this and a scalar \a s 69 | * 70 | * \warning this performs an exact comparison, which is generally a bad idea with floating-point types. 71 | * In order to check for equality between two vectors or matrices with floating-point coefficients, it is 72 | * generally a far better idea to use a fuzzy comparison as provided by isApprox() and 73 | * isMuchSmallerThan(). 74 | * 75 | * \sa cwiseEqual(const MatrixBase &) const 76 | */ 77 | inline const CwiseUnaryOp >,Derived> 78 | cwiseEqual(const Scalar& s) const 79 | { 80 | return CwiseUnaryOp >,Derived> 81 | (derived(), std::bind1st(std::equal_to(), s)); 82 | } 83 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/plugins/MatrixCwiseUnaryOps.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // Copyright (C) 2006-2008 Benoit Jacob 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | // This file is a base class plugin containing matrix specifics coefficient wise functions. 27 | 28 | /** \returns an expression of the coefficient-wise absolute value of \c *this 29 | * 30 | * Example: \include MatrixBase_cwiseAbs.cpp 31 | * Output: \verbinclude MatrixBase_cwiseAbs.out 32 | * 33 | * \sa cwiseAbs2() 34 | */ 35 | EIGEN_STRONG_INLINE const CwiseUnaryOp,Derived> 36 | cwiseAbs() const { return derived(); } 37 | 38 | /** \returns an expression of the coefficient-wise squared absolute value of \c *this 39 | * 40 | * Example: \include MatrixBase_cwiseAbs2.cpp 41 | * Output: \verbinclude MatrixBase_cwiseAbs2.out 42 | * 43 | * \sa cwiseAbs() 44 | */ 45 | EIGEN_STRONG_INLINE const CwiseUnaryOp,Derived> 46 | cwiseAbs2() const { return derived(); } 47 | 48 | /** \returns an expression of the coefficient-wise square root of *this. 49 | * 50 | * Example: \include MatrixBase_cwiseSqrt.cpp 51 | * Output: \verbinclude MatrixBase_cwiseSqrt.out 52 | * 53 | * \sa cwisePow(), cwiseSquare() 54 | */ 55 | inline const CwiseUnaryOp,Derived> 56 | cwiseSqrt() const { return derived(); } 57 | 58 | /** \returns an expression of the coefficient-wise inverse of *this. 59 | * 60 | * Example: \include MatrixBase_cwiseInverse.cpp 61 | * Output: \verbinclude MatrixBase_cwiseInverse.out 62 | * 63 | * \sa cwiseProduct() 64 | */ 65 | inline const CwiseUnaryOp,Derived> 66 | cwiseInverse() const { return derived(); } 67 | 68 | /** \returns an expression of the coefficient-wise == operator of \c *this and a scalar \a s 69 | * 70 | * \warning this performs an exact comparison, which is generally a bad idea with floating-point types. 71 | * In order to check for equality between two vectors or matrices with floating-point coefficients, it is 72 | * generally a far better idea to use a fuzzy comparison as provided by isApprox() and 73 | * isMuchSmallerThan(). 74 | * 75 | * \sa cwiseEqual(const MatrixBase &) const 76 | */ 77 | inline const CwiseUnaryOp >,Derived> 78 | cwiseEqual(const Scalar& s) const 79 | { 80 | return CwiseUnaryOp >,Derived> 81 | (derived(), std::bind1st(std::equal_to(), s)); 82 | } 83 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Geometry/EulerAngles.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_EULERANGLES_H 26 | #define EIGEN_EULERANGLES_H 27 | 28 | /** \geometry_module \ingroup Geometry_Module 29 | * 30 | * 31 | * \returns the Euler-angles of the rotation matrix \c *this using the convention defined by the triplet (\a a0,\a a1,\a a2) 32 | * 33 | * Each of the three parameters \a a0,\a a1,\a a2 represents the respective rotation axis as an integer in {0,1,2}. 34 | * For instance, in: 35 | * \code Vector3f ea = mat.eulerAngles(2, 0, 2); \endcode 36 | * "2" represents the z axis and "0" the x axis, etc. The returned angles are such that 37 | * we have the following equality: 38 | * \code 39 | * mat == AngleAxisf(ea[0], Vector3f::UnitZ()) 40 | * * AngleAxisf(ea[1], Vector3f::UnitX()) 41 | * * AngleAxisf(ea[2], Vector3f::UnitZ()); \endcode 42 | * This corresponds to the right-multiply conventions (with right hand side frames). 43 | */ 44 | template 45 | inline Matrix::Scalar,3,1> 46 | MatrixBase::eulerAngles(Index a0, Index a1, Index a2) const 47 | { 48 | /* Implemented from Graphics Gems IV */ 49 | EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived,3,3) 50 | 51 | Matrix res; 52 | typedef Matrix Vector2; 53 | const Scalar epsilon = NumTraits::dummy_precision(); 54 | 55 | const Index odd = ((a0+1)%3 == a1) ? 0 : 1; 56 | const Index i = a0; 57 | const Index j = (a0 + 1 + odd)%3; 58 | const Index k = (a0 + 2 - odd)%3; 59 | 60 | if (a0==a2) 61 | { 62 | Scalar s = Vector2(coeff(j,i) , coeff(k,i)).norm(); 63 | res[1] = ei_atan2(s, coeff(i,i)); 64 | if (s > epsilon) 65 | { 66 | res[0] = ei_atan2(coeff(j,i), coeff(k,i)); 67 | res[2] = ei_atan2(coeff(i,j),-coeff(i,k)); 68 | } 69 | else 70 | { 71 | res[0] = Scalar(0); 72 | res[2] = (coeff(i,i)>0?1:-1)*ei_atan2(-coeff(k,j), coeff(j,j)); 73 | } 74 | } 75 | else 76 | { 77 | Scalar c = Vector2(coeff(i,i) , coeff(i,j)).norm(); 78 | res[1] = ei_atan2(-coeff(i,k), c); 79 | if (c > epsilon) 80 | { 81 | res[0] = ei_atan2(coeff(j,k), coeff(k,k)); 82 | res[2] = ei_atan2(coeff(i,j), coeff(i,i)); 83 | } 84 | else 85 | { 86 | res[0] = Scalar(0); 87 | res[2] = (coeff(i,k)>0?1:-1)*ei_atan2(-coeff(k,j), coeff(j,j)); 88 | } 89 | } 90 | if (!odd) 91 | res = -res; 92 | return res; 93 | } 94 | 95 | 96 | #endif // EIGEN_EULERANGLES_H 97 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Geometry/EulerAngles.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_EULERANGLES_H 26 | #define EIGEN_EULERANGLES_H 27 | 28 | /** \geometry_module \ingroup Geometry_Module 29 | * 30 | * 31 | * \returns the Euler-angles of the rotation matrix \c *this using the convention defined by the triplet (\a a0,\a a1,\a a2) 32 | * 33 | * Each of the three parameters \a a0,\a a1,\a a2 represents the respective rotation axis as an integer in {0,1,2}. 34 | * For instance, in: 35 | * \code Vector3f ea = mat.eulerAngles(2, 0, 2); \endcode 36 | * "2" represents the z axis and "0" the x axis, etc. The returned angles are such that 37 | * we have the following equality: 38 | * \code 39 | * mat == AngleAxisf(ea[0], Vector3f::UnitZ()) 40 | * * AngleAxisf(ea[1], Vector3f::UnitX()) 41 | * * AngleAxisf(ea[2], Vector3f::UnitZ()); \endcode 42 | * This corresponds to the right-multiply conventions (with right hand side frames). 43 | */ 44 | template 45 | inline Matrix::Scalar,3,1> 46 | MatrixBase::eulerAngles(Index a0, Index a1, Index a2) const 47 | { 48 | /* Implemented from Graphics Gems IV */ 49 | EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(Derived,3,3) 50 | 51 | Matrix res; 52 | typedef Matrix Vector2; 53 | const Scalar epsilon = NumTraits::dummy_precision(); 54 | 55 | const Index odd = ((a0+1)%3 == a1) ? 0 : 1; 56 | const Index i = a0; 57 | const Index j = (a0 + 1 + odd)%3; 58 | const Index k = (a0 + 2 - odd)%3; 59 | 60 | if (a0==a2) 61 | { 62 | Scalar s = Vector2(coeff(j,i) , coeff(k,i)).norm(); 63 | res[1] = ei_atan2(s, coeff(i,i)); 64 | if (s > epsilon) 65 | { 66 | res[0] = ei_atan2(coeff(j,i), coeff(k,i)); 67 | res[2] = ei_atan2(coeff(i,j),-coeff(i,k)); 68 | } 69 | else 70 | { 71 | res[0] = Scalar(0); 72 | res[2] = (coeff(i,i)>0?1:-1)*ei_atan2(-coeff(k,j), coeff(j,j)); 73 | } 74 | } 75 | else 76 | { 77 | Scalar c = Vector2(coeff(i,i) , coeff(i,j)).norm(); 78 | res[1] = ei_atan2(-coeff(i,k), c); 79 | if (c > epsilon) 80 | { 81 | res[0] = ei_atan2(coeff(j,k), coeff(k,k)); 82 | res[2] = ei_atan2(coeff(i,j), coeff(i,i)); 83 | } 84 | else 85 | { 86 | res[0] = Scalar(0); 87 | res[2] = (coeff(i,k)>0?1:-1)*ei_atan2(-coeff(k,j), coeff(j,j)); 88 | } 89 | } 90 | if (!odd) 91 | res = -res; 92 | return res; 93 | } 94 | 95 | 96 | #endif // EIGEN_EULERANGLES_H 97 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/StlSupport/details.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STL_DETAILS_H 27 | #define EIGEN_STL_DETAILS_H 28 | 29 | #ifndef EIGEN_ALIGNED_ALLOCATOR 30 | #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator 31 | #endif 32 | 33 | namespace Eigen { 34 | 35 | // This one is needed to prevent reimplementing the whole std::vector. 36 | template 37 | class aligned_allocator_indirection : public EIGEN_ALIGNED_ALLOCATOR 38 | { 39 | public: 40 | typedef size_t size_type; 41 | typedef ptrdiff_t difference_type; 42 | typedef T* pointer; 43 | typedef const T* const_pointer; 44 | typedef T& reference; 45 | typedef const T& const_reference; 46 | typedef T value_type; 47 | 48 | template 49 | struct rebind 50 | { 51 | typedef aligned_allocator_indirection other; 52 | }; 53 | 54 | aligned_allocator_indirection() {} 55 | aligned_allocator_indirection(const aligned_allocator_indirection& ) : EIGEN_ALIGNED_ALLOCATOR() {} 56 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 57 | template 58 | aligned_allocator_indirection(const aligned_allocator_indirection& ) {} 59 | template 60 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 61 | ~aligned_allocator_indirection() {} 62 | }; 63 | 64 | #ifdef _MSC_VER 65 | 66 | // sometimes, MSVC detects, at compile time, that the argument x 67 | // in std::vector::resize(size_t s,T x) won't be aligned and generate an error 68 | // even if this function is never called. Whence this little wrapper. 69 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) Eigen::ei_workaround_msvc_stl_support 70 | template struct ei_workaround_msvc_stl_support : public T 71 | { 72 | inline ei_workaround_msvc_stl_support() : T() {} 73 | inline ei_workaround_msvc_stl_support(const T& other) : T(other) {} 74 | inline operator T& () { return *static_cast(this); } 75 | inline operator const T& () const { return *static_cast(this); } 76 | template 77 | inline T& operator=(const OtherT& other) 78 | { T::operator=(other); return *this; } 79 | inline ei_workaround_msvc_stl_support& operator=(const ei_workaround_msvc_stl_support& other) 80 | { T::operator=(other); return *this; } 81 | }; 82 | 83 | #else 84 | 85 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) T 86 | 87 | #endif 88 | 89 | } 90 | 91 | #endif // EIGEN_STL_DETAILS_H 92 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/StlSupport/details.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_STL_DETAILS_H 27 | #define EIGEN_STL_DETAILS_H 28 | 29 | #ifndef EIGEN_ALIGNED_ALLOCATOR 30 | #define EIGEN_ALIGNED_ALLOCATOR Eigen::aligned_allocator 31 | #endif 32 | 33 | namespace Eigen { 34 | 35 | // This one is needed to prevent reimplementing the whole std::vector. 36 | template 37 | class aligned_allocator_indirection : public EIGEN_ALIGNED_ALLOCATOR 38 | { 39 | public: 40 | typedef size_t size_type; 41 | typedef ptrdiff_t difference_type; 42 | typedef T* pointer; 43 | typedef const T* const_pointer; 44 | typedef T& reference; 45 | typedef const T& const_reference; 46 | typedef T value_type; 47 | 48 | template 49 | struct rebind 50 | { 51 | typedef aligned_allocator_indirection other; 52 | }; 53 | 54 | aligned_allocator_indirection() {} 55 | aligned_allocator_indirection(const aligned_allocator_indirection& ) : EIGEN_ALIGNED_ALLOCATOR() {} 56 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 57 | template 58 | aligned_allocator_indirection(const aligned_allocator_indirection& ) {} 59 | template 60 | aligned_allocator_indirection(const EIGEN_ALIGNED_ALLOCATOR& ) {} 61 | ~aligned_allocator_indirection() {} 62 | }; 63 | 64 | #ifdef _MSC_VER 65 | 66 | // sometimes, MSVC detects, at compile time, that the argument x 67 | // in std::vector::resize(size_t s,T x) won't be aligned and generate an error 68 | // even if this function is never called. Whence this little wrapper. 69 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) Eigen::ei_workaround_msvc_stl_support 70 | template struct ei_workaround_msvc_stl_support : public T 71 | { 72 | inline ei_workaround_msvc_stl_support() : T() {} 73 | inline ei_workaround_msvc_stl_support(const T& other) : T(other) {} 74 | inline operator T& () { return *static_cast(this); } 75 | inline operator const T& () const { return *static_cast(this); } 76 | template 77 | inline T& operator=(const OtherT& other) 78 | { T::operator=(other); return *this; } 79 | inline ei_workaround_msvc_stl_support& operator=(const ei_workaround_msvc_stl_support& other) 80 | { T::operator=(other); return *this; } 81 | }; 82 | 83 | #else 84 | 85 | #define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T) T 86 | 87 | #endif 88 | 89 | } 90 | 91 | #endif // EIGEN_STL_DETAILS_H 92 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Sparse/SparseDot.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSE_DOT_H 26 | #define EIGEN_SPARSE_DOT_H 27 | 28 | template 29 | template 30 | typename ei_traits::Scalar 31 | SparseMatrixBase::dot(const MatrixBase& other) const 32 | { 33 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 34 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) 35 | EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) 36 | EIGEN_STATIC_ASSERT((ei_is_same_type::ret), 37 | YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 38 | 39 | ei_assert(size() == other.size()); 40 | ei_assert(other.size()>0 && "you are using a non initialized vector"); 41 | 42 | typename Derived::InnerIterator i(derived(),0); 43 | Scalar res = 0; 44 | while (i) 45 | { 46 | res += ei_conj(i.value()) * other.coeff(i.index()); 47 | ++i; 48 | } 49 | return res; 50 | } 51 | 52 | template 53 | template 54 | typename ei_traits::Scalar 55 | SparseMatrixBase::dot(const SparseMatrixBase& other) const 56 | { 57 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 58 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) 59 | EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) 60 | EIGEN_STATIC_ASSERT((ei_is_same_type::ret), 61 | YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 62 | 63 | ei_assert(size() == other.size()); 64 | 65 | typename Derived::InnerIterator i(derived(),0); 66 | typename OtherDerived::InnerIterator j(other.derived(),0); 67 | Scalar res = 0; 68 | while (i && j) 69 | { 70 | if (i.index()==j.index()) 71 | { 72 | res += ei_conj(i.value()) * j.value(); 73 | ++i; ++j; 74 | } 75 | else if (i.index() 84 | inline typename NumTraits::Scalar>::Real 85 | SparseMatrixBase::squaredNorm() const 86 | { 87 | return ei_real((*this).cwiseAbs2().sum()); 88 | } 89 | 90 | template 91 | inline typename NumTraits::Scalar>::Real 92 | SparseMatrixBase::norm() const 93 | { 94 | return ei_sqrt(squaredNorm()); 95 | } 96 | 97 | #endif // EIGEN_SPARSE_DOT_H 98 | -------------------------------------------------------------------------------- /OrientEstimation_EKF_EIGEN/jni/AHRS/Eigen/src/Sparse/SparseDot.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // 6 | // Eigen is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU Lesser General Public 8 | // License as published by the Free Software Foundation; either 9 | // version 3 of the License, or (at your option) any later version. 10 | // 11 | // Alternatively, you can redistribute it and/or 12 | // modify it under the terms of the GNU General Public License as 13 | // published by the Free Software Foundation; either version 2 of 14 | // the License, or (at your option) any later version. 15 | // 16 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 17 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 19 | // GNU General Public License for more details. 20 | // 21 | // You should have received a copy of the GNU Lesser General Public 22 | // License and a copy of the GNU General Public License along with 23 | // Eigen. If not, see . 24 | 25 | #ifndef EIGEN_SPARSE_DOT_H 26 | #define EIGEN_SPARSE_DOT_H 27 | 28 | template 29 | template 30 | typename ei_traits::Scalar 31 | SparseMatrixBase::dot(const MatrixBase& other) const 32 | { 33 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 34 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) 35 | EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) 36 | EIGEN_STATIC_ASSERT((ei_is_same_type::ret), 37 | YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 38 | 39 | ei_assert(size() == other.size()); 40 | ei_assert(other.size()>0 && "you are using a non initialized vector"); 41 | 42 | typename Derived::InnerIterator i(derived(),0); 43 | Scalar res = 0; 44 | while (i) 45 | { 46 | res += ei_conj(i.value()) * other.coeff(i.index()); 47 | ++i; 48 | } 49 | return res; 50 | } 51 | 52 | template 53 | template 54 | typename ei_traits::Scalar 55 | SparseMatrixBase::dot(const SparseMatrixBase& other) const 56 | { 57 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) 58 | EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived) 59 | EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived) 60 | EIGEN_STATIC_ASSERT((ei_is_same_type::ret), 61 | YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY) 62 | 63 | ei_assert(size() == other.size()); 64 | 65 | typename Derived::InnerIterator i(derived(),0); 66 | typename OtherDerived::InnerIterator j(other.derived(),0); 67 | Scalar res = 0; 68 | while (i && j) 69 | { 70 | if (i.index()==j.index()) 71 | { 72 | res += ei_conj(i.value()) * j.value(); 73 | ++i; ++j; 74 | } 75 | else if (i.index() 84 | inline typename NumTraits::Scalar>::Real 85 | SparseMatrixBase::squaredNorm() const 86 | { 87 | return ei_real((*this).cwiseAbs2().sum()); 88 | } 89 | 90 | template 91 | inline typename NumTraits::Scalar>::Real 92 | SparseMatrixBase::norm() const 93 | { 94 | return ei_sqrt(squaredNorm()); 95 | } 96 | 97 | #endif // EIGEN_SPARSE_DOT_H 98 | -------------------------------------------------------------------------------- /OrientEstimation_AEKF/jni/AHRS/Eigen/src/Householder/BlockHouseholder.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2010 Vincent Lejeune 5 | // Copyright (C) 2010 Gael Guennebaud 6 | // 7 | // Eigen is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU Lesser General Public 9 | // License as published by the Free Software Foundation; either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // Alternatively, you can redistribute it and/or 13 | // modify it under the terms of the GNU General Public License as 14 | // published by the Free Software Foundation; either version 2 of 15 | // the License, or (at your option) any later version. 16 | // 17 | // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY 18 | // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 19 | // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License and a copy of the GNU General Public License along with 24 | // Eigen. If not, see . 25 | 26 | #ifndef EIGEN_BLOCK_HOUSEHOLDER_H 27 | #define EIGEN_BLOCK_HOUSEHOLDER_H 28 | 29 | // This file contains some helper function to deal with block householder reflectors 30 | 31 | /** \internal */ 32 | template 33 | void ei_make_block_householder_triangular_factor(TriangularFactorType& triFactor, const VectorsType& vectors, const CoeffsType& hCoeffs) 34 | { 35 | typedef typename TriangularFactorType::Index Index; 36 | typedef typename VectorsType::Scalar Scalar; 37 | const Index nbVecs = vectors.cols(); 38 | ei_assert(triFactor.rows() == nbVecs && triFactor.cols() == nbVecs && vectors.rows()>=nbVecs); 39 | 40 | for(Index i = 0; i < nbVecs; i++) 41 | { 42 | Index rs = vectors.rows() - i; 43 | Scalar Vii = vectors(i,i); 44 | vectors.const_cast_derived().coeffRef(i,i) = Scalar(1); 45 | triFactor.col(i).head(i).noalias() = -hCoeffs(i) * vectors.block(i, 0, rs, i).adjoint() 46 | * vectors.col(i).tail(rs); 47 | vectors.const_cast_derived().coeffRef(i, i) = Vii; 48 | // FIXME add .noalias() once the triangular product can work inplace 49 | triFactor.col(i).head(i) = triFactor.block(0,0,i,i).template triangularView() 50 | * triFactor.col(i).head(i); 51 | triFactor(i,i) = hCoeffs(i); 52 | } 53 | } 54 | 55 | /** \internal */ 56 | template 57 | void ei_apply_block_householder_on_the_left(MatrixType& mat, const VectorsType& vectors, const CoeffsType& hCoeffs) 58 | { 59 | typedef typename MatrixType::Index Index; 60 | enum { TFactorSize = MatrixType::ColsAtCompileTime }; 61 | Index nbVecs = vectors.cols(); 62 | Matrix T(nbVecs,nbVecs); 63 | ei_make_block_householder_triangular_factor(T, vectors, hCoeffs); 64 | 65 | const TriangularView& V(vectors); 66 | 67 | // A -= V T V^* A 68 | Matrix tmp = V.adjoint() * mat; 70 | // FIXME add .noalias() once the triangular product can work inplace 71 | tmp = T.template triangularView().adjoint() * tmp; 72 | mat.noalias() -= V * tmp; 73 | } 74 | 75 | 76 | #endif // EIGEN_BLOCK_HOUSEHOLDER_H 77 | --------------------------------------------------------------------------------