Skip to content

Commit

Permalink
Adding Extended Kalman Filter video.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz Reichert committed Dec 11, 2017
1 parent 4f611e7 commit e66efd3
Show file tree
Hide file tree
Showing 12 changed files with 13,199 additions and 19 deletions.
19 changes: 18 additions & 1 deletion extended-kalman-filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,27 @@ cmake_minimum_required (VERSION 3.5)

add_definitions(-std=c++14)

set(CXX_FLAGS "-Wall")
set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")

set(sources
src/tools.cpp
src/io.cpp
src/kalman_filter.cpp
src/main.cpp)
src/main-for-simulator.cpp)


if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

include_directories(/usr/local/include)
include_directories(/usr/local/opt/openssl/include)
link_directories(/usr/local/lib)
link_directories(/usr/local/opt/openssl/lib)
link_directories(/usr/local/Cellar/libuv/1*/lib)

endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")


add_executable(ExtendedKF ${sources})

target_link_libraries(ExtendedKF z ssl uv uWS)
Binary file added extended-kalman-filters/result.mp4
Binary file not shown.
7 changes: 5 additions & 2 deletions extended-kalman-filters/src/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ ostream& operator<<(ostream& outs, const Measurement& m) {
<< m.value(1) << "\t";
}
else {
const auto xy = tools::ConvertFromPolarToCartesian(m.value(0),
m.value(1));
const auto& rho = m.value(0);
double phi = m.value(1);
tools::NormalizeAngle(phi);
const auto xy = tools::ConvertFromPolarToCartesian(rho,
phi);

outs << xy.first << "\t"
<< xy.second << "\t";
Expand Down
Loading

0 comments on commit e66efd3

Please sign in to comment.