mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 00:11:36 +08:00
* added the trace function for a SquareMatrix * added Vector3.hat() and it's counterpart Dcm.vee() for skewsymskew symmetric matrix operations in relation to the cross product see https://en.wikipedia.org/wiki/Hat_operator * Matrix::write_string produced runtime errors when I used it in PX4 posix simulation, i simplified it * a Matrix3f is a SquareMatrix * added tests for SquareMatrix.trace, Vector3.hat and Dcm.vee * added a test for quaternion initialisation from array * preventing buffer overflows in Matrix.write_string method
39 lines
751 B
CMake
39 lines
751 B
CMake
set(tests
|
|
setIdentity
|
|
inverse
|
|
slice
|
|
matrixMult
|
|
vectorAssignment
|
|
matrixAssignment
|
|
matrixScalarMult
|
|
transpose
|
|
vector
|
|
vector2
|
|
vector3
|
|
attitude
|
|
filter
|
|
integration
|
|
squareMatrix
|
|
helper
|
|
hatvee
|
|
)
|
|
|
|
add_custom_target(test_build)
|
|
foreach(test_name ${tests})
|
|
add_executable(${test_name}
|
|
${test_name}.cpp)
|
|
add_test(test_${test_name} ${test_name})
|
|
add_dependencies(test_build ${test_name})
|
|
endforeach()
|
|
|
|
if (${CMAKE_BUILD_TYPE} STREQUAL "Profile")
|
|
add_custom_target(coverage
|
|
COMMAND ${CMAKE_CTEST_COMMAND}
|
|
COMMAND lcov --capture --directory . --output-file coverage.info
|
|
COMMAND genhtml coverage.info --output-directory out
|
|
COMMAND x-www-browser out/index.html
|
|
WORKING_DIRECTORY ${CMAKE_BUILD_DIR}
|
|
DEPENDS test_build
|
|
)
|
|
endif()
|