fixposition_gnss_tf
This is a simple C++ library for geodetic coordinate transformations. This should also serve as an example of how to calculate spatial coordinate transformations between the following coordinate frames:
- ECEF: Earth-Center-Earth-Fixed
- ENU: East-North-Up (Local tangiantial plane)
- LLH: Latitude, Longitude, Height, based on WGS84 Ellipsoid
For the tests:
Build system:
- Plain CMake
- catkin (for ROS1)
- colcon (for ROS2)
sudo apt update
sudo apt install -y wget
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt install -y build-essential cmake
sudo apt install -y libeigen3-dev
sudo apt install -y libyaml-cpp-dev
if you also want to run the unit-tests:
sudo apt-get install libgtest-dev
cd /usr/src/gtest
sudo cmake .
sudo make
sudo make install
- Create a ament workspace with the structure:
catkin_ws
└── src
└── fixposition_gnss_tf
└── <Other Pacakges>
- in the workspace do:
catkin build fixposition_gnss_tf
- and to build and run unit tests
catkin build fixposition_gnss_tf -DBUILD_TESTING=ON
catkin run_tests fixposition_gnss_tf
- Create a ament workspace with the structure:
ament_ws
└── src
└── fixposition_gnss_tf
└── <Other Pacakges>
- in the workspace do:
colcon build --packages-select fixposition_gnss_tf
- and to build and run unit tests
# build with testing enabled
colcon build --packages-select fixposition_gnss_tf --cmake-args -DBUILD_TESTING=ON
# run the tests
colcon test --packages-select fixposition_gnss_tf
# check the results
colcon test-result --test-result-base build/fixposition_gnss_tf/
- setup build directory
mkdir build
cd build
- build without unit tests
cmake ..
make
- build and run unit tests
cmake .. -DBUILD_TESTING=ON
make test
See test/gnss_test.cpp
for examples of how to use these functions
- Make sure you have Doxygen installed
- Run
doxygen Doxyfile
and then open doc_gen/html/index.html for the documentation
- Wikipedia - Geographic coordinate conversion
- ESA NAvipedia - Transformations between ECEF and ENU coordinates
This project is licensed under the MIT License - see the LICENSE file for details