add_subdirectory(airdata)
add_subdirectory(EKF) #
add_subdirectory(geo)
add_subdirectory(geo_lookup)
add_subdirectory(main) # 这一行是新添加的
add_subdirectory(EKF) #
这一行生成的动态库按照以下步骤可完成整个项目的克隆,生成,编译和运行。
git clone https://github.com/akstuki/PX4-ECL.git
mkdir build/
cd build/
$ cmake ..
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- build type is RelWithDebInfo
-- PX4 ECL: Very lightweight Estimation & Control Library v1.9.0-rc1-496-g5ca644e
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/f/1-own/0-code/0alforithmCode/px4/ecl/PX4-ECL/build
$ make
Scanning dependencies of target matrix
[ 2%] Completed 'matrix'
[ 21%] Built target matrix
Scanning dependencies of target prebuild_targets
[ 21%] Built target prebuild_targets
[ 26%] Built target ecl_airdata
[ 31%] Built target ecl_geo_lookup
[ 36%] Built target ecl_geo
[ 89%] Built target ecl_EKF
Scanning dependencies of target postEcl
[ 92%] Building CXX object main/CMakeFiles/postEcl.dir/main.cpp.o
[ 94%] Building CXX object main/CMakeFiles/postEcl.dir/csvparser.cpp.o
[ 97%] Building CXX object main/CMakeFiles/postEcl.dir/PostEkf.cpp.o
[100%] Linking CXX executable postEcl.exe
[100%] Built target postEcl
$ ./postEcl.exe 09_26_14_sensor_combined_0.csv
start ecl main...
47634158: reset position to last known position
47634158: reset velocity to zero
51113397: mag yaw fusion numerical error - covariance reset
51534173: EKF aligned, (baro hgt, IMU buf: 12, OBS buf: 9)
57718962: mag yaw fusion numerical error - covariance reset
baro hgt timeout - reset to baro
67032581: mag yaw fusion numerical error - covariance reset
68114987: reset position to last known position
68114987: reset velocity to zero
68114987: stopping navigation
baro hgt timeout - reset to baro
baro hgt timeout - reset to baro
84041372: reset position to last known position
84041372: reset velocity to zero
84041372: stopping navigation
finished.
$ ls -l
总用量 6848
-rwxrwxr-x+ 1 xiaoqiang xiaoqiang 1492459 9月 29 2018 09_26_14_sensor_combined_0.csv
-rwxrw-r--+ 1 xiaoqiang xiaoqiang 1025 1月 4 22:37 cmake_install.cmake
drwxrwxr-x+ 1 xiaoqiang xiaoqiang 0 1月 5 21:51 CMakeFiles
-rwxrw-r--+ 1 xiaoqiang xiaoqiang 2612997 1月 5 22:08 ecloutput.csv
-rwxrw-r--+ 1 xiaoqiang xiaoqiang 7687 1月 5 21:50 Makefile
-rwxrwxr-x+ 1 xiaoqiang xiaoqiang 2889190 1月 5 21:52 postEcl.exe