Skip to content

zenitheesc/AttitudeDetermination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attitude Determination

Library of Deterministic Methods of Attitude Determination

ContentsEnvironment and ToolsSteps to run and debugTODOHow to contribute?BenchmarksMore

Demo

3D visualization of attitude using the WebSockets and THREE.js

Contents

  • attdet - The main Attitude Determination Library.
  • attdet/benchmark - A micro-benchmark of QUEST implementation.
  • attdet/alglin - Internal Linear Algebra Library.
  • examples/quest - QUaternion ESTimator algorithm demo.
  • examples/serial - QUEST demo with serial port data.
  • examples/websockets - Pipes: Serial -> QUEST -> WebSocket.
  • misc - Python implementation using Numpy

Environment and tools

CMake. A C++11 Compiler (e.g. GCC 4.8). Some targets have specific dependencies:

All demos were compiled in Linux.

Steps to run and debug

Both libraries make use of std::array e std::initializer_list, so a C++11 compiler is necessary. To use constexpr modify attdet/alglin/CMakeLists.txt changing gnu++11 to 17. Then use CMake:

mkdir build
cd build
cmake ..
cmake --build .. --config <CONFIG> --target <TARGET>

Where CONFIG can be Debug, Release, MinSizeRel and TARGET is A subproject: attdet, quest, serial or tests: alglin-tests, attdet-tests. The tests use the Catch2 library that is automatically fetched by CMake.

The alglin library is header-only so its not a direct target. But the attdet library is a static library.

TODO:

  • Compile using STM32 Toolchain (impact*: ~6KB)
  • Use asserts in critical functions.

*Compiling in Release mode, with C++14 manually copying files directly, not compiling and linking libattdet.a.

How to contribute

We love when new people come and help us to improve our software! If you want to contribute to this project, check our Projects board and pick an idea to develop. When you finish coding, make a clear and descriptive pull request explaining your modifications.

If you find any sort of problem or have a suggestion to the project, please write an issue and we will be pleased to help you!

Benchmarks

flamgraph A visual representation of the execution time of each function in the algorithm. Note that the x axis does not inform the sequence of execution it is ordered alphabetically.

As you can see I need to work on the adjugate function. It does not use the usual algorithm - that uses the inverse - since I found one case where unusual, but valid, data produced a uninvertable matrix. I'll reconsider taking in to account the performance hit.

(Update) - Changed cofactor function. Got around a 2.5x improvement. Matrix Multiplication is now the main optimization target. But I since added the TRIAD benchmark and the speed difference seems to be around 10x. I knew it would be around a 4x difference. But it seems that I still could shave off some 2x improvement.

More:

Temos um texto sobre Determinação de Atitude e a história do algorítmo QUEST em nosso Blog


zenith.eesc@gmail.com