Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
EKF add estimator namespace and cleanup whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Sep 18, 2019
1 parent c446ee4 commit b4feeb8
Show file tree
Hide file tree
Showing 19 changed files with 260 additions and 79 deletions.
22 changes: 16 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,29 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(
-pedantic

-Wall
-Wextra
-Werror

-Wno-missing-field-initializers # ignore for GCC 4.8 support
)

# enable color output
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9)
# force color for gcc > 4.9
add_compile_options(-fdiagnostics-color=always)
endif()

elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# force color for clang (needed for clang + ccache)
add_compile_options(-fcolor-diagnostics)
endif()

# testing
include(CTest)
enable_testing()

if(BUILD_TESTING)
option(ECL_TESTS "Build ECL tests" ON)

Expand Down Expand Up @@ -196,17 +206,17 @@ endif()
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)

option(BUILD_DOXYGEN "Build doxygen documentation" OFF)

if (BUILD_DOXYGEN)
find_package(Doxygen)
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)

# note the option ALL which allows to build the docs together with the application
add_custom_target(doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
Expand All @@ -216,7 +226,7 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
VERBATIM
USES_TERMINAL
)

else()
message(FATAL_ERROR "Doxygen needs to be installed to generate documentation")
endif()
Expand Down
9 changes: 8 additions & 1 deletion EKF/airspeed_fusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@
* @author Paul Riseborough <[email protected]>
*
*/
#include "../ecl.h"

#include <ecl.h>

#include "ekf.h"
#include <mathlib/mathlib.h>

namespace estimator
{

void Ekf::fuseAirspeed()
{
// Initialize variables
Expand Down Expand Up @@ -274,3 +279,5 @@ void Ekf::resetWindStates()
_state.wind_vel(1) = 0.0f;
}
}

} // namespace estimator
2 changes: 2 additions & 0 deletions EKF/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
*
****************************************************************************/

#pragma once

/**
* @file common.h
* Definition of base class for attitude estimators
Expand Down
Loading

0 comments on commit b4feeb8

Please sign in to comment.