added code from fusion2016
This commit is contained in:
318
code-build/CMakeCache.txt
Normal file
318
code-build/CMakeCache.txt
Normal file
File diff suppressed because one or more lines are too long
58
code-build/CMakeFiles/3.0.2/CMakeCCompiler.cmake
Normal file
58
code-build/CMakeFiles/3.0.2/CMakeCCompiler.cmake
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
set(CMAKE_C_COMPILER "/usr/bin/cc")
|
||||||
|
set(CMAKE_C_COMPILER_ARG1 "")
|
||||||
|
set(CMAKE_C_COMPILER_ID "GNU")
|
||||||
|
set(CMAKE_C_COMPILER_VERSION "4.9.2")
|
||||||
|
set(CMAKE_C_PLATFORM_ID "Linux")
|
||||||
|
set(CMAKE_C_SIMULATE_ID "")
|
||||||
|
set(CMAKE_C_SIMULATE_VERSION "")
|
||||||
|
|
||||||
|
set(CMAKE_AR "/usr/bin/ar")
|
||||||
|
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||||
|
set(CMAKE_LINKER "/usr/bin/ld")
|
||||||
|
set(CMAKE_COMPILER_IS_GNUCC 1)
|
||||||
|
set(CMAKE_C_COMPILER_LOADED 1)
|
||||||
|
set(CMAKE_C_COMPILER_WORKS TRUE)
|
||||||
|
set(CMAKE_C_ABI_COMPILED TRUE)
|
||||||
|
set(CMAKE_COMPILER_IS_MINGW )
|
||||||
|
set(CMAKE_COMPILER_IS_CYGWIN )
|
||||||
|
if(CMAKE_COMPILER_IS_CYGWIN)
|
||||||
|
set(CYGWIN 1)
|
||||||
|
set(UNIX 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER_ENV_VAR "CC")
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_MINGW)
|
||||||
|
set(MINGW 1)
|
||||||
|
endif()
|
||||||
|
set(CMAKE_C_COMPILER_ID_RUN 1)
|
||||||
|
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
|
||||||
|
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||||
|
set(CMAKE_C_LINKER_PREFERENCE 10)
|
||||||
|
|
||||||
|
# Save compiler ABI information.
|
||||||
|
set(CMAKE_C_SIZEOF_DATA_PTR "8")
|
||||||
|
set(CMAKE_C_COMPILER_ABI "ELF")
|
||||||
|
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
|
||||||
|
|
||||||
|
if(CMAKE_C_SIZEOF_DATA_PTR)
|
||||||
|
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ABI)
|
||||||
|
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_C_LIBRARY_ARCHITECTURE)
|
||||||
|
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c")
|
||||||
|
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-redhat-linux/4.9.2;/usr/lib64;/lib64;/usr/lib")
|
||||||
|
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
59
code-build/CMakeFiles/3.0.2/CMakeCXXCompiler.cmake
Normal file
59
code-build/CMakeFiles/3.0.2/CMakeCXXCompiler.cmake
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
set(CMAKE_CXX_COMPILER "/usr/bin/c++")
|
||||||
|
set(CMAKE_CXX_COMPILER_ARG1 "")
|
||||||
|
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||||
|
set(CMAKE_CXX_COMPILER_VERSION "4.9.2")
|
||||||
|
set(CMAKE_CXX_PLATFORM_ID "Linux")
|
||||||
|
set(CMAKE_CXX_SIMULATE_ID "")
|
||||||
|
set(CMAKE_CXX_SIMULATE_VERSION "")
|
||||||
|
|
||||||
|
set(CMAKE_AR "/usr/bin/ar")
|
||||||
|
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||||
|
set(CMAKE_LINKER "/usr/bin/ld")
|
||||||
|
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||||
|
set(CMAKE_CXX_COMPILER_LOADED 1)
|
||||||
|
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||||
|
set(CMAKE_CXX_ABI_COMPILED TRUE)
|
||||||
|
set(CMAKE_COMPILER_IS_MINGW )
|
||||||
|
set(CMAKE_COMPILER_IS_CYGWIN )
|
||||||
|
if(CMAKE_COMPILER_IS_CYGWIN)
|
||||||
|
set(CYGWIN 1)
|
||||||
|
set(UNIX 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_MINGW)
|
||||||
|
set(MINGW 1)
|
||||||
|
endif()
|
||||||
|
set(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||||
|
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||||
|
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
|
||||||
|
set(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||||
|
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||||
|
|
||||||
|
# Save compiler ABI information.
|
||||||
|
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
||||||
|
set(CMAKE_CXX_COMPILER_ABI "ELF")
|
||||||
|
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
|
||||||
|
|
||||||
|
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||||
|
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ABI)
|
||||||
|
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
||||||
|
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c")
|
||||||
|
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-redhat-linux/4.9.2;/usr/lib64;/lib64;/usr/lib")
|
||||||
|
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BIN
code-build/CMakeFiles/3.0.2/CMakeDetermineCompilerABI_C.bin
Executable file
BIN
code-build/CMakeFiles/3.0.2/CMakeDetermineCompilerABI_C.bin
Executable file
Binary file not shown.
BIN
code-build/CMakeFiles/3.0.2/CMakeDetermineCompilerABI_CXX.bin
Executable file
BIN
code-build/CMakeFiles/3.0.2/CMakeDetermineCompilerABI_CXX.bin
Executable file
Binary file not shown.
15
code-build/CMakeFiles/3.0.2/CMakeSystem.cmake
Normal file
15
code-build/CMakeFiles/3.0.2/CMakeSystem.cmake
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
set(CMAKE_HOST_SYSTEM "Linux-4.1.5-100.fc21.x86_64")
|
||||||
|
set(CMAKE_HOST_SYSTEM_NAME "Linux")
|
||||||
|
set(CMAKE_HOST_SYSTEM_VERSION "4.1.5-100.fc21.x86_64")
|
||||||
|
set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM "Linux-4.1.5-100.fc21.x86_64")
|
||||||
|
set(CMAKE_SYSTEM_NAME "Linux")
|
||||||
|
set(CMAKE_SYSTEM_VERSION "4.1.5-100.fc21.x86_64")
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||||
|
|
||||||
|
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_LOADED 1)
|
||||||
442
code-build/CMakeFiles/3.0.2/CompilerIdC/CMakeCCompilerId.c
Normal file
442
code-build/CMakeFiles/3.0.2/CompilerIdC/CMakeCCompilerId.c
Normal file
@@ -0,0 +1,442 @@
|
|||||||
|
#ifdef __cplusplus
|
||||||
|
# error "A C++ compiler has been selected for C."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Version number components: V=Version, R=Revision, P=Patch
|
||||||
|
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||||
|
|
||||||
|
#if defined(__18CXX)
|
||||||
|
# define ID_VOID_MAIN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(__INTEL_COMPILER) || defined(__ICC)
|
||||||
|
# define COMPILER_ID "Intel"
|
||||||
|
/* __INTEL_COMPILER = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||||
|
# if defined(__INTEL_COMPILER_UPDATE)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||||
|
# else
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||||
|
# endif
|
||||||
|
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||||
|
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||||
|
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||||
|
# endif
|
||||||
|
# if defined(_MSC_VER)
|
||||||
|
# define SIMULATE_ID "MSVC"
|
||||||
|
/* _MSC_VER = VVRR */
|
||||||
|
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||||
|
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__PATHCC__)
|
||||||
|
# define COMPILER_ID "PathScale"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||||
|
# if defined(__PATHCC_PATCHLEVEL__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__clang__)
|
||||||
|
# if defined(__apple_build_version__)
|
||||||
|
# define COMPILER_ID "AppleClang"
|
||||||
|
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||||
|
# else
|
||||||
|
# define COMPILER_ID "Clang"
|
||||||
|
# endif
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||||
|
# if defined(_MSC_VER)
|
||||||
|
# define SIMULATE_ID "MSVC"
|
||||||
|
/* _MSC_VER = VVRR */
|
||||||
|
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||||
|
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||||
|
# define COMPILER_ID "Embarcadero"
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||||
|
|
||||||
|
#elif defined(__BORLANDC__)
|
||||||
|
# define COMPILER_ID "Borland"
|
||||||
|
/* __BORLANDC__ = 0xVRR */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||||
|
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
# define COMPILER_ID "Watcom"
|
||||||
|
/* __WATCOMC__ = VVRR */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100)
|
||||||
|
|
||||||
|
#elif defined(__SUNPRO_C)
|
||||||
|
# define COMPILER_ID "SunPro"
|
||||||
|
# if __SUNPRO_C >= 0x5100
|
||||||
|
/* __SUNPRO_C = 0xVRRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||||
|
# else
|
||||||
|
/* __SUNPRO_C = 0xVRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__HP_cc)
|
||||||
|
# define COMPILER_ID "HP"
|
||||||
|
/* __HP_cc = VVRRPP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
|
||||||
|
|
||||||
|
#elif defined(__DECC)
|
||||||
|
# define COMPILER_ID "Compaq"
|
||||||
|
/* __DECC_VER = VVRRTPPPP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
|
||||||
|
|
||||||
|
#elif defined(__IBMC__)
|
||||||
|
# if defined(__COMPILER_VER__)
|
||||||
|
# define COMPILER_ID "zOS"
|
||||||
|
# else
|
||||||
|
# if __IBMC__ >= 800
|
||||||
|
# define COMPILER_ID "XL"
|
||||||
|
# else
|
||||||
|
# define COMPILER_ID "VisualAge"
|
||||||
|
# endif
|
||||||
|
/* __IBMC__ = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__PGI)
|
||||||
|
# define COMPILER_ID "PGI"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||||
|
# if defined(__PGIC_PATCHLEVEL__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(_CRAYC)
|
||||||
|
# define COMPILER_ID "Cray"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_RELEASE)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||||
|
|
||||||
|
#elif defined(__TI_COMPILER_VERSION__)
|
||||||
|
# define COMPILER_ID "TI"
|
||||||
|
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||||
|
|
||||||
|
#elif defined(__TINYC__)
|
||||||
|
# define COMPILER_ID "TinyCC"
|
||||||
|
|
||||||
|
#elif defined(__SCO_VERSION__)
|
||||||
|
# define COMPILER_ID "SCO"
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
# define COMPILER_ID "GNU"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||||
|
# if defined(__GNUC_PATCHLEVEL__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
# define COMPILER_ID "MSVC"
|
||||||
|
/* _MSC_VER = VVRR */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||||
|
# if defined(_MSC_FULL_VER)
|
||||||
|
# if _MSC_VER >= 1400
|
||||||
|
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||||
|
# else
|
||||||
|
/* _MSC_FULL_VER = VVRRPPPP */
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# if defined(_MSC_BUILD)
|
||||||
|
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Analog VisualDSP++ >= 4.5.6 */
|
||||||
|
#elif defined(__VISUALDSPVERSION__)
|
||||||
|
# define COMPILER_ID "ADSP"
|
||||||
|
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||||
|
|
||||||
|
/* Analog VisualDSP++ < 4.5.6 */
|
||||||
|
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||||
|
# define COMPILER_ID "ADSP"
|
||||||
|
|
||||||
|
/* IAR Systems compiler for embedded systems.
|
||||||
|
http://www.iar.com */
|
||||||
|
#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
|
||||||
|
# define COMPILER_ID "IAR"
|
||||||
|
|
||||||
|
/* sdcc, the small devices C compiler for embedded systems,
|
||||||
|
http://sdcc.sourceforge.net */
|
||||||
|
#elif defined(SDCC)
|
||||||
|
# define COMPILER_ID "SDCC"
|
||||||
|
/* SDCC = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
|
||||||
|
|
||||||
|
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
|
||||||
|
# define COMPILER_ID "MIPSpro"
|
||||||
|
# if defined(_SGI_COMPILER_VERSION)
|
||||||
|
/* _SGI_COMPILER_VERSION = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10)
|
||||||
|
# else
|
||||||
|
/* _COMPILER_VERSION = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* This compiler is either not known or is too old to define an
|
||||||
|
identification macro. Try to identify the platform and guess that
|
||||||
|
it is the native compiler. */
|
||||||
|
#elif defined(__sgi)
|
||||||
|
# define COMPILER_ID "MIPSpro"
|
||||||
|
|
||||||
|
#elif defined(__hpux) || defined(__hpua)
|
||||||
|
# define COMPILER_ID "HP"
|
||||||
|
|
||||||
|
#else /* unknown compiler */
|
||||||
|
# define COMPILER_ID ""
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Construct the string literal in pieces to prevent the source from
|
||||||
|
getting matched. Store it in a pointer rather than an array
|
||||||
|
because some compilers will just produce instructions to fill the
|
||||||
|
array rather than assigning a pointer to a static array. */
|
||||||
|
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||||
|
#ifdef SIMULATE_ID
|
||||||
|
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __QNXNTO__
|
||||||
|
char const* qnxnto = "INFO" ":" "qnxnto";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Identify known platforms by name. */
|
||||||
|
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||||
|
# define PLATFORM_ID "Linux"
|
||||||
|
|
||||||
|
#elif defined(__CYGWIN__)
|
||||||
|
# define PLATFORM_ID "Cygwin"
|
||||||
|
|
||||||
|
#elif defined(__MINGW32__)
|
||||||
|
# define PLATFORM_ID "MinGW"
|
||||||
|
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
# define PLATFORM_ID "Darwin"
|
||||||
|
|
||||||
|
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||||
|
# define PLATFORM_ID "Windows"
|
||||||
|
|
||||||
|
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||||
|
# define PLATFORM_ID "FreeBSD"
|
||||||
|
|
||||||
|
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||||
|
# define PLATFORM_ID "NetBSD"
|
||||||
|
|
||||||
|
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||||
|
# define PLATFORM_ID "OpenBSD"
|
||||||
|
|
||||||
|
#elif defined(__sun) || defined(sun)
|
||||||
|
# define PLATFORM_ID "SunOS"
|
||||||
|
|
||||||
|
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||||
|
# define PLATFORM_ID "AIX"
|
||||||
|
|
||||||
|
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
|
||||||
|
# define PLATFORM_ID "IRIX"
|
||||||
|
|
||||||
|
#elif defined(__hpux) || defined(__hpux__)
|
||||||
|
# define PLATFORM_ID "HP-UX"
|
||||||
|
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
# define PLATFORM_ID "Haiku"
|
||||||
|
|
||||||
|
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||||
|
# define PLATFORM_ID "BeOS"
|
||||||
|
|
||||||
|
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||||
|
# define PLATFORM_ID "QNX"
|
||||||
|
|
||||||
|
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||||
|
# define PLATFORM_ID "Tru64"
|
||||||
|
|
||||||
|
#elif defined(__riscos) || defined(__riscos__)
|
||||||
|
# define PLATFORM_ID "RISCos"
|
||||||
|
|
||||||
|
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||||
|
# define PLATFORM_ID "SINIX"
|
||||||
|
|
||||||
|
#elif defined(__UNIX_SV__)
|
||||||
|
# define PLATFORM_ID "UNIX_SV"
|
||||||
|
|
||||||
|
#elif defined(__bsdos__)
|
||||||
|
# define PLATFORM_ID "BSDOS"
|
||||||
|
|
||||||
|
#elif defined(_MPRAS) || defined(MPRAS)
|
||||||
|
# define PLATFORM_ID "MP-RAS"
|
||||||
|
|
||||||
|
#elif defined(__osf) || defined(__osf__)
|
||||||
|
# define PLATFORM_ID "OSF1"
|
||||||
|
|
||||||
|
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||||
|
# define PLATFORM_ID "SCO_SV"
|
||||||
|
|
||||||
|
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||||
|
# define PLATFORM_ID "ULTRIX"
|
||||||
|
|
||||||
|
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||||
|
# define PLATFORM_ID "Xenix"
|
||||||
|
|
||||||
|
#else /* unknown platform */
|
||||||
|
# define PLATFORM_ID ""
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For windows compilers MSVC and Intel we can determine
|
||||||
|
the architecture of the compiler being used. This is because
|
||||||
|
the compilers do not have flags that can change the architecture,
|
||||||
|
but rather depend on which compiler is being used
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && defined(_MSC_VER)
|
||||||
|
# if defined(_M_IA64)
|
||||||
|
# define ARCHITECTURE_ID "IA64"
|
||||||
|
|
||||||
|
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||||
|
# define ARCHITECTURE_ID "x64"
|
||||||
|
|
||||||
|
# elif defined(_M_IX86)
|
||||||
|
# define ARCHITECTURE_ID "X86"
|
||||||
|
|
||||||
|
# elif defined(_M_ARM)
|
||||||
|
# define ARCHITECTURE_ID "ARM"
|
||||||
|
|
||||||
|
# elif defined(_M_MIPS)
|
||||||
|
# define ARCHITECTURE_ID "MIPS"
|
||||||
|
|
||||||
|
# elif defined(_M_SH)
|
||||||
|
# define ARCHITECTURE_ID "SHx"
|
||||||
|
|
||||||
|
# else /* unknown architecture */
|
||||||
|
# define ARCHITECTURE_ID ""
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
# define ARCHITECTURE_ID ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Convert integer to decimal digit literals. */
|
||||||
|
#define DEC(n) \
|
||||||
|
('0' + (((n) / 10000000)%10)), \
|
||||||
|
('0' + (((n) / 1000000)%10)), \
|
||||||
|
('0' + (((n) / 100000)%10)), \
|
||||||
|
('0' + (((n) / 10000)%10)), \
|
||||||
|
('0' + (((n) / 1000)%10)), \
|
||||||
|
('0' + (((n) / 100)%10)), \
|
||||||
|
('0' + (((n) / 10)%10)), \
|
||||||
|
('0' + ((n) % 10))
|
||||||
|
|
||||||
|
/* Convert integer to hex digit literals. */
|
||||||
|
#define HEX(n) \
|
||||||
|
('0' + ((n)>>28 & 0xF)), \
|
||||||
|
('0' + ((n)>>24 & 0xF)), \
|
||||||
|
('0' + ((n)>>20 & 0xF)), \
|
||||||
|
('0' + ((n)>>16 & 0xF)), \
|
||||||
|
('0' + ((n)>>12 & 0xF)), \
|
||||||
|
('0' + ((n)>>8 & 0xF)), \
|
||||||
|
('0' + ((n)>>4 & 0xF)), \
|
||||||
|
('0' + ((n) & 0xF))
|
||||||
|
|
||||||
|
/* Construct a string literal encoding the version number components. */
|
||||||
|
#ifdef COMPILER_VERSION_MAJOR
|
||||||
|
char const info_version[] = {
|
||||||
|
'I', 'N', 'F', 'O', ':',
|
||||||
|
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||||
|
COMPILER_VERSION_MAJOR,
|
||||||
|
# ifdef COMPILER_VERSION_MINOR
|
||||||
|
'.', COMPILER_VERSION_MINOR,
|
||||||
|
# ifdef COMPILER_VERSION_PATCH
|
||||||
|
'.', COMPILER_VERSION_PATCH,
|
||||||
|
# ifdef COMPILER_VERSION_TWEAK
|
||||||
|
'.', COMPILER_VERSION_TWEAK,
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
']','\0'};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Construct a string literal encoding the version number components. */
|
||||||
|
#ifdef SIMULATE_VERSION_MAJOR
|
||||||
|
char const info_simulate_version[] = {
|
||||||
|
'I', 'N', 'F', 'O', ':',
|
||||||
|
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||||
|
SIMULATE_VERSION_MAJOR,
|
||||||
|
# ifdef SIMULATE_VERSION_MINOR
|
||||||
|
'.', SIMULATE_VERSION_MINOR,
|
||||||
|
# ifdef SIMULATE_VERSION_PATCH
|
||||||
|
'.', SIMULATE_VERSION_PATCH,
|
||||||
|
# ifdef SIMULATE_VERSION_TWEAK
|
||||||
|
'.', SIMULATE_VERSION_TWEAK,
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
']','\0'};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Construct the string literal in pieces to prevent the source from
|
||||||
|
getting matched. Store it in a pointer rather than an array
|
||||||
|
because some compilers will just produce instructions to fill the
|
||||||
|
array rather than assigning a pointer to a static array. */
|
||||||
|
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||||
|
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifdef ID_VOID_MAIN
|
||||||
|
void main() {}
|
||||||
|
#else
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
int require = 0;
|
||||||
|
require += info_compiler[argc];
|
||||||
|
require += info_platform[argc];
|
||||||
|
require += info_arch[argc];
|
||||||
|
#ifdef COMPILER_VERSION_MAJOR
|
||||||
|
require += info_version[argc];
|
||||||
|
#endif
|
||||||
|
#ifdef SIMULATE_ID
|
||||||
|
require += info_simulate[argc];
|
||||||
|
#endif
|
||||||
|
#ifdef SIMULATE_VERSION_MAJOR
|
||||||
|
require += info_simulate_version[argc];
|
||||||
|
#endif
|
||||||
|
(void)argv;
|
||||||
|
return require;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
BIN
code-build/CMakeFiles/3.0.2/CompilerIdC/a.out
Executable file
BIN
code-build/CMakeFiles/3.0.2/CompilerIdC/a.out
Executable file
Binary file not shown.
430
code-build/CMakeFiles/3.0.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
Normal file
430
code-build/CMakeFiles/3.0.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
Normal file
@@ -0,0 +1,430 @@
|
|||||||
|
/* This source file must have a .cpp extension so that all C++ compilers
|
||||||
|
recognize the extension without flags. Borland does not know .cxx for
|
||||||
|
example. */
|
||||||
|
#ifndef __cplusplus
|
||||||
|
# error "A C compiler has been selected for C++."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Version number components: V=Version, R=Revision, P=Patch
|
||||||
|
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||||
|
|
||||||
|
#if defined(__COMO__)
|
||||||
|
# define COMPILER_ID "Comeau"
|
||||||
|
/* __COMO_VERSION__ = VRR */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
|
||||||
|
|
||||||
|
#elif defined(__INTEL_COMPILER) || defined(__ICC)
|
||||||
|
# define COMPILER_ID "Intel"
|
||||||
|
/* __INTEL_COMPILER = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||||
|
# if defined(__INTEL_COMPILER_UPDATE)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||||
|
# else
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||||
|
# endif
|
||||||
|
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||||
|
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||||
|
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||||
|
# endif
|
||||||
|
# if defined(_MSC_VER)
|
||||||
|
# define SIMULATE_ID "MSVC"
|
||||||
|
/* _MSC_VER = VVRR */
|
||||||
|
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||||
|
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__PATHCC__)
|
||||||
|
# define COMPILER_ID "PathScale"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||||
|
# if defined(__PATHCC_PATCHLEVEL__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__clang__)
|
||||||
|
# if defined(__apple_build_version__)
|
||||||
|
# define COMPILER_ID "AppleClang"
|
||||||
|
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||||
|
# else
|
||||||
|
# define COMPILER_ID "Clang"
|
||||||
|
# endif
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||||
|
# if defined(_MSC_VER)
|
||||||
|
# define SIMULATE_ID "MSVC"
|
||||||
|
/* _MSC_VER = VVRR */
|
||||||
|
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||||
|
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||||
|
# define COMPILER_ID "Embarcadero"
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||||
|
|
||||||
|
#elif defined(__BORLANDC__)
|
||||||
|
# define COMPILER_ID "Borland"
|
||||||
|
/* __BORLANDC__ = 0xVRR */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||||
|
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
# define COMPILER_ID "Watcom"
|
||||||
|
/* __WATCOMC__ = VVRR */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100)
|
||||||
|
|
||||||
|
#elif defined(__SUNPRO_CC)
|
||||||
|
# define COMPILER_ID "SunPro"
|
||||||
|
# if __SUNPRO_CC >= 0x5100
|
||||||
|
/* __SUNPRO_CC = 0xVRRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||||
|
# else
|
||||||
|
/* __SUNPRO_CC = 0xVRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__HP_aCC)
|
||||||
|
# define COMPILER_ID "HP"
|
||||||
|
/* __HP_aCC = VVRRPP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
|
||||||
|
|
||||||
|
#elif defined(__DECCXX)
|
||||||
|
# define COMPILER_ID "Compaq"
|
||||||
|
/* __DECCXX_VER = VVRRTPPPP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
|
||||||
|
|
||||||
|
#elif defined(__IBMCPP__)
|
||||||
|
# if defined(__COMPILER_VER__)
|
||||||
|
# define COMPILER_ID "zOS"
|
||||||
|
# else
|
||||||
|
# if __IBMCPP__ >= 800
|
||||||
|
# define COMPILER_ID "XL"
|
||||||
|
# else
|
||||||
|
# define COMPILER_ID "VisualAge"
|
||||||
|
# endif
|
||||||
|
/* __IBMCPP__ = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(__PGI)
|
||||||
|
# define COMPILER_ID "PGI"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||||
|
# if defined(__PGIC_PATCHLEVEL__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(_CRAYC)
|
||||||
|
# define COMPILER_ID "Cray"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_RELEASE)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||||
|
|
||||||
|
#elif defined(__TI_COMPILER_VERSION__)
|
||||||
|
# define COMPILER_ID "TI"
|
||||||
|
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||||
|
|
||||||
|
#elif defined(__SCO_VERSION__)
|
||||||
|
# define COMPILER_ID "SCO"
|
||||||
|
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
# define COMPILER_ID "GNU"
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||||
|
# if defined(__GNUC_PATCHLEVEL__)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
# define COMPILER_ID "MSVC"
|
||||||
|
/* _MSC_VER = VVRR */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||||
|
# if defined(_MSC_FULL_VER)
|
||||||
|
# if _MSC_VER >= 1400
|
||||||
|
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||||
|
# else
|
||||||
|
/* _MSC_FULL_VER = VVRRPPPP */
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# if defined(_MSC_BUILD)
|
||||||
|
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Analog VisualDSP++ >= 4.5.6 */
|
||||||
|
#elif defined(__VISUALDSPVERSION__)
|
||||||
|
# define COMPILER_ID "ADSP"
|
||||||
|
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||||
|
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||||
|
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||||
|
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||||
|
|
||||||
|
/* Analog VisualDSP++ < 4.5.6 */
|
||||||
|
#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||||
|
# define COMPILER_ID "ADSP"
|
||||||
|
|
||||||
|
/* IAR Systems compiler for embedded systems.
|
||||||
|
http://www.iar.com */
|
||||||
|
#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
|
||||||
|
# define COMPILER_ID "IAR"
|
||||||
|
|
||||||
|
#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
|
||||||
|
# define COMPILER_ID "MIPSpro"
|
||||||
|
# if defined(_SGI_COMPILER_VERSION)
|
||||||
|
/* _SGI_COMPILER_VERSION = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10)
|
||||||
|
# else
|
||||||
|
/* _COMPILER_VERSION = VRP */
|
||||||
|
# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
|
||||||
|
# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
|
||||||
|
# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10)
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* This compiler is either not known or is too old to define an
|
||||||
|
identification macro. Try to identify the platform and guess that
|
||||||
|
it is the native compiler. */
|
||||||
|
#elif defined(__sgi)
|
||||||
|
# define COMPILER_ID "MIPSpro"
|
||||||
|
|
||||||
|
#elif defined(__hpux) || defined(__hpua)
|
||||||
|
# define COMPILER_ID "HP"
|
||||||
|
|
||||||
|
#else /* unknown compiler */
|
||||||
|
# define COMPILER_ID ""
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Construct the string literal in pieces to prevent the source from
|
||||||
|
getting matched. Store it in a pointer rather than an array
|
||||||
|
because some compilers will just produce instructions to fill the
|
||||||
|
array rather than assigning a pointer to a static array. */
|
||||||
|
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||||
|
#ifdef SIMULATE_ID
|
||||||
|
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __QNXNTO__
|
||||||
|
char const* qnxnto = "INFO" ":" "qnxnto";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Identify known platforms by name. */
|
||||||
|
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||||
|
# define PLATFORM_ID "Linux"
|
||||||
|
|
||||||
|
#elif defined(__CYGWIN__)
|
||||||
|
# define PLATFORM_ID "Cygwin"
|
||||||
|
|
||||||
|
#elif defined(__MINGW32__)
|
||||||
|
# define PLATFORM_ID "MinGW"
|
||||||
|
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
# define PLATFORM_ID "Darwin"
|
||||||
|
|
||||||
|
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||||
|
# define PLATFORM_ID "Windows"
|
||||||
|
|
||||||
|
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||||
|
# define PLATFORM_ID "FreeBSD"
|
||||||
|
|
||||||
|
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||||
|
# define PLATFORM_ID "NetBSD"
|
||||||
|
|
||||||
|
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||||
|
# define PLATFORM_ID "OpenBSD"
|
||||||
|
|
||||||
|
#elif defined(__sun) || defined(sun)
|
||||||
|
# define PLATFORM_ID "SunOS"
|
||||||
|
|
||||||
|
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||||
|
# define PLATFORM_ID "AIX"
|
||||||
|
|
||||||
|
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
|
||||||
|
# define PLATFORM_ID "IRIX"
|
||||||
|
|
||||||
|
#elif defined(__hpux) || defined(__hpux__)
|
||||||
|
# define PLATFORM_ID "HP-UX"
|
||||||
|
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
# define PLATFORM_ID "Haiku"
|
||||||
|
|
||||||
|
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||||
|
# define PLATFORM_ID "BeOS"
|
||||||
|
|
||||||
|
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||||
|
# define PLATFORM_ID "QNX"
|
||||||
|
|
||||||
|
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||||
|
# define PLATFORM_ID "Tru64"
|
||||||
|
|
||||||
|
#elif defined(__riscos) || defined(__riscos__)
|
||||||
|
# define PLATFORM_ID "RISCos"
|
||||||
|
|
||||||
|
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||||
|
# define PLATFORM_ID "SINIX"
|
||||||
|
|
||||||
|
#elif defined(__UNIX_SV__)
|
||||||
|
# define PLATFORM_ID "UNIX_SV"
|
||||||
|
|
||||||
|
#elif defined(__bsdos__)
|
||||||
|
# define PLATFORM_ID "BSDOS"
|
||||||
|
|
||||||
|
#elif defined(_MPRAS) || defined(MPRAS)
|
||||||
|
# define PLATFORM_ID "MP-RAS"
|
||||||
|
|
||||||
|
#elif defined(__osf) || defined(__osf__)
|
||||||
|
# define PLATFORM_ID "OSF1"
|
||||||
|
|
||||||
|
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||||
|
# define PLATFORM_ID "SCO_SV"
|
||||||
|
|
||||||
|
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||||
|
# define PLATFORM_ID "ULTRIX"
|
||||||
|
|
||||||
|
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||||
|
# define PLATFORM_ID "Xenix"
|
||||||
|
|
||||||
|
#else /* unknown platform */
|
||||||
|
# define PLATFORM_ID ""
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For windows compilers MSVC and Intel we can determine
|
||||||
|
the architecture of the compiler being used. This is because
|
||||||
|
the compilers do not have flags that can change the architecture,
|
||||||
|
but rather depend on which compiler is being used
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && defined(_MSC_VER)
|
||||||
|
# if defined(_M_IA64)
|
||||||
|
# define ARCHITECTURE_ID "IA64"
|
||||||
|
|
||||||
|
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||||
|
# define ARCHITECTURE_ID "x64"
|
||||||
|
|
||||||
|
# elif defined(_M_IX86)
|
||||||
|
# define ARCHITECTURE_ID "X86"
|
||||||
|
|
||||||
|
# elif defined(_M_ARM)
|
||||||
|
# define ARCHITECTURE_ID "ARM"
|
||||||
|
|
||||||
|
# elif defined(_M_MIPS)
|
||||||
|
# define ARCHITECTURE_ID "MIPS"
|
||||||
|
|
||||||
|
# elif defined(_M_SH)
|
||||||
|
# define ARCHITECTURE_ID "SHx"
|
||||||
|
|
||||||
|
# else /* unknown architecture */
|
||||||
|
# define ARCHITECTURE_ID ""
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
# define ARCHITECTURE_ID ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Convert integer to decimal digit literals. */
|
||||||
|
#define DEC(n) \
|
||||||
|
('0' + (((n) / 10000000)%10)), \
|
||||||
|
('0' + (((n) / 1000000)%10)), \
|
||||||
|
('0' + (((n) / 100000)%10)), \
|
||||||
|
('0' + (((n) / 10000)%10)), \
|
||||||
|
('0' + (((n) / 1000)%10)), \
|
||||||
|
('0' + (((n) / 100)%10)), \
|
||||||
|
('0' + (((n) / 10)%10)), \
|
||||||
|
('0' + ((n) % 10))
|
||||||
|
|
||||||
|
/* Convert integer to hex digit literals. */
|
||||||
|
#define HEX(n) \
|
||||||
|
('0' + ((n)>>28 & 0xF)), \
|
||||||
|
('0' + ((n)>>24 & 0xF)), \
|
||||||
|
('0' + ((n)>>20 & 0xF)), \
|
||||||
|
('0' + ((n)>>16 & 0xF)), \
|
||||||
|
('0' + ((n)>>12 & 0xF)), \
|
||||||
|
('0' + ((n)>>8 & 0xF)), \
|
||||||
|
('0' + ((n)>>4 & 0xF)), \
|
||||||
|
('0' + ((n) & 0xF))
|
||||||
|
|
||||||
|
/* Construct a string literal encoding the version number components. */
|
||||||
|
#ifdef COMPILER_VERSION_MAJOR
|
||||||
|
char const info_version[] = {
|
||||||
|
'I', 'N', 'F', 'O', ':',
|
||||||
|
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||||
|
COMPILER_VERSION_MAJOR,
|
||||||
|
# ifdef COMPILER_VERSION_MINOR
|
||||||
|
'.', COMPILER_VERSION_MINOR,
|
||||||
|
# ifdef COMPILER_VERSION_PATCH
|
||||||
|
'.', COMPILER_VERSION_PATCH,
|
||||||
|
# ifdef COMPILER_VERSION_TWEAK
|
||||||
|
'.', COMPILER_VERSION_TWEAK,
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
']','\0'};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Construct a string literal encoding the version number components. */
|
||||||
|
#ifdef SIMULATE_VERSION_MAJOR
|
||||||
|
char const info_simulate_version[] = {
|
||||||
|
'I', 'N', 'F', 'O', ':',
|
||||||
|
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||||
|
SIMULATE_VERSION_MAJOR,
|
||||||
|
# ifdef SIMULATE_VERSION_MINOR
|
||||||
|
'.', SIMULATE_VERSION_MINOR,
|
||||||
|
# ifdef SIMULATE_VERSION_PATCH
|
||||||
|
'.', SIMULATE_VERSION_PATCH,
|
||||||
|
# ifdef SIMULATE_VERSION_TWEAK
|
||||||
|
'.', SIMULATE_VERSION_TWEAK,
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
']','\0'};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Construct the string literal in pieces to prevent the source from
|
||||||
|
getting matched. Store it in a pointer rather than an array
|
||||||
|
because some compilers will just produce instructions to fill the
|
||||||
|
array rather than assigning a pointer to a static array. */
|
||||||
|
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||||
|
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
int require = 0;
|
||||||
|
require += info_compiler[argc];
|
||||||
|
require += info_platform[argc];
|
||||||
|
#ifdef COMPILER_VERSION_MAJOR
|
||||||
|
require += info_version[argc];
|
||||||
|
#endif
|
||||||
|
#ifdef SIMULATE_ID
|
||||||
|
require += info_simulate[argc];
|
||||||
|
#endif
|
||||||
|
#ifdef SIMULATE_VERSION_MAJOR
|
||||||
|
require += info_simulate_version[argc];
|
||||||
|
#endif
|
||||||
|
(void)argv;
|
||||||
|
return require;
|
||||||
|
}
|
||||||
BIN
code-build/CMakeFiles/3.0.2/CompilerIdCXX/a.out
Executable file
BIN
code-build/CMakeFiles/3.0.2/CompilerIdCXX/a.out
Executable file
Binary file not shown.
16
code-build/CMakeFiles/CMakeDirectoryInformation.cmake
Normal file
16
code-build/CMakeFiles/CMakeDirectoryInformation.cmake
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
# Relative path conversion top directories.
|
||||||
|
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/toni/Documents/programme/localization/Fusion2016/code")
|
||||||
|
set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/toni/Documents/programme/localization/Fusion2016/code-build")
|
||||||
|
|
||||||
|
# Force unix paths in dependencies.
|
||||||
|
set(CMAKE_FORCE_UNIX_PATHS 1)
|
||||||
|
|
||||||
|
|
||||||
|
# The C and CXX include file regular expressions for this directory.
|
||||||
|
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
|
||||||
|
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
|
||||||
|
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
|
||||||
|
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
|
||||||
265
code-build/CMakeFiles/CMakeOutput.log
Normal file
265
code-build/CMakeFiles/CMakeOutput.log
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
The system is: Linux - 4.1.5-100.fc21.x86_64 - x86_64
|
||||||
|
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
|
||||||
|
Compiler: /usr/bin/cc
|
||||||
|
Build flags:
|
||||||
|
Id flags:
|
||||||
|
|
||||||
|
The output was:
|
||||||
|
0
|
||||||
|
|
||||||
|
|
||||||
|
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
|
||||||
|
|
||||||
|
The C compiler identification is GNU, found in "/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/3.0.2/CompilerIdC/a.out"
|
||||||
|
|
||||||
|
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
|
||||||
|
Compiler: /usr/bin/c++
|
||||||
|
Build flags:
|
||||||
|
Id flags:
|
||||||
|
|
||||||
|
The output was:
|
||||||
|
0
|
||||||
|
|
||||||
|
|
||||||
|
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
|
||||||
|
|
||||||
|
The CXX compiler identification is GNU, found in "/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/3.0.2/CompilerIdCXX/a.out"
|
||||||
|
|
||||||
|
Determining if the C compiler works passed with the following output:
|
||||||
|
Change Dir: /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
|
Run Build Command:"/usr/bin/gmake" "cmTryCompileExec160666428/fast"
|
||||||
|
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec160666428.dir/build.make CMakeFiles/cmTryCompileExec160666428.dir/build
|
||||||
|
gmake[1]: Entering directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
/usr/bin/cmake -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/CMakeFiles 1
|
||||||
|
Building C object CMakeFiles/cmTryCompileExec160666428.dir/testCCompiler.c.o
|
||||||
|
/usr/bin/cc -o CMakeFiles/cmTryCompileExec160666428.dir/testCCompiler.c.o -c /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/testCCompiler.c
|
||||||
|
Linking C executable cmTryCompileExec160666428
|
||||||
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec160666428.dir/link.txt --verbose=1
|
||||||
|
/usr/bin/cc CMakeFiles/cmTryCompileExec160666428.dir/testCCompiler.c.o -o cmTryCompileExec160666428 -rdynamic
|
||||||
|
gmake[1]: Leaving directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
|
|
||||||
|
Detecting C compiler ABI info compiled with the following output:
|
||||||
|
Change Dir: /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
|
Run Build Command:"/usr/bin/gmake" "cmTryCompileExec988975450/fast"
|
||||||
|
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec988975450.dir/build.make CMakeFiles/cmTryCompileExec988975450.dir/build
|
||||||
|
gmake[1]: Entering directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
/usr/bin/cmake -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/CMakeFiles 1
|
||||||
|
Building C object CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o
|
||||||
|
/usr/bin/cc -o CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake/Modules/CMakeCCompilerABI.c
|
||||||
|
Linking C executable cmTryCompileExec988975450
|
||||||
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec988975450.dir/link.txt --verbose=1
|
||||||
|
/usr/bin/cc -v CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o -o cmTryCompileExec988975450 -rdynamic
|
||||||
|
Using built-in specs.
|
||||||
|
COLLECT_GCC=/usr/bin/cc
|
||||||
|
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
|
||||||
|
Target: x86_64-redhat-linux
|
||||||
|
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
|
||||||
|
Thread model: posix
|
||||||
|
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
|
||||||
|
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/
|
||||||
|
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../:/lib/:/usr/lib/
|
||||||
|
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec988975450' '-rdynamic' '-mtune=generic' '-march=x86-64'
|
||||||
|
/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/cczyOD8k.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTryCompileExec988975450 /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o
|
||||||
|
gmake[1]: Leaving directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
|
|
||||||
|
Parsed C implicit link information from above output:
|
||||||
|
link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||||
|
ignore line: [Change Dir: /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp]
|
||||||
|
ignore line: []
|
||||||
|
ignore line: [Run Build Command:"/usr/bin/gmake" "cmTryCompileExec988975450/fast"]
|
||||||
|
ignore line: [/usr/bin/gmake -f CMakeFiles/cmTryCompileExec988975450.dir/build.make CMakeFiles/cmTryCompileExec988975450.dir/build]
|
||||||
|
ignore line: [gmake[1]: Entering directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp']
|
||||||
|
ignore line: [/usr/bin/cmake -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/CMakeFiles 1]
|
||||||
|
ignore line: [Building C object CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o]
|
||||||
|
ignore line: [/usr/bin/cc -o CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake/Modules/CMakeCCompilerABI.c]
|
||||||
|
ignore line: [Linking C executable cmTryCompileExec988975450]
|
||||||
|
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec988975450.dir/link.txt --verbose=1]
|
||||||
|
ignore line: [/usr/bin/cc -v CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o -o cmTryCompileExec988975450 -rdynamic ]
|
||||||
|
ignore line: [Using built-in specs.]
|
||||||
|
ignore line: [COLLECT_GCC=/usr/bin/cc]
|
||||||
|
ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper]
|
||||||
|
ignore line: [Target: x86_64-redhat-linux]
|
||||||
|
ignore line: [Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux]
|
||||||
|
ignore line: [Thread model: posix]
|
||||||
|
ignore line: [gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC) ]
|
||||||
|
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/]
|
||||||
|
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../:/lib/:/usr/lib/]
|
||||||
|
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec988975450' '-rdynamic' '-mtune=generic' '-march=x86-64']
|
||||||
|
link line: [ /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/cczyOD8k.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTryCompileExec988975450 /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o]
|
||||||
|
arg [/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2] ==> ignore
|
||||||
|
arg [-plugin] ==> ignore
|
||||||
|
arg [/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so] ==> ignore
|
||||||
|
arg [-plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper] ==> ignore
|
||||||
|
arg [-plugin-opt=-fresolution=/tmp/cczyOD8k.res] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lc] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||||
|
arg [--build-id] ==> ignore
|
||||||
|
arg [--no-add-needed] ==> ignore
|
||||||
|
arg [--eh-frame-hdr] ==> ignore
|
||||||
|
arg [--hash-style=gnu] ==> ignore
|
||||||
|
arg [-m] ==> ignore
|
||||||
|
arg [elf_x86_64] ==> ignore
|
||||||
|
arg [-export-dynamic] ==> ignore
|
||||||
|
arg [-dynamic-linker] ==> ignore
|
||||||
|
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||||
|
arg [-o] ==> ignore
|
||||||
|
arg [cmTryCompileExec988975450] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o] ==> ignore
|
||||||
|
arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2]
|
||||||
|
arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64]
|
||||||
|
arg [-L/lib/../lib64] ==> dir [/lib/../lib64]
|
||||||
|
arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64]
|
||||||
|
arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../..]
|
||||||
|
arg [CMakeFiles/cmTryCompileExec988975450.dir/CMakeCCompilerABI.c.o] ==> ignore
|
||||||
|
arg [-lgcc] ==> lib [gcc]
|
||||||
|
arg [--as-needed] ==> ignore
|
||||||
|
arg [-lgcc_s] ==> lib [gcc_s]
|
||||||
|
arg [--no-as-needed] ==> ignore
|
||||||
|
arg [-lc] ==> lib [c]
|
||||||
|
arg [-lgcc] ==> lib [gcc]
|
||||||
|
arg [--as-needed] ==> ignore
|
||||||
|
arg [-lgcc_s] ==> lib [gcc_s]
|
||||||
|
arg [--no-as-needed] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o] ==> ignore
|
||||||
|
remove lib [gcc]
|
||||||
|
remove lib [gcc_s]
|
||||||
|
remove lib [gcc]
|
||||||
|
remove lib [gcc_s]
|
||||||
|
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2] ==> [/usr/lib/gcc/x86_64-redhat-linux/4.9.2]
|
||||||
|
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64] ==> [/usr/lib64]
|
||||||
|
collapse library dir [/lib/../lib64] ==> [/lib64]
|
||||||
|
collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64]
|
||||||
|
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../..] ==> [/usr/lib]
|
||||||
|
implicit libs: [c]
|
||||||
|
implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/4.9.2;/usr/lib64;/lib64;/usr/lib]
|
||||||
|
implicit fwks: []
|
||||||
|
|
||||||
|
|
||||||
|
Determining if the CXX compiler works passed with the following output:
|
||||||
|
Change Dir: /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
|
Run Build Command:"/usr/bin/gmake" "cmTryCompileExec1039321922/fast"
|
||||||
|
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec1039321922.dir/build.make CMakeFiles/cmTryCompileExec1039321922.dir/build
|
||||||
|
gmake[1]: Entering directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
/usr/bin/cmake -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/CMakeFiles 1
|
||||||
|
Building CXX object CMakeFiles/cmTryCompileExec1039321922.dir/testCXXCompiler.cxx.o
|
||||||
|
/usr/bin/c++ -o CMakeFiles/cmTryCompileExec1039321922.dir/testCXXCompiler.cxx.o -c /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
|
||||||
|
Linking CXX executable cmTryCompileExec1039321922
|
||||||
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1039321922.dir/link.txt --verbose=1
|
||||||
|
/usr/bin/c++ CMakeFiles/cmTryCompileExec1039321922.dir/testCXXCompiler.cxx.o -o cmTryCompileExec1039321922 -rdynamic
|
||||||
|
gmake[1]: Leaving directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
|
|
||||||
|
Detecting CXX compiler ABI info compiled with the following output:
|
||||||
|
Change Dir: /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp
|
||||||
|
|
||||||
|
Run Build Command:"/usr/bin/gmake" "cmTryCompileExec4200010279/fast"
|
||||||
|
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec4200010279.dir/build.make CMakeFiles/cmTryCompileExec4200010279.dir/build
|
||||||
|
gmake[1]: Entering directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
/usr/bin/cmake -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/CMakeFiles 1
|
||||||
|
Building CXX object CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o
|
||||||
|
/usr/bin/c++ -o CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp
|
||||||
|
Linking CXX executable cmTryCompileExec4200010279
|
||||||
|
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4200010279.dir/link.txt --verbose=1
|
||||||
|
/usr/bin/c++ -v CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o -o cmTryCompileExec4200010279 -rdynamic
|
||||||
|
Using built-in specs.
|
||||||
|
COLLECT_GCC=/usr/bin/c++
|
||||||
|
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
|
||||||
|
Target: x86_64-redhat-linux
|
||||||
|
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
|
||||||
|
Thread model: posix
|
||||||
|
gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC)
|
||||||
|
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/
|
||||||
|
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../:/lib/:/usr/lib/
|
||||||
|
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec4200010279' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||||
|
/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYNIMJo.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTryCompileExec4200010279 /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o
|
||||||
|
gmake[1]: Leaving directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp'
|
||||||
|
|
||||||
|
|
||||||
|
Parsed CXX implicit link information from above output:
|
||||||
|
link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||||
|
ignore line: [Change Dir: /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp]
|
||||||
|
ignore line: []
|
||||||
|
ignore line: [Run Build Command:"/usr/bin/gmake" "cmTryCompileExec4200010279/fast"]
|
||||||
|
ignore line: [/usr/bin/gmake -f CMakeFiles/cmTryCompileExec4200010279.dir/build.make CMakeFiles/cmTryCompileExec4200010279.dir/build]
|
||||||
|
ignore line: [gmake[1]: Entering directory '/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp']
|
||||||
|
ignore line: [/usr/bin/cmake -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/CMakeTmp/CMakeFiles 1]
|
||||||
|
ignore line: [Building CXX object CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o]
|
||||||
|
ignore line: [/usr/bin/c++ -o CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
|
||||||
|
ignore line: [Linking CXX executable cmTryCompileExec4200010279]
|
||||||
|
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4200010279.dir/link.txt --verbose=1]
|
||||||
|
ignore line: [/usr/bin/c++ -v CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o -o cmTryCompileExec4200010279 -rdynamic ]
|
||||||
|
ignore line: [Using built-in specs.]
|
||||||
|
ignore line: [COLLECT_GCC=/usr/bin/c++]
|
||||||
|
ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper]
|
||||||
|
ignore line: [Target: x86_64-redhat-linux]
|
||||||
|
ignore line: [Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux]
|
||||||
|
ignore line: [Thread model: posix]
|
||||||
|
ignore line: [gcc version 4.9.2 20150212 (Red Hat 4.9.2-6) (GCC) ]
|
||||||
|
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/]
|
||||||
|
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.9.2/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../:/lib/:/usr/lib/]
|
||||||
|
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec4200010279' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||||
|
link line: [ /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper -plugin-opt=-fresolution=/tmp/ccYNIMJo.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTryCompileExec4200010279 /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../.. CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o]
|
||||||
|
arg [/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/collect2] ==> ignore
|
||||||
|
arg [-plugin] ==> ignore
|
||||||
|
arg [/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/liblto_plugin.so] ==> ignore
|
||||||
|
arg [-plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper] ==> ignore
|
||||||
|
arg [-plugin-opt=-fresolution=/tmp/ccYNIMJo.res] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lc] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||||
|
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||||
|
arg [--build-id] ==> ignore
|
||||||
|
arg [--no-add-needed] ==> ignore
|
||||||
|
arg [--eh-frame-hdr] ==> ignore
|
||||||
|
arg [--hash-style=gnu] ==> ignore
|
||||||
|
arg [-m] ==> ignore
|
||||||
|
arg [elf_x86_64] ==> ignore
|
||||||
|
arg [-export-dynamic] ==> ignore
|
||||||
|
arg [-dynamic-linker] ==> ignore
|
||||||
|
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||||
|
arg [-o] ==> ignore
|
||||||
|
arg [cmTryCompileExec4200010279] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crt1.o] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crti.o] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtbegin.o] ==> ignore
|
||||||
|
arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2]
|
||||||
|
arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64]
|
||||||
|
arg [-L/lib/../lib64] ==> dir [/lib/../lib64]
|
||||||
|
arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64]
|
||||||
|
arg [-L/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../..]
|
||||||
|
arg [CMakeFiles/cmTryCompileExec4200010279.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
|
||||||
|
arg [-lstdc++] ==> lib [stdc++]
|
||||||
|
arg [-lm] ==> lib [m]
|
||||||
|
arg [-lgcc_s] ==> lib [gcc_s]
|
||||||
|
arg [-lgcc] ==> lib [gcc]
|
||||||
|
arg [-lc] ==> lib [c]
|
||||||
|
arg [-lgcc_s] ==> lib [gcc_s]
|
||||||
|
arg [-lgcc] ==> lib [gcc]
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/crtend.o] ==> ignore
|
||||||
|
arg [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64/crtn.o] ==> ignore
|
||||||
|
remove lib [gcc_s]
|
||||||
|
remove lib [gcc]
|
||||||
|
remove lib [gcc_s]
|
||||||
|
remove lib [gcc]
|
||||||
|
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2] ==> [/usr/lib/gcc/x86_64-redhat-linux/4.9.2]
|
||||||
|
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../lib64] ==> [/usr/lib64]
|
||||||
|
collapse library dir [/lib/../lib64] ==> [/lib64]
|
||||||
|
collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64]
|
||||||
|
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../..] ==> [/usr/lib]
|
||||||
|
implicit libs: [stdc++;m;c]
|
||||||
|
implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/4.9.2;/usr/lib64;/lib64;/usr/lib]
|
||||||
|
implicit fwks: []
|
||||||
|
|
||||||
|
|
||||||
1398
code-build/CMakeFiles/Fusion2016.dir/CXX.includecache
Normal file
1398
code-build/CMakeFiles/Fusion2016.dir/CXX.includecache
Normal file
File diff suppressed because it is too large
Load Diff
28
code-build/CMakeFiles/Fusion2016.dir/DependInfo.cmake
Normal file
28
code-build/CMakeFiles/Fusion2016.dir/DependInfo.cmake
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# The set of languages for which implicit dependencies are needed:
|
||||||
|
set(CMAKE_DEPENDS_LANGUAGES
|
||||||
|
"CXX"
|
||||||
|
)
|
||||||
|
# The set of files for implicit dependencies of each language:
|
||||||
|
set(CMAKE_DEPENDS_CHECK_CXX
|
||||||
|
"/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp" "/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o"
|
||||||
|
"/home/toni/Documents/programme/localization/Fusion2016/code/main.cpp" "/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/Fusion2016.dir/main.cpp.o"
|
||||||
|
)
|
||||||
|
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||||
|
|
||||||
|
# Preprocessor definitions for this target.
|
||||||
|
set(CMAKE_TARGET_DEFINITIONS
|
||||||
|
"WITH_ASSERTIONS"
|
||||||
|
"WITH_TESTS"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Targets to which this target links.
|
||||||
|
set(CMAKE_TARGET_LINKED_INFO_FILES
|
||||||
|
)
|
||||||
|
|
||||||
|
# The include file search paths:
|
||||||
|
set(CMAKE_C_TARGET_INCLUDE_PATH
|
||||||
|
"/home/toni/Documents/programme/localization/Fusion2016/code/../.."
|
||||||
|
)
|
||||||
|
set(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||||
|
set(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||||
|
set(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
||||||
128
code-build/CMakeFiles/Fusion2016.dir/build.make
Normal file
128
code-build/CMakeFiles/Fusion2016.dir/build.make
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Special targets provided by cmake.
|
||||||
|
|
||||||
|
# Disable implicit rules so canonical targets will work.
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||||
|
SUFFIXES =
|
||||||
|
|
||||||
|
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||||
|
|
||||||
|
# Suppress display of executed commands.
|
||||||
|
$(VERBOSE).SILENT:
|
||||||
|
|
||||||
|
# A target that is always out of date.
|
||||||
|
cmake_force:
|
||||||
|
.PHONY : cmake_force
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Set environment variables for the build.
|
||||||
|
|
||||||
|
# The shell in which to execute make rules.
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# The CMake executable.
|
||||||
|
CMAKE_COMMAND = /usr/bin/cmake
|
||||||
|
|
||||||
|
# The command to remove a file.
|
||||||
|
RM = /usr/bin/cmake -E remove -f
|
||||||
|
|
||||||
|
# Escaping for special characters.
|
||||||
|
EQUALS = =
|
||||||
|
|
||||||
|
# The top-level source directory on which CMake was run.
|
||||||
|
CMAKE_SOURCE_DIR = /home/toni/Documents/programme/localization/Fusion2016/code
|
||||||
|
|
||||||
|
# The top-level build directory on which CMake was run.
|
||||||
|
CMAKE_BINARY_DIR = /home/toni/Documents/programme/localization/Fusion2016/code-build
|
||||||
|
|
||||||
|
# Include any dependencies generated for this target.
|
||||||
|
include CMakeFiles/Fusion2016.dir/depend.make
|
||||||
|
|
||||||
|
# Include the progress variables for this target.
|
||||||
|
include CMakeFiles/Fusion2016.dir/progress.make
|
||||||
|
|
||||||
|
# Include the compile flags for this target's objects.
|
||||||
|
include CMakeFiles/Fusion2016.dir/flags.make
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: CMakeFiles/Fusion2016.dir/flags.make
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/main.cpp
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles $(CMAKE_PROGRESS_1)
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object CMakeFiles/Fusion2016.dir/main.cpp.o"
|
||||||
|
/usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/Fusion2016.dir/main.cpp.o -c /home/toni/Documents/programme/localization/Fusion2016/code/main.cpp
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.i: cmake_force
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Fusion2016.dir/main.cpp.i"
|
||||||
|
/usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -E /home/toni/Documents/programme/localization/Fusion2016/code/main.cpp > CMakeFiles/Fusion2016.dir/main.cpp.i
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.s: cmake_force
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Fusion2016.dir/main.cpp.s"
|
||||||
|
/usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -S /home/toni/Documents/programme/localization/Fusion2016/code/main.cpp -o CMakeFiles/Fusion2016.dir/main.cpp.s
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o.requires:
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/main.cpp.o.requires
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o.provides: CMakeFiles/Fusion2016.dir/main.cpp.o.requires
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/main.cpp.o.provides.build
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/main.cpp.o.provides
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o.provides.build: CMakeFiles/Fusion2016.dir/main.cpp.o
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o: CMakeFiles/Fusion2016.dir/flags.make
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o: /home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles $(CMAKE_PROGRESS_2)
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o"
|
||||||
|
/usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o -c /home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.i: cmake_force
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.i"
|
||||||
|
/usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -E /home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp > CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.i
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.s: cmake_force
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.s"
|
||||||
|
/usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -S /home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp -o CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.s
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.requires:
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.requires
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.provides: CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.requires
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.provides.build
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.provides
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.provides.build: CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o
|
||||||
|
|
||||||
|
# Object files for target Fusion2016
|
||||||
|
Fusion2016_OBJECTS = \
|
||||||
|
"CMakeFiles/Fusion2016.dir/main.cpp.o" \
|
||||||
|
"CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o"
|
||||||
|
|
||||||
|
# External object files for target Fusion2016
|
||||||
|
Fusion2016_EXTERNAL_OBJECTS =
|
||||||
|
|
||||||
|
Fusion2016: CMakeFiles/Fusion2016.dir/main.cpp.o
|
||||||
|
Fusion2016: CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o
|
||||||
|
Fusion2016: CMakeFiles/Fusion2016.dir/build.make
|
||||||
|
Fusion2016: CMakeFiles/Fusion2016.dir/link.txt
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX executable Fusion2016"
|
||||||
|
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/Fusion2016.dir/link.txt --verbose=$(VERBOSE)
|
||||||
|
|
||||||
|
# Rule to build all files generated by this target.
|
||||||
|
CMakeFiles/Fusion2016.dir/build: Fusion2016
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/build
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/requires: CMakeFiles/Fusion2016.dir/main.cpp.o.requires
|
||||||
|
CMakeFiles/Fusion2016.dir/requires: CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o.requires
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/requires
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/clean:
|
||||||
|
$(CMAKE_COMMAND) -P CMakeFiles/Fusion2016.dir/cmake_clean.cmake
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/clean
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/depend:
|
||||||
|
cd /home/toni/Documents/programme/localization/Fusion2016/code-build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/toni/Documents/programme/localization/Fusion2016/code /home/toni/Documents/programme/localization/Fusion2016/code /home/toni/Documents/programme/localization/Fusion2016/code-build /home/toni/Documents/programme/localization/Fusion2016/code-build /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/Fusion2016.dir/DependInfo.cmake --color=$(COLOR)
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/depend
|
||||||
|
|
||||||
11
code-build/CMakeFiles/Fusion2016.dir/cmake_clean.cmake
Normal file
11
code-build/CMakeFiles/Fusion2016.dir/cmake_clean.cmake
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
file(REMOVE_RECURSE
|
||||||
|
"CMakeFiles/Fusion2016.dir/main.cpp.o"
|
||||||
|
"CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o"
|
||||||
|
"Fusion2016.pdb"
|
||||||
|
"Fusion2016"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Per-language clean rules from dependency scanning.
|
||||||
|
foreach(lang CXX)
|
||||||
|
include(CMakeFiles/Fusion2016.dir/cmake_clean_${lang}.cmake OPTIONAL)
|
||||||
|
endforeach()
|
||||||
157
code-build/CMakeFiles/Fusion2016.dir/depend.internal
Normal file
157
code-build/CMakeFiles/Fusion2016.dir/depend.internal
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o
|
||||||
|
/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp
|
||||||
|
/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/Assertions.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/Defines.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/Exception.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/Floor.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/FloorplanFactorySVG.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/PlatformStair.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/Stair.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/Stairs.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Angle.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/BBox2.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/BBox3.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Heading.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Length.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Line2.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Point2.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Point3.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Units.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/Grid.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridNeighborIterator.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridNode.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridNodeBBox.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridPoint.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/factory/GridFactory.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/factory/GridImportance.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalk.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkHelper.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkLightAtTheEndOfTheTunnel.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkPathControl.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkPushForward.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkRandomHeadingUpdate.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkRandomHeadingUpdateAdv.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkShortestPathControl.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkSimpleControl.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkState.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/lib/nanoflann/nanoflann.hpp
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/Distributions.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/DrawList.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/Interpolator.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/MiniMat2.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/MovingAVG.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/MovingMedian.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Exponential.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Logistic.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Normal.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Uniform.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/Debug.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/KNN.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/KNNArray.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/Time.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/nav/dijkstra/Dijkstra.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/nav/dijkstra/DijkstraPath.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/nav/dijkstra/DijkstraStructs.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/Assertions.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/fs/File.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/geo/Line.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/geo/Point.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/Color.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGComposite.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGElement.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGElementType.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGFile.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGLayer.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGLoader.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGPath.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGText.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/inc/tinyxml/tinyxml2.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/distribution/Normal.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/distribution/Uniform.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/Particle.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleAssertions.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilter.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilterEvaluation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilterInitializer.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilterTransition.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimationOrderedWeightedAverage.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimationRegionalWeightedAverage.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimationWeightedAverage.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/resampling/ParticleFilterResampling.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/resampling/ParticleFilterResamplingPercent.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/resampling/ParticleFilterResamplingSimple.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/optimization/NumOptVector.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/statistics/Statistics.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/Gnuplot.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotDrawable.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlot.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElement.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElementColorPoints.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElementLines.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElementRaw.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSize.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplot.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElement.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementColorPoints.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementLines.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementPoints.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementRaw.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotStructs.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/attributes/GnuplotAttrColor.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/attributes/GnuplotAttrCustom.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/attributes/GnuplotAttrTitle.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/os/Process.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/os/Time.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/string/String.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/DijkstraMapper.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/Helper.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/MyGridNode.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/OldGroundTruth.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/Settings.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/Vis.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/DebugShortestPath.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/Eval.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/Eval1.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/EvalBase.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/GroundTruthWay.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperPlot.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperPlot2D.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisDijkstra.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisGrid.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisImportance.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconEvaluation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconObservation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconSensorReader.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/MACAddress.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/OrientationObservation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/OrientationSensorReader.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/PositionedBeacon.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/PositionedWiFiAP.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiAP.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiEvaluation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiObservation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiSensorReader.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/lukas/StepEvaluation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/lukas/StepObservation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/lukas/TurnEvaluation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/lukas/TurnObservation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/main.cpp
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyControl.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyEvaluation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyInitializer.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyObservation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyState.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyTransition.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReader.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReaderStep.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReaderTurn.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerEvaluation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerObservation.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerSensorReader.h
|
||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code/toni/barometric.h
|
||||||
157
code-build/CMakeFiles/Fusion2016.dir/depend.make
Normal file
157
code-build/CMakeFiles/Fusion2016.dir/depend.make
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o: /home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp
|
||||||
|
CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o: /home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.h
|
||||||
|
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/Assertions.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/Defines.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/Exception.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/Floor.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/FloorplanFactorySVG.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/PlatformStair.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/Stair.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/floorplan/Stairs.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Angle.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/BBox2.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/BBox3.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Heading.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Length.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Line2.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Point2.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Point3.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/geo/Units.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/Grid.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridNeighborIterator.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridNode.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridNodeBBox.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/GridPoint.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/factory/GridFactory.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/factory/GridImportance.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalk.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkHelper.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkLightAtTheEndOfTheTunnel.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkPathControl.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkPushForward.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkRandomHeadingUpdate.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkRandomHeadingUpdateAdv.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkShortestPathControl.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkSimpleControl.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/grid/walk/GridWalkState.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/lib/nanoflann/nanoflann.hpp
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/Distributions.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/DrawList.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/Interpolator.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/MiniMat2.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/MovingAVG.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/MovingMedian.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Exponential.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Logistic.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Normal.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/math/distribution/Uniform.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/Debug.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/KNN.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/KNNArray.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/misc/Time.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/nav/dijkstra/Dijkstra.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/nav/dijkstra/DijkstraPath.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../Indoor/nav/dijkstra/DijkstraStructs.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/Assertions.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/fs/File.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/geo/Line.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/geo/Point.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/Color.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGComposite.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGElement.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGElementType.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGFile.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGLayer.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGLoader.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGPath.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/gfx/svg/SVGText.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/inc/tinyxml/tinyxml2.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/distribution/Normal.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/distribution/Uniform.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/Particle.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleAssertions.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilter.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilterEvaluation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilterInitializer.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/ParticleFilterTransition.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimationOrderedWeightedAverage.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimationRegionalWeightedAverage.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/estimation/ParticleFilterEstimationWeightedAverage.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/resampling/ParticleFilterResampling.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/resampling/ParticleFilterResamplingPercent.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/filter/particles/resampling/ParticleFilterResamplingSimple.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/optimization/NumOptVector.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/math/statistics/Statistics.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/Gnuplot.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotDrawable.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlot.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElement.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElementColorPoints.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElementLines.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotPlotElementRaw.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSize.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplot.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElement.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementColorPoints.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementLines.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementPoints.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotSplotElementRaw.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/GnuplotStructs.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/attributes/GnuplotAttrColor.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/attributes/GnuplotAttrCustom.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/misc/gnuplot/attributes/GnuplotAttrTitle.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/os/Process.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/os/Time.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/../../KLib/string/String.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/DijkstraMapper.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/Helper.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/MyGridNode.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/OldGroundTruth.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/Settings.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/Vis.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/DebugShortestPath.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/Eval.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/Eval1.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/EvalBase.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/GroundTruthWay.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperPlot.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperPlot2D.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisDijkstra.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisGrid.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisImportance.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconEvaluation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconObservation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconSensorReader.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/MACAddress.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/OrientationObservation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/OrientationSensorReader.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/PositionedBeacon.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/PositionedWiFiAP.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiAP.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiEvaluation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiObservation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiSensorReader.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/lukas/StepEvaluation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/lukas/StepObservation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/lukas/TurnEvaluation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/lukas/TurnObservation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/main.cpp
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/particles/MyControl.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/particles/MyEvaluation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/particles/MyInitializer.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/particles/MyObservation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/particles/MyState.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/particles/MyTransition.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReader.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReaderStep.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReaderTurn.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerEvaluation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerObservation.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerSensorReader.h
|
||||||
|
CMakeFiles/Fusion2016.dir/main.cpp.o: /home/toni/Documents/programme/localization/Fusion2016/code/toni/barometric.h
|
||||||
|
|
||||||
8
code-build/CMakeFiles/Fusion2016.dir/flags.make
Normal file
8
code-build/CMakeFiles/Fusion2016.dir/flags.make
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
# compile CXX with /usr/bin/c++
|
||||||
|
CXX_FLAGS = -g -I/home/toni/Documents/programme/localization/Fusion2016/code/../.. -std=gnu++11 -Wall -Werror=return-type -Wextra -Wpedantic -fstack-protector-all -g -O0
|
||||||
|
|
||||||
|
CXX_DEFINES = -DWITH_ASSERTIONS -DWITH_TESTS
|
||||||
|
|
||||||
Binary file not shown.
1
code-build/CMakeFiles/Fusion2016.dir/link.txt
Normal file
1
code-build/CMakeFiles/Fusion2016.dir/link.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/usr/bin/c++ -g CMakeFiles/Fusion2016.dir/main.cpp.o CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o -o Fusion2016 -rdynamic -lgtest -lpthread
|
||||||
BIN
code-build/CMakeFiles/Fusion2016.dir/main.cpp.o
Normal file
BIN
code-build/CMakeFiles/Fusion2016.dir/main.cpp.o
Normal file
Binary file not shown.
3
code-build/CMakeFiles/Fusion2016.dir/progress.make
Normal file
3
code-build/CMakeFiles/Fusion2016.dir/progress.make
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
CMAKE_PROGRESS_1 = 1
|
||||||
|
CMAKE_PROGRESS_2 = 2
|
||||||
|
|
||||||
45
code-build/CMakeFiles/Makefile.cmake
Normal file
45
code-build/CMakeFiles/Makefile.cmake
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
# The generator used is:
|
||||||
|
set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
|
||||||
|
|
||||||
|
# The top level Makefile was generated from the following files:
|
||||||
|
set(CMAKE_MAKEFILE_DEPENDS
|
||||||
|
"CMakeCache.txt"
|
||||||
|
"CMakeFiles/3.0.2/CMakeCCompiler.cmake"
|
||||||
|
"CMakeFiles/3.0.2/CMakeCXXCompiler.cmake"
|
||||||
|
"CMakeFiles/3.0.2/CMakeSystem.cmake"
|
||||||
|
"/home/toni/Documents/programme/localization/Fusion2016/code/CMakeLists.txt"
|
||||||
|
"/usr/share/cmake/Modules/CMakeCInformation.cmake"
|
||||||
|
"/usr/share/cmake/Modules/CMakeCXXInformation.cmake"
|
||||||
|
"/usr/share/cmake/Modules/CMakeCommonLanguageInclude.cmake"
|
||||||
|
"/usr/share/cmake/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
|
||||||
|
"/usr/share/cmake/Modules/CMakeFindCodeBlocks.cmake"
|
||||||
|
"/usr/share/cmake/Modules/CMakeGenericSystem.cmake"
|
||||||
|
"/usr/share/cmake/Modules/CMakeSystemSpecificInformation.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Compiler/GNU-C.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Compiler/GNU-CXX.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Compiler/GNU.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Platform/Linux-GNU-C.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Platform/Linux-GNU-CXX.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Platform/Linux-GNU.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Platform/Linux.cmake"
|
||||||
|
"/usr/share/cmake/Modules/Platform/UnixPaths.cmake"
|
||||||
|
)
|
||||||
|
|
||||||
|
# The corresponding makefile is:
|
||||||
|
set(CMAKE_MAKEFILE_OUTPUTS
|
||||||
|
"Makefile"
|
||||||
|
"CMakeFiles/cmake.check_cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Byproducts of CMake generate step:
|
||||||
|
set(CMAKE_MAKEFILE_PRODUCTS
|
||||||
|
"CMakeFiles/CMakeDirectoryInformation.cmake"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Dependency information for all targets:
|
||||||
|
set(CMAKE_DEPEND_INFO_FILES
|
||||||
|
"CMakeFiles/Fusion2016.dir/DependInfo.cmake"
|
||||||
|
)
|
||||||
99
code-build/CMakeFiles/Makefile2
Normal file
99
code-build/CMakeFiles/Makefile2
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
# Default target executed when no arguments are given to make.
|
||||||
|
default_target: all
|
||||||
|
.PHONY : default_target
|
||||||
|
|
||||||
|
# The main recursive all target
|
||||||
|
all:
|
||||||
|
.PHONY : all
|
||||||
|
|
||||||
|
# The main recursive preinstall target
|
||||||
|
preinstall:
|
||||||
|
.PHONY : preinstall
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Special targets provided by cmake.
|
||||||
|
|
||||||
|
# Disable implicit rules so canonical targets will work.
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||||
|
SUFFIXES =
|
||||||
|
|
||||||
|
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||||
|
|
||||||
|
# Suppress display of executed commands.
|
||||||
|
$(VERBOSE).SILENT:
|
||||||
|
|
||||||
|
# A target that is always out of date.
|
||||||
|
cmake_force:
|
||||||
|
.PHONY : cmake_force
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Set environment variables for the build.
|
||||||
|
|
||||||
|
# The shell in which to execute make rules.
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# The CMake executable.
|
||||||
|
CMAKE_COMMAND = /usr/bin/cmake
|
||||||
|
|
||||||
|
# The command to remove a file.
|
||||||
|
RM = /usr/bin/cmake -E remove -f
|
||||||
|
|
||||||
|
# Escaping for special characters.
|
||||||
|
EQUALS = =
|
||||||
|
|
||||||
|
# The top-level source directory on which CMake was run.
|
||||||
|
CMAKE_SOURCE_DIR = /home/toni/Documents/programme/localization/Fusion2016/code
|
||||||
|
|
||||||
|
# The top-level build directory on which CMake was run.
|
||||||
|
CMAKE_BINARY_DIR = /home/toni/Documents/programme/localization/Fusion2016/code-build
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Target rules for target CMakeFiles/Fusion2016.dir
|
||||||
|
|
||||||
|
# All Build rule for target.
|
||||||
|
CMakeFiles/Fusion2016.dir/all:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/depend
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/build
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_report /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles 1 2
|
||||||
|
@echo "Built target Fusion2016"
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/all
|
||||||
|
|
||||||
|
# Include target in all.
|
||||||
|
all: CMakeFiles/Fusion2016.dir/all
|
||||||
|
.PHONY : all
|
||||||
|
|
||||||
|
# Build rule for subdir invocation for target.
|
||||||
|
CMakeFiles/Fusion2016.dir/rule: cmake_check_build_system
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_start /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles 2
|
||||||
|
$(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/Fusion2016.dir/all
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_start /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles 0
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/rule
|
||||||
|
|
||||||
|
# Convenience name for target.
|
||||||
|
Fusion2016: CMakeFiles/Fusion2016.dir/rule
|
||||||
|
.PHONY : Fusion2016
|
||||||
|
|
||||||
|
# clean rule for target.
|
||||||
|
CMakeFiles/Fusion2016.dir/clean:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/clean
|
||||||
|
.PHONY : CMakeFiles/Fusion2016.dir/clean
|
||||||
|
|
||||||
|
# clean rule for target.
|
||||||
|
clean: CMakeFiles/Fusion2016.dir/clean
|
||||||
|
.PHONY : clean
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Special targets to cleanup operation of make.
|
||||||
|
|
||||||
|
# Special rule to run CMake to check the build system integrity.
|
||||||
|
# No rule that depends on this can have commands that come from listfiles
|
||||||
|
# because they might be regenerated.
|
||||||
|
cmake_check_build_system:
|
||||||
|
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||||
|
.PHONY : cmake_check_build_system
|
||||||
|
|
||||||
1
code-build/CMakeFiles/TargetDirectories.txt
Normal file
1
code-build/CMakeFiles/TargetDirectories.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/Fusion2016.dir
|
||||||
1
code-build/CMakeFiles/cmake.check_cache
Normal file
1
code-build/CMakeFiles/cmake.check_cache
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
||||||
1
code-build/CMakeFiles/progress.marks
Normal file
1
code-build/CMakeFiles/progress.marks
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
BIN
code-build/Fusion2016
Executable file
BIN
code-build/Fusion2016
Executable file
Binary file not shown.
205
code-build/Fusion2016.cbp
Normal file
205
code-build/Fusion2016.cbp
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_project_file>
|
||||||
|
<FileVersion major="1" minor="6" />
|
||||||
|
<Project>
|
||||||
|
<Option title="Fusion2016" />
|
||||||
|
<Option makefile_is_custom="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Option virtualFolders="CMake Files\;" />
|
||||||
|
<Build>
|
||||||
|
<Target title="all">
|
||||||
|
<Option working_dir="/home/toni/Documents/programme/localization/Fusion2016/code-build" />
|
||||||
|
<Option type="4" />
|
||||||
|
<MakeCommands>
|
||||||
|
<Build command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 all" />
|
||||||
|
<CompileFile command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 "$file"" />
|
||||||
|
<Clean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
<DistClean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
</MakeCommands>
|
||||||
|
</Target>
|
||||||
|
<Target title="Fusion2016">
|
||||||
|
<Option output="/home/toni/Documents/programme/localization/Fusion2016/code-build/Fusion2016" prefix_auto="0" extension_auto="0" />
|
||||||
|
<Option working_dir="/home/toni/Documents/programme/localization/Fusion2016/code-build" />
|
||||||
|
<Option object_output="./" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-DWITH_TESTS" />
|
||||||
|
<Add option="-DWITH_ASSERTIONS" />
|
||||||
|
<Add directory="/home/toni/Documents/programme/localization/Fusion2016/code/../.." />
|
||||||
|
<Add directory="/usr/include" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/backward" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/x86_64-redhat-linux" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include" />
|
||||||
|
<Add directory="/usr/local/include" />
|
||||||
|
</Compiler>
|
||||||
|
<MakeCommands>
|
||||||
|
<Build command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 Fusion2016" />
|
||||||
|
<CompileFile command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 "$file"" />
|
||||||
|
<Clean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
<DistClean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
</MakeCommands>
|
||||||
|
</Target>
|
||||||
|
<Target title="Fusion2016/fast">
|
||||||
|
<Option output="/home/toni/Documents/programme/localization/Fusion2016/code-build/Fusion2016" prefix_auto="0" extension_auto="0" />
|
||||||
|
<Option working_dir="/home/toni/Documents/programme/localization/Fusion2016/code-build" />
|
||||||
|
<Option object_output="./" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-DWITH_TESTS" />
|
||||||
|
<Add option="-DWITH_ASSERTIONS" />
|
||||||
|
<Add directory="/home/toni/Documents/programme/localization/Fusion2016/code/../.." />
|
||||||
|
<Add directory="/usr/include" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/backward" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/x86_64-redhat-linux" />
|
||||||
|
<Add directory="/usr/lib/gcc/x86_64-redhat-linux/4.9.2/include" />
|
||||||
|
<Add directory="/usr/local/include" />
|
||||||
|
</Compiler>
|
||||||
|
<MakeCommands>
|
||||||
|
<Build command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 Fusion2016/fast" />
|
||||||
|
<CompileFile command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 "$file"" />
|
||||||
|
<Clean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
<DistClean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
</MakeCommands>
|
||||||
|
</Target>
|
||||||
|
<Target title="edit_cache">
|
||||||
|
<Option working_dir="/home/toni/Documents/programme/localization/Fusion2016/code-build" />
|
||||||
|
<Option type="4" />
|
||||||
|
<MakeCommands>
|
||||||
|
<Build command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 edit_cache" />
|
||||||
|
<CompileFile command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 "$file"" />
|
||||||
|
<Clean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
<DistClean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
</MakeCommands>
|
||||||
|
</Target>
|
||||||
|
<Target title="rebuild_cache">
|
||||||
|
<Option working_dir="/home/toni/Documents/programme/localization/Fusion2016/code-build" />
|
||||||
|
<Option type="4" />
|
||||||
|
<MakeCommands>
|
||||||
|
<Build command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 rebuild_cache" />
|
||||||
|
<CompileFile command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 "$file"" />
|
||||||
|
<Clean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
<DistClean command="/usr/bin/gmake -f "/home/toni/Documents/programme/localization/Fusion2016/code-build/Makefile" VERBOSE=1 clean" />
|
||||||
|
</MakeCommands>
|
||||||
|
</Target>
|
||||||
|
</Build>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/main.cpp">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/DijkstraMapper.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/Helper.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/MyGridNode.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/OldGroundTruth.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/Settings.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/Vis.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/DebugShortestPath.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/Eval.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/Eval1.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/EvalBase.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/GroundTruthWay.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperPlot.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperPlot2D.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisDijkstra.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisGrid.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/eval/PaperVisImportance.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconEvaluation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconObservation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/BeaconSensorReader.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/MACAddress.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/OrientationObservation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/OrientationSensorReader.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/Position3D.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/PositionedBeacon.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/PositionedWiFiAP.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/Settings.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiAP.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiEvaluation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiHelper.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiObservation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/frank/WiFiSensorReader.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/lukas/StepEvaluation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/lukas/StepObservation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/lukas/StepReader.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/lukas/TurnEvaluation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/lukas/TurnObservation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/lukas/TurnReader.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyControl.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyEvaluation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyInitializer.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyObservation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyState.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyTransition.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/particles/MyTransitionSimple.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReader.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReaderStep.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/reader/SensorReaderTurn.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerEvaluation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerObservation.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/toni/BarometerSensorReader.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/toni/TFRingBuffer.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/toni/barometric.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/toni/circular.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.h">
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="/home/toni/Documents/programme/localization/Fusion2016/code/CMakeLists.txt">
|
||||||
|
<Option virtualFolder="CMake Files\" />
|
||||||
|
</Unit>
|
||||||
|
</Project>
|
||||||
|
</CodeBlocks_project_file>
|
||||||
194
code-build/Makefile
Normal file
194
code-build/Makefile
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
# CMAKE generated file: DO NOT EDIT!
|
||||||
|
# Generated by "Unix Makefiles" Generator, CMake Version 3.0
|
||||||
|
|
||||||
|
# Default target executed when no arguments are given to make.
|
||||||
|
default_target: all
|
||||||
|
.PHONY : default_target
|
||||||
|
|
||||||
|
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||||
|
.NOTPARALLEL:
|
||||||
|
.PHONY : .NOTPARALLEL
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Special targets provided by cmake.
|
||||||
|
|
||||||
|
# Disable implicit rules so canonical targets will work.
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
# Remove some rules from gmake that .SUFFIXES does not remove.
|
||||||
|
SUFFIXES =
|
||||||
|
|
||||||
|
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||||
|
|
||||||
|
# Suppress display of executed commands.
|
||||||
|
$(VERBOSE).SILENT:
|
||||||
|
|
||||||
|
# A target that is always out of date.
|
||||||
|
cmake_force:
|
||||||
|
.PHONY : cmake_force
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Set environment variables for the build.
|
||||||
|
|
||||||
|
# The shell in which to execute make rules.
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# The CMake executable.
|
||||||
|
CMAKE_COMMAND = /usr/bin/cmake
|
||||||
|
|
||||||
|
# The command to remove a file.
|
||||||
|
RM = /usr/bin/cmake -E remove -f
|
||||||
|
|
||||||
|
# Escaping for special characters.
|
||||||
|
EQUALS = =
|
||||||
|
|
||||||
|
# The top-level source directory on which CMake was run.
|
||||||
|
CMAKE_SOURCE_DIR = /home/toni/Documents/programme/localization/Fusion2016/code
|
||||||
|
|
||||||
|
# The top-level build directory on which CMake was run.
|
||||||
|
CMAKE_BINARY_DIR = /home/toni/Documents/programme/localization/Fusion2016/code-build
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Targets provided globally by CMake.
|
||||||
|
|
||||||
|
# Special rule for the target edit_cache
|
||||||
|
edit_cache:
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
|
||||||
|
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
|
||||||
|
.PHONY : edit_cache
|
||||||
|
|
||||||
|
# Special rule for the target edit_cache
|
||||||
|
edit_cache/fast: edit_cache
|
||||||
|
.PHONY : edit_cache/fast
|
||||||
|
|
||||||
|
# Special rule for the target rebuild_cache
|
||||||
|
rebuild_cache:
|
||||||
|
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||||
|
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||||
|
.PHONY : rebuild_cache
|
||||||
|
|
||||||
|
# Special rule for the target rebuild_cache
|
||||||
|
rebuild_cache/fast: rebuild_cache
|
||||||
|
.PHONY : rebuild_cache/fast
|
||||||
|
|
||||||
|
# The main all target
|
||||||
|
all: cmake_check_build_system
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_start /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles/progress.marks
|
||||||
|
$(MAKE) -f CMakeFiles/Makefile2 all
|
||||||
|
$(CMAKE_COMMAND) -E cmake_progress_start /home/toni/Documents/programme/localization/Fusion2016/code-build/CMakeFiles 0
|
||||||
|
.PHONY : all
|
||||||
|
|
||||||
|
# The main clean target
|
||||||
|
clean:
|
||||||
|
$(MAKE) -f CMakeFiles/Makefile2 clean
|
||||||
|
.PHONY : clean
|
||||||
|
|
||||||
|
# The main clean target
|
||||||
|
clean/fast: clean
|
||||||
|
.PHONY : clean/fast
|
||||||
|
|
||||||
|
# Prepare targets for installation.
|
||||||
|
preinstall: all
|
||||||
|
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||||
|
.PHONY : preinstall
|
||||||
|
|
||||||
|
# Prepare targets for installation.
|
||||||
|
preinstall/fast:
|
||||||
|
$(MAKE) -f CMakeFiles/Makefile2 preinstall
|
||||||
|
.PHONY : preinstall/fast
|
||||||
|
|
||||||
|
# clear depends
|
||||||
|
depend:
|
||||||
|
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||||
|
.PHONY : depend
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Target rules for targets named Fusion2016
|
||||||
|
|
||||||
|
# Build rule for target.
|
||||||
|
Fusion2016: cmake_check_build_system
|
||||||
|
$(MAKE) -f CMakeFiles/Makefile2 Fusion2016
|
||||||
|
.PHONY : Fusion2016
|
||||||
|
|
||||||
|
# fast build rule for target.
|
||||||
|
Fusion2016/fast:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/build
|
||||||
|
.PHONY : Fusion2016/fast
|
||||||
|
|
||||||
|
home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.o: home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o
|
||||||
|
.PHONY : home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o
|
||||||
|
.PHONY : home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.o
|
||||||
|
|
||||||
|
home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.i: home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.i
|
||||||
|
.PHONY : home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.i:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.i
|
||||||
|
.PHONY : home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.i
|
||||||
|
|
||||||
|
home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.s: home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.s
|
||||||
|
.PHONY : home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.s:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.s
|
||||||
|
.PHONY : home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.cpp.s
|
||||||
|
|
||||||
|
main.o: main.cpp.o
|
||||||
|
.PHONY : main.o
|
||||||
|
|
||||||
|
# target to build an object file
|
||||||
|
main.cpp.o:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/main.cpp.o
|
||||||
|
.PHONY : main.cpp.o
|
||||||
|
|
||||||
|
main.i: main.cpp.i
|
||||||
|
.PHONY : main.i
|
||||||
|
|
||||||
|
# target to preprocess a source file
|
||||||
|
main.cpp.i:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/main.cpp.i
|
||||||
|
.PHONY : main.cpp.i
|
||||||
|
|
||||||
|
main.s: main.cpp.s
|
||||||
|
.PHONY : main.s
|
||||||
|
|
||||||
|
# target to generate assembly for a file
|
||||||
|
main.cpp.s:
|
||||||
|
$(MAKE) -f CMakeFiles/Fusion2016.dir/build.make CMakeFiles/Fusion2016.dir/main.cpp.s
|
||||||
|
.PHONY : main.cpp.s
|
||||||
|
|
||||||
|
# Help Target
|
||||||
|
help:
|
||||||
|
@echo "The following are some of the valid targets for this Makefile:"
|
||||||
|
@echo "... all (the default if no target is provided)"
|
||||||
|
@echo "... clean"
|
||||||
|
@echo "... depend"
|
||||||
|
@echo "... Fusion2016"
|
||||||
|
@echo "... edit_cache"
|
||||||
|
@echo "... rebuild_cache"
|
||||||
|
@echo "... home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.o"
|
||||||
|
@echo "... home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.i"
|
||||||
|
@echo "... home/toni/Documents/programme/localization/KLib/inc/tinyxml/tinyxml2.s"
|
||||||
|
@echo "... main.o"
|
||||||
|
@echo "... main.i"
|
||||||
|
@echo "... main.s"
|
||||||
|
.PHONY : help
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Special targets to cleanup operation of make.
|
||||||
|
|
||||||
|
# Special rule to run CMake to check the build system integrity.
|
||||||
|
# No rule that depends on this can have commands that come from listfiles
|
||||||
|
# because they might be regenerated.
|
||||||
|
cmake_check_build_system:
|
||||||
|
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||||
|
.PHONY : cmake_check_build_system
|
||||||
|
|
||||||
44
code-build/cmake_install.cmake
Normal file
44
code-build/cmake_install.cmake
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Install script for directory: /home/toni/Documents/programme/localization/Fusion2016/code
|
||||||
|
|
||||||
|
# Set the install prefix
|
||||||
|
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||||
|
endif()
|
||||||
|
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
# Set the install configuration name.
|
||||||
|
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||||
|
if(BUILD_TYPE)
|
||||||
|
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||||
|
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
|
||||||
|
endif()
|
||||||
|
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Set the component getting installed.
|
||||||
|
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||||
|
if(COMPONENT)
|
||||||
|
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||||
|
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_COMPONENT)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Install shared libraries without execute permission?
|
||||||
|
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||||
|
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_COMPONENT)
|
||||||
|
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
|
||||||
|
else()
|
||||||
|
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(WRITE "/home/toni/Documents/programme/localization/Fusion2016/code-build/${CMAKE_INSTALL_MANIFEST}" "")
|
||||||
|
foreach(file ${CMAKE_INSTALL_MANIFEST_FILES})
|
||||||
|
file(APPEND "/home/toni/Documents/programme/localization/Fusion2016/code-build/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
|
||||||
|
endforeach()
|
||||||
90
code/CMakeLists.txt
Executable file
90
code/CMakeLists.txt
Executable file
@@ -0,0 +1,90 @@
|
|||||||
|
# Usage:
|
||||||
|
# Create build folder, like RC-build next to RobotControl and WifiScan folder
|
||||||
|
# CD into build folder and execute 'cmake -DCMAKE_BUILD_TYPE=Debug ../RobotControl'
|
||||||
|
# make
|
||||||
|
|
||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||||
|
|
||||||
|
# select build type
|
||||||
|
SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" )
|
||||||
|
|
||||||
|
PROJECT(Fusion2016)
|
||||||
|
|
||||||
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
MESSAGE(STATUS "No build type selected. Default to Debug")
|
||||||
|
SET(CMAKE_BUILD_TYPE "Debug")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
../../
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
FILE(GLOB HEADERS
|
||||||
|
./*.h
|
||||||
|
./*/*.h
|
||||||
|
./*/*/*.h
|
||||||
|
./*/*/*/*.h
|
||||||
|
./*/*/*/*/*.h
|
||||||
|
./*/*/*/*/*/*.h
|
||||||
|
)
|
||||||
|
|
||||||
|
FILE(GLOB SOURCES
|
||||||
|
./*.cpp
|
||||||
|
./*/*.cpp
|
||||||
|
./*/*/*.cpp
|
||||||
|
./*/*/*/*.cpp
|
||||||
|
../../KLib/inc/tinyxml/*.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
|
||||||
|
|
||||||
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_X86_ /D_USE_MATH_DEFINES")
|
||||||
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi /Oi /GL /Ot /Ox /D_X86_ /D_USE_MATH_DEFINES")
|
||||||
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
|
||||||
|
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /INCREMENTAL:NO")
|
||||||
|
|
||||||
|
set(CMAKE_CONFIGURATION_TYPES Release Debug)
|
||||||
|
|
||||||
|
else()
|
||||||
|
|
||||||
|
# system specific compiler flags
|
||||||
|
ADD_DEFINITIONS(
|
||||||
|
|
||||||
|
-std=gnu++11
|
||||||
|
|
||||||
|
-Wall
|
||||||
|
-Werror=return-type
|
||||||
|
-Wextra
|
||||||
|
-Wpedantic
|
||||||
|
|
||||||
|
-fstack-protector-all
|
||||||
|
|
||||||
|
-g
|
||||||
|
-O0
|
||||||
|
-DWITH_TESTS
|
||||||
|
-DWITH_ASSERTIONS
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# build a binary file
|
||||||
|
ADD_EXECUTABLE(
|
||||||
|
${PROJECT_NAME}
|
||||||
|
${HEADERS}
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
# needed external libraries
|
||||||
|
TARGET_LINK_LIBRARIES(
|
||||||
|
${PROJECT_NAME}
|
||||||
|
gtest
|
||||||
|
pthread
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(CMAKE_C_COMPILER ${CMAKE_CXX_COMPILER})
|
||||||
|
|
||||||
190
code/CMakeLists.txt.user
Normal file
190
code/CMakeLists.txt.user
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 3.4.2, 2016-02-09T02:12:04. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>EnvironmentId</variable>
|
||||||
|
<value type="QByteArray">{019cc681-80c8-4d51-8bae-40a1fa38def1}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap"/>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{30c8d991-8fa7-4988-88f5-4b7190981f4a}</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="bool" key="CMakeProjectManager.CMakeBuildConfiguration.UseNinja">false</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/toni/Documents/programme/localization/Fusion2016/code-build</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
|
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"/>
|
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments">clean</value>
|
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"/>
|
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.Clean">true</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">all</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||||
|
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||||
|
<value type="int">0</value>
|
||||||
|
<value type="int">1</value>
|
||||||
|
<value type="int">2</value>
|
||||||
|
<value type="int">3</value>
|
||||||
|
<value type="int">4</value>
|
||||||
|
<value type="int">5</value>
|
||||||
|
<value type="int">6</value>
|
||||||
|
<value type="int">7</value>
|
||||||
|
<value type="int">8</value>
|
||||||
|
<value type="int">9</value>
|
||||||
|
<value type="int">10</value>
|
||||||
|
<value type="int">11</value>
|
||||||
|
<value type="int">12</value>
|
||||||
|
<value type="int">13</value>
|
||||||
|
<value type="int">14</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">Fusion2016</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
|
||||||
|
<value type="bool" key="CMakeProjectManager.CMakeRunConfiguration.UseTerminal">false</value>
|
||||||
|
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Fusion2016</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.Fusion2016</value>
|
||||||
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">18</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>Version</variable>
|
||||||
|
<value type="int">18</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
51
code/DijkstraMapper.h
Normal file
51
code/DijkstraMapper.h
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
#ifndef DIJKSTRAMAPPER_H
|
||||||
|
#define DIJKSTRAMAPPER_H
|
||||||
|
|
||||||
|
#include "MyGridNode.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* allows BETTER dijkstra calculation on top of our data-structure
|
||||||
|
*/
|
||||||
|
class DijkstraMapper {
|
||||||
|
|
||||||
|
Grid<MyGridNode>& grid;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
DijkstraMapper(Grid<MyGridNode>& grid) : grid(grid) {;}
|
||||||
|
|
||||||
|
int getNumNeighbors(const MyGridNode& node) const {return node.getNumNeighbors();}
|
||||||
|
|
||||||
|
const MyGridNode* getNeighbor(const MyGridNode& node, const int idx) const {return &grid.getNeighbor(node, idx);}
|
||||||
|
|
||||||
|
float getWeightBetween(const MyGridNode& n1, const MyGridNode& n2) const {
|
||||||
|
float d = ((Point3)n1 - (Point3)n2).length(2) ;
|
||||||
|
//if (d > 20) {d*= 1.30;}
|
||||||
|
d /= std::pow(n2.imp, 3);
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* allows NORMAL dijkstra calculation on top of our data-structure
|
||||||
|
*/
|
||||||
|
class DijkstraMapperNormal {
|
||||||
|
|
||||||
|
Grid<MyGridNode>& grid;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
DijkstraMapperNormal(Grid<MyGridNode>& grid) : grid(grid) {;}
|
||||||
|
|
||||||
|
int getNumNeighbors(const MyGridNode& node) const {return node.getNumNeighbors();}
|
||||||
|
|
||||||
|
const MyGridNode* getNeighbor(const MyGridNode& node, const int idx) const {return &grid.getNeighbor(node, idx);}
|
||||||
|
|
||||||
|
float getWeightBetween(const MyGridNode& n1, const MyGridNode& n2) const {
|
||||||
|
return ((Point3)n1 - (Point3)n2).length();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DIJKSTRAMAPPER_H
|
||||||
167
code/Helper.h
Normal file
167
code/Helper.h
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
#ifndef HELPER_H
|
||||||
|
#define HELPER_H
|
||||||
|
|
||||||
|
#include <Indoor/grid/Grid.h>
|
||||||
|
#include <Indoor/grid/factory/GridFactory.h>
|
||||||
|
#include <Indoor/grid/factory/GridImportance.h>
|
||||||
|
|
||||||
|
#include <Indoor/floorplan/FloorplanFactorySVG.h>
|
||||||
|
|
||||||
|
#include "Settings.h"
|
||||||
|
#include "MyGridNode.h"
|
||||||
|
#include "OldGroundTruth.h"
|
||||||
|
|
||||||
|
class Helper {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** convert height (in cm) to floor-numbers */
|
||||||
|
static int getFloorNr(float z_cm) {
|
||||||
|
// if (z_cm < 360) {return 0;}
|
||||||
|
// if (z_cm < 360+340) {return 1;}
|
||||||
|
// if (z_cm < 360+340+340) {return 2;}
|
||||||
|
// return 3;
|
||||||
|
if (z_cm < 380) {return 0;}
|
||||||
|
if (z_cm < 380+340) {return 1;}
|
||||||
|
if (z_cm < 380+340+340) {return 2;}
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** convert height (in cm) to floor-numbers */
|
||||||
|
static int getFloorNrFloat(const float z_cm) {
|
||||||
|
return z_cm / 350.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int getHeight(const int floorNr) {
|
||||||
|
switch(floorNr) {
|
||||||
|
case 0: return 0;
|
||||||
|
case 1: return 380;
|
||||||
|
case 2: return 380+340;
|
||||||
|
case 3: return 380+340+340;
|
||||||
|
default: throw "error";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** align the given value onto the grid */
|
||||||
|
static int align(const int val) {
|
||||||
|
return val / MiscSettings::gridSize_cm * MiscSettings::gridSize_cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** all floors within the building */
|
||||||
|
struct FHWSFloors {
|
||||||
|
|
||||||
|
Floor f0, f1, f2, f3;
|
||||||
|
|
||||||
|
Stairs s01, s12, s23;
|
||||||
|
|
||||||
|
const LengthF h0 = LengthF::cm(align(getHeight(0)));
|
||||||
|
const LengthF h1 = LengthF::cm(align(getHeight(1)));
|
||||||
|
const LengthF h2 = LengthF::cm(align(getHeight(2)));
|
||||||
|
const LengthF h3 = LengthF::cm(align(getHeight(3)));
|
||||||
|
|
||||||
|
// all ground-truth points
|
||||||
|
std::unordered_map<int, Point3> gtwp;
|
||||||
|
|
||||||
|
FHWSFloors() {;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/** load the entire floorplan */
|
||||||
|
static FHWSFloors getFloors() {
|
||||||
|
|
||||||
|
FloorplanFactorySVG fpFac(MiscSettings::floorplan, 2.822222);
|
||||||
|
FHWSFloors f;
|
||||||
|
|
||||||
|
f.f0 = fpFac.getFloor("floor_0");
|
||||||
|
f.f1 = fpFac.getFloor("floor_1");
|
||||||
|
f.f2 = fpFac.getFloor("floor_2");
|
||||||
|
f.f3 = fpFac.getFloor("floor_3");
|
||||||
|
|
||||||
|
f.s01 = fpFac.getStairs("staircase_0_1");
|
||||||
|
f.s12 = fpFac.getStairs("staircase_1_2");
|
||||||
|
f.s23 = fpFac.getStairs("staircase_2_3");
|
||||||
|
|
||||||
|
OldGroundTruth gtwp0(MiscSettings::floorplan, "ground_truth_0", 2.822222);
|
||||||
|
OldGroundTruth gtwp05(MiscSettings::floorplan, "ground_truth_0_5", 2.822222);
|
||||||
|
OldGroundTruth gtwp1(MiscSettings::floorplan, "ground_truth_1", 2.822222);
|
||||||
|
OldGroundTruth gtwp15(MiscSettings::floorplan, "ground_truth_1_5", 2.822222);
|
||||||
|
OldGroundTruth gtwp2(MiscSettings::floorplan, "ground_truth_2", 2.822222);
|
||||||
|
OldGroundTruth gtwp25(MiscSettings::floorplan, "ground_truth_2_5", 2.822222);
|
||||||
|
OldGroundTruth gtwp3(MiscSettings::floorplan, "ground_truth_3", 2.822222);
|
||||||
|
|
||||||
|
for (auto it : gtwp0.getWaypoints()) { if (f.gtwp.find(it.first) != f.gtwp.end()) {throw 1;} f.gtwp[it.first] = Point3(it.second.x, it.second.y, getHeight(0));}
|
||||||
|
for (auto it : gtwp1.getWaypoints()) { if (f.gtwp.find(it.first) != f.gtwp.end()) {throw 1;} f.gtwp[it.first] = Point3(it.second.x, it.second.y, getHeight(1));}
|
||||||
|
for (auto it : gtwp2.getWaypoints()) { if (f.gtwp.find(it.first) != f.gtwp.end()) {throw 1;} f.gtwp[it.first] = Point3(it.second.x, it.second.y, getHeight(2));}
|
||||||
|
for (auto it : gtwp3.getWaypoints()) { if (f.gtwp.find(it.first) != f.gtwp.end()) {throw 1;} f.gtwp[it.first] = Point3(it.second.x, it.second.y, getHeight(3));}
|
||||||
|
|
||||||
|
for (auto it : gtwp05.getWaypoints()) { if (f.gtwp.find(it.first) != f.gtwp.end()) {throw 1;} f.gtwp[it.first] = Point3(it.second.x, it.second.y, (getHeight(0)+getHeight(1))/2);}
|
||||||
|
for (auto it : gtwp15.getWaypoints()) { if (f.gtwp.find(it.first) != f.gtwp.end()) {throw 1;} f.gtwp[it.first] = Point3(it.second.x, it.second.y, (getHeight(1)+getHeight(2))/2);}
|
||||||
|
for (auto it : gtwp25.getWaypoints()) { if (f.gtwp.find(it.first) != f.gtwp.end()) {throw 1;} f.gtwp[it.first] = Point3(it.second.x, it.second.y, (getHeight(2)+getHeight(3))/2);}
|
||||||
|
|
||||||
|
return f;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T> static void buildTheGrid(Grid<T>& grid, FHWSFloors floors) {
|
||||||
|
|
||||||
|
GridFactory<MyGridNode> gridFac(grid);
|
||||||
|
|
||||||
|
gridFac.addFloor(floors.f0, floors.h0.cm());
|
||||||
|
gridFac.addFloor(floors.f1, floors.h1.cm());
|
||||||
|
gridFac.addFloor(floors.f2, floors.h2.cm());
|
||||||
|
gridFac.addFloor(floors.f3, floors.h3.cm());
|
||||||
|
|
||||||
|
gridFac.addStairs(floors.s01, floors.h0.cm(), floors.h1.cm());
|
||||||
|
gridFac.addStairs(floors.s12, floors.h1.cm(), floors.h2.cm());
|
||||||
|
gridFac.addStairs(floors.s23, floors.h2.cm(), floors.h3.cm());
|
||||||
|
|
||||||
|
PlatformStair psUpperLeft;
|
||||||
|
psUpperLeft.platform = BBox2(Point2(1560, 4778), Point2(1730, 5128));
|
||||||
|
psUpperLeft.s1 = Stair(Line2( 1278,4790+160, 1278,4790+160+140 ), Point2(+280,0));
|
||||||
|
psUpperLeft.s2 = Stair(Line2( 1278,4790+000, 1278,4790+140 ), Point2(+280,0));
|
||||||
|
gridFac.buildPlatformStair(psUpperLeft, floors.h0.cm(), floors.h1.cm());
|
||||||
|
gridFac.buildPlatformStair(psUpperLeft, floors.h1.cm(), floors.h2.cm());
|
||||||
|
gridFac.buildPlatformStair(psUpperLeft, floors.h2.cm(), floors.h3.cm());
|
||||||
|
// vis.gp << "set xrange [1100:1800]\n";
|
||||||
|
// vis.gp << "set yrange [4500:5200]\n";
|
||||||
|
|
||||||
|
PlatformStair psUpperRight;
|
||||||
|
psUpperRight.platform = BBox2(Point2(6290, 4778), Point2(6500, 5098));
|
||||||
|
psUpperRight.s1 = Stair(Line2( 6758,4790+160, 6758,4790+160+140 ), Point2(-280,0));
|
||||||
|
psUpperRight.s2 = Stair(Line2( 6758,4790+000, 6758,4790+140 ), Point2(-280,0));
|
||||||
|
gridFac.buildPlatformStair(psUpperRight, floors.h0.cm(), floors.h1.cm());
|
||||||
|
gridFac.buildPlatformStair(psUpperRight, floors.h1.cm(), floors.h2.cm());
|
||||||
|
gridFac.buildPlatformStair(psUpperRight, floors.h2.cm(), floors.h3.cm());
|
||||||
|
// vis.gp << "set xrange [6100:6900]\n";
|
||||||
|
// vis.gp << "set yrange [4500:5200]\n";
|
||||||
|
|
||||||
|
PlatformStair psLowerLeft;
|
||||||
|
psLowerLeft.platform = BBox2(Point2(1510, 658), Point2(1820, 900));
|
||||||
|
psLowerLeft.s1 = Stair(Line2( 1510+000,1148, 1510+140,1148 ), Point2(0,-280));
|
||||||
|
psLowerLeft.s2 = Stair(Line2( 1510+170,1148, 1510+300,1148 ), Point2(0,-280));
|
||||||
|
gridFac.buildPlatformStair(psLowerLeft, floors.h0.cm(), floors.h1.cm());
|
||||||
|
gridFac.buildPlatformStair(psLowerLeft, floors.h1.cm(), floors.h2.cm());
|
||||||
|
gridFac.buildPlatformStair(psLowerLeft, floors.h2.cm(), floors.h3.cm());
|
||||||
|
// vis.gp << "set xrange [1300:2100]\n";
|
||||||
|
// vis.gp << "set yrange [400:1400]\n";
|
||||||
|
|
||||||
|
// remove all isolated nodes not attached to 300,300,floor0
|
||||||
|
gridFac.removeIsolated( (MyGridNode&)grid.getNodeFor(GridPoint(300,300,floors.h0.cm())) );
|
||||||
|
|
||||||
|
// stamp importance information onto the grid-nodes
|
||||||
|
GridImportance gridImp;
|
||||||
|
gridImp.addImportance(grid, floors.h0.cm());
|
||||||
|
gridImp.addImportance(grid, floors.h1.cm());
|
||||||
|
gridImp.addImportance(grid, floors.h2.cm());
|
||||||
|
gridImp.addImportance(grid, floors.h3.cm());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // HELPER_H
|
||||||
29
code/MyGridNode.h
Normal file
29
code/MyGridNode.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#ifndef MYGRIDNODE_H
|
||||||
|
#define MYGRIDNODE_H
|
||||||
|
|
||||||
|
#include <Indoor/grid/GridNode.h>
|
||||||
|
#include <Indoor/grid/GridPoint.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the nodes we add to our grid
|
||||||
|
*/
|
||||||
|
struct MyGridNode : public GridNode, public GridPoint {
|
||||||
|
|
||||||
|
/** distance to the desired target */
|
||||||
|
float distToTarget = 1.0;
|
||||||
|
|
||||||
|
/** node importance based on surroundings */
|
||||||
|
float imp = 1.0;
|
||||||
|
|
||||||
|
/** used for eval */
|
||||||
|
int cnt = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** needed ctor */
|
||||||
|
MyGridNode(const float x_cm, const float y_cm, const float z_cm) : GridPoint(x_cm, y_cm, z_cm) {;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // MYGRIDNODE_H
|
||||||
138
code/OldGroundTruth.h
Normal file
138
code/OldGroundTruth.h
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
#ifndef OLDGROUNDTRUTH_H
|
||||||
|
#define OLDGROUNDTRUTH_H
|
||||||
|
|
||||||
|
#include <KLib/geo/Point.h>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <KLib/gfx/svg/SVGLoader.h>
|
||||||
|
#include <Indoor/geo/Point2.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: REMOVE
|
||||||
|
*/
|
||||||
|
class OldGroundTruth {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* helper class for SVG floorplans.
|
||||||
|
*
|
||||||
|
* converts between the SVG's scale and real-world scale
|
||||||
|
*/
|
||||||
|
class SVGScaler {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/** the scaling factor to apply to the svg data */
|
||||||
|
double scalingFactor;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
SVGScaler(const double scalingFactor) : scalingFactor(scalingFactor) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** scale (x, y) into (_x, _y) */
|
||||||
|
void scale(const double x, const double y, float& _x, float& _y) const {
|
||||||
|
_x = x * scalingFactor;
|
||||||
|
_y = y * scalingFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** scale the given point into a new output point */
|
||||||
|
Point2 scale(const K::Point p) const {
|
||||||
|
Point2 ret;
|
||||||
|
scale (p.x, p.y, ret.x, ret.y);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** scale the given line into a new output line */
|
||||||
|
Line2 scale(const K::Line l) const {
|
||||||
|
Line2 ret;
|
||||||
|
scale (l.p1.x, l.p1.y, ret.p1.x, ret.p1.y);
|
||||||
|
scale (l.p2.x, l.p2.y, ret.p2.x, ret.p2.y);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/** helper to scale the SVG into real-world-scale */
|
||||||
|
SVGScaler scaler;
|
||||||
|
|
||||||
|
/** all ground-truth waypoints within the floorplan */
|
||||||
|
std::unordered_map<int, Point2> points;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
OldGroundTruth() :scaler(0) {;}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ctor
|
||||||
|
* @param file the svg's filename
|
||||||
|
* @param layerName the name of the layer (within the SVG) to load
|
||||||
|
* @param scalingFactor the scaling to apply to convert between SVG and real-world scale
|
||||||
|
*/
|
||||||
|
OldGroundTruth(const std::string& file, const std::string& layerName, const double scalingFactor) : scaler(scalingFactor) {
|
||||||
|
|
||||||
|
K::SVGFile svg;
|
||||||
|
K::SVGLoader::load(K::File(file), &svg);
|
||||||
|
K::SVGComposite* sc = svg.getLayers();
|
||||||
|
|
||||||
|
K::SVGLayer* layer = sc->getContainedLayerNamed(layerName);
|
||||||
|
if (!layer) {throw "svg has no layer named '" + layerName + "'";}
|
||||||
|
load(layer);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** get all waypoints */
|
||||||
|
const std::unordered_map<int, Point2>& getWaypoints() const {
|
||||||
|
return points;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** recursive loading/parsing of nested SVG elements */
|
||||||
|
void load(K::SVGElement* el) {
|
||||||
|
|
||||||
|
switch (el->getType()) {
|
||||||
|
|
||||||
|
case SVGElementType::COMPOSITE: {
|
||||||
|
for (K::SVGElement* sub : ((K::SVGComposite*)el)->getChilds()) {
|
||||||
|
load(sub);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case SVGElementType::LAYER: {
|
||||||
|
K::SVGLayer* layer = (K::SVGLayer*) el;
|
||||||
|
for (K::SVGElement* sub : layer->getChilds()) {
|
||||||
|
load(sub);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case SVGElementType::TEXT: {
|
||||||
|
const K::SVGText* text = (K::SVGText*) el;
|
||||||
|
if (text->getText().empty()) {break;}
|
||||||
|
const int id = std::stoi(text->getText());
|
||||||
|
points[id] = scaler.scale(K::Point(text->getPosition().x, text->getPosition().y));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case SVGElementType::PATH: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw "should not happen!";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // OLDGROUNDTRUTH_H
|
||||||
7
code/README.txt
Normal file
7
code/README.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
indoor Framework (https://git.frank-ebner.de/kazu/Indoor.git) must be relative to the "Fusion2016" folder:
|
||||||
|
/path/xyz/Fusion2016/code
|
||||||
|
/path/xyz/Indoor
|
||||||
|
|
||||||
|
KLib (https://github.com/k-a-z-u/KLib.git) must be relative to the "Fusion2016" folder:
|
||||||
|
/path/xyz/Fusion2016/code
|
||||||
|
/path/xyz/KLib
|
||||||
27
code/Settings.h
Normal file
27
code/Settings.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef OTHER_SETTINGS_H
|
||||||
|
#define OTHER_SETTINGS_H
|
||||||
|
|
||||||
|
#define USE_STATIC_CIRCULAR_BUFFERING false
|
||||||
|
#define USE_BAROMETER_SMOOTHING_RC_LOWPASS false
|
||||||
|
#define USE_BAROMETER_SMOOTHING_HEAD_TAIL false
|
||||||
|
#define USE_BAROMETRIC_FORMULAR false
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace MiscSettings {
|
||||||
|
|
||||||
|
const std::string floorplan = "/mnt/data/workspaces/Fusion2016/code/plan_new.svg";
|
||||||
|
const std::string floorplanPlot = "/mnt/data/workspaces/Fusion2016/code/plan_plots.svg";
|
||||||
|
|
||||||
|
const int gridSize_cm = 20;
|
||||||
|
|
||||||
|
const int timeSteps = 500;
|
||||||
|
|
||||||
|
const int numParticles = 7500;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // OTHER_SETTINGS_H
|
||||||
|
|
||||||
|
|
||||||
181
code/Vis.h
Normal file
181
code/Vis.h
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
#ifndef VIS_H
|
||||||
|
#define VIS_H
|
||||||
|
|
||||||
|
#include <KLib/misc/gnuplot/Gnuplot.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplot.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementLines.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementPoints.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementColorPoints.h>
|
||||||
|
|
||||||
|
#include <Indoor/geo/Length.h>
|
||||||
|
#include <Indoor/floorplan/Floor.h>
|
||||||
|
#include <Indoor/geo/Angle.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkState.h>
|
||||||
|
|
||||||
|
#include "eval/GroundTruthWay.h"
|
||||||
|
|
||||||
|
|
||||||
|
class Vis {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
K::Gnuplot gp;
|
||||||
|
K::GnuplotSplot splot;
|
||||||
|
K::GnuplotSplotElementLines floors;
|
||||||
|
K::GnuplotSplotElementColorPoints gridNodes;
|
||||||
|
K::GnuplotSplotElementLines gridEdges;
|
||||||
|
K::GnuplotSplotElementPoints particles;
|
||||||
|
K::GnuplotSplotElementLines particleDir;
|
||||||
|
|
||||||
|
K::GnuplotSplotElementLines estPath;
|
||||||
|
K::GnuplotSplotElementLines groundTruth;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Vis() {
|
||||||
|
|
||||||
|
gp << "set hidden3d front\n";
|
||||||
|
//gp << "set view equal xy\n";
|
||||||
|
gp << "set ticslevel 0\n";
|
||||||
|
gp << "set cbrange[0.8:2.0]\n";
|
||||||
|
|
||||||
|
gp << "unset xtics\n";
|
||||||
|
gp << "unset ytics\n";
|
||||||
|
gp << "unset ztics\n";
|
||||||
|
gp << "unset border\n";
|
||||||
|
|
||||||
|
groundTruth.setLineWidth(2);
|
||||||
|
groundTruth.setColorHex("#666666");
|
||||||
|
|
||||||
|
particles.setColorHex("#0000ff");
|
||||||
|
particles.setPointSize(0.3);
|
||||||
|
particleDir.setColorHex("#444444");
|
||||||
|
|
||||||
|
estPath.setLineWidth(2);
|
||||||
|
|
||||||
|
// attach all layers
|
||||||
|
splot.add(&floors);
|
||||||
|
splot.add(&gridNodes);
|
||||||
|
splot.add(&gridEdges);
|
||||||
|
splot.add(&particleDir);
|
||||||
|
splot.add(&particles);
|
||||||
|
splot.add(&groundTruth);
|
||||||
|
splot.add(&estPath);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** add all obstacles of the given floor to the provided height */
|
||||||
|
Vis& addFloor(const Floor& f, const LengthF height) {
|
||||||
|
|
||||||
|
// add each wall
|
||||||
|
for (const Line2& l : f.getObstacles()) {
|
||||||
|
const K::GnuplotPoint3 p1(l.p1.x, l.p1.y, height.cm());
|
||||||
|
const K::GnuplotPoint3 p2(l.p2.x, l.p2.y, height.cm());
|
||||||
|
floors.addSegment(p1, p2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** add the grid to the plot */
|
||||||
|
template <typename T> Vis& addGrid(Grid<T>& grid) {
|
||||||
|
|
||||||
|
std::set<uint64_t> used;
|
||||||
|
|
||||||
|
float max = 0;
|
||||||
|
for (const T& n1 : grid) {
|
||||||
|
if (n1.distToTarget > max) {max = n1.distToTarget;}
|
||||||
|
}
|
||||||
|
gp << "set cbrange[0.0:1.0]\n";
|
||||||
|
//gp << "set cbrange[0.8:1.3]\n";
|
||||||
|
|
||||||
|
for (const T& n1 : grid) {
|
||||||
|
const K::GnuplotPoint3 p1(n1.x_cm, n1.y_cm, n1.z_cm);
|
||||||
|
//const float color = n1.imp;
|
||||||
|
//const float color = n1.distToTarget/max;
|
||||||
|
const float color = 0;
|
||||||
|
gridNodes.add(p1, color);
|
||||||
|
for (const T& n2 : grid.neighbors(n1)) {
|
||||||
|
const uint64_t idx = n1.getIdx() * n2.getIdx();
|
||||||
|
if (used.find(idx) == used.end()) {
|
||||||
|
const K::GnuplotPoint3 p2(n2.x_cm, n2.y_cm, n2.z_cm);
|
||||||
|
gridEdges.addSegment(p1, p2);
|
||||||
|
used.insert(idx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void addGroundTruth(GroundTruthWay& gtw) {
|
||||||
|
groundTruth.clear();
|
||||||
|
for (auto it : gtw.getWay()) {
|
||||||
|
K::GnuplotPoint3 gp(it.value.x, it.value.y, it.value.z);
|
||||||
|
groundTruth.add(gp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void addEstPath(std::vector<Point3>& est) {
|
||||||
|
estPath.clear();;
|
||||||
|
for (const Point3& p : est) {
|
||||||
|
K::GnuplotPoint3 gp(p.x, p.y, p.z);
|
||||||
|
estPath.add(gp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setTimestamp(uint64_t ts) {
|
||||||
|
static uint64_t firstTs = ts;
|
||||||
|
gp << "set label 1 \"" << ((ts-firstTs)/1000.0f) << "\" at screen 0.02,0.98\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void removeGrid() {
|
||||||
|
gridNodes.clear();;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearStates() {
|
||||||
|
particles.clear();
|
||||||
|
particleDir.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void addObject(const int idx, const Point3& p) {
|
||||||
|
gp << "set object " << idx << " polygon ";
|
||||||
|
gp << "from " << p.x << "," << p.y << "," << p.z;
|
||||||
|
gp << " to " << p.x << "," << p.y << "," << p.z + 200;
|
||||||
|
gp << " to " << p.x << "," << p.y << "," << p.z; // close
|
||||||
|
gp << " lw 2 ";
|
||||||
|
gp << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void setEstAndShould(const Point3& est, const Point3& should) {
|
||||||
|
addObject(2,est);
|
||||||
|
addObject(3,should);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T> void addState(const GridWalkState<T>& n) {
|
||||||
|
Point2 dir = Angle::getPointer(n.heading.getRAD());
|
||||||
|
K::GnuplotPoint3 p1(n.node->x_cm, n.node->y_cm, n.node->z_cm);
|
||||||
|
K::GnuplotPoint3 p2 = p1 + K::GnuplotPoint3(dir.x, dir.y, 0) * 85;
|
||||||
|
particles.add(p1);
|
||||||
|
particleDir.addSegment(p1, p2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T> Vis& showStates(std::vector<GridWalkState<T>>& states) {
|
||||||
|
particles.clear();;
|
||||||
|
for (const GridWalkState<T>& n : states) {
|
||||||
|
particles.add(K::GnuplotPoint3(n.node->x_cm, n.node->y_cm, n.node->z_cm));
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** show (plot) the current setup */
|
||||||
|
void show() {
|
||||||
|
gp.draw(splot);
|
||||||
|
gp.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // VIS_H
|
||||||
62
code/eval/DebugShortestPath.h
Normal file
62
code/eval/DebugShortestPath.h
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
#ifndef DEBUGSHORTESTPATH_H
|
||||||
|
#define DEBUGSHORTESTPATH_H
|
||||||
|
|
||||||
|
#include <Indoor/grid/walk/GridWalkShortestPathControl.h>
|
||||||
|
|
||||||
|
#include <KLib/misc/gnuplot/Gnuplot.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplot.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementLines.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementPoints.h>
|
||||||
|
|
||||||
|
#include "../Helper.h"
|
||||||
|
#include "../Vis.h"
|
||||||
|
|
||||||
|
template <typename T> class DebugShortestPath : public GridWalkShortestPathControl<T> {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Vis vis;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
template <typename Access> DebugShortestPath(Grid<T>& grid, const Access& acc, const T& target, Helper::FHWSFloors& floors) : GridWalkShortestPathControl<T>(grid, acc, target) {
|
||||||
|
|
||||||
|
vis.particles.setColorHex("#0000ff");
|
||||||
|
vis.particles.setPointSize(1.5);
|
||||||
|
|
||||||
|
vis.addFloor(floors.f0, floors.h0);
|
||||||
|
vis.addFloor(floors.f1, floors.h1);
|
||||||
|
vis.addFloor(floors.f2, floors.h2);
|
||||||
|
vis.addFloor(floors.f3, floors.h3);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GridWalkState<T> getDestination(Grid<T>& grid, const GridWalkState<T>& start, float distance_m, float headChange_rad) {
|
||||||
|
|
||||||
|
GridWalkState<T> s = GridWalkShortestPathControl<T>::getDestination(grid, start, distance_m, headChange_rad);
|
||||||
|
|
||||||
|
if (this->recalc == 0){
|
||||||
|
vis.estPath.clear();
|
||||||
|
vis.particles.clear();
|
||||||
|
vis.particles.add(K::GnuplotPoint3(this->centerOfMass.x, this->centerOfMass.y, this->centerOfMass.z));
|
||||||
|
for (int i = 0; i < (int)this->path->size()-1; ++i) {
|
||||||
|
const DijkstraNode<T>& dn1 = (*this->path)[i+0];
|
||||||
|
const DijkstraNode<T>& dn2 = (*this->path)[i+1];
|
||||||
|
K::GnuplotPoint3 p1 (dn1.element->x_cm, dn1.element->y_cm, dn1.element->z_cm);
|
||||||
|
K::GnuplotPoint3 p2 (dn2.element->x_cm, dn2.element->y_cm, dn2.element->z_cm);
|
||||||
|
vis.estPath.addSegment(p1, p2);
|
||||||
|
}
|
||||||
|
vis.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return s;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DEBUGSHORTESTPATH_H
|
||||||
73
code/eval/Eval.h
Normal file
73
code/eval/Eval.h
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
#ifndef EVAL_H
|
||||||
|
#define EVAL_H
|
||||||
|
|
||||||
|
#include "EvalBase.h"
|
||||||
|
#include "../DijkstraMapper.h"
|
||||||
|
#include <Indoor/grid/walk/GridWalkRandomHeadingUpdate.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkRandomHeadingUpdateAdv.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkPushForward.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkLightAtTheEndOfTheTunnel.h>
|
||||||
|
#include <KLib/math/filter/particles/resampling/ParticleFilterResamplingSimple.h>
|
||||||
|
#include <KLib/math/filter/particles/estimation/ParticleFilterEstimationWeightedAverage.h>
|
||||||
|
#include <KLib/math/filter/particles/estimation/ParticleFilterEstimationRegionalWeightedAverage.h>
|
||||||
|
#include <KLib/math/filter/particles/estimation/ParticleFilterEstimationOrderedWeightedAverage.h>
|
||||||
|
|
||||||
|
class Eval : public EvalBase {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Eval() {
|
||||||
|
|
||||||
|
|
||||||
|
// pf = new K::ParticleFilter<MyState, MyControl, MyObservation>( MiscSettings::numParticles, std::unique_ptr<MyInitializer>(new MyInitializer(grid, 1120, 150, 3*350, 90)) );
|
||||||
|
|
||||||
|
// MyGridNode& start = (MyGridNode&)grid.getNodeFor(GridPoint(500,300,floors.h0.cm()));
|
||||||
|
// MyGridNode& end = (MyGridNode&)grid.getNodeFor(GridPoint(7000,5000,floors.h3.cm()));
|
||||||
|
|
||||||
|
// //GridWalkRandomHeadingUpdate<MyGridNode>* walk = new GridWalkRandomHeadingUpdate<MyGridNode>();
|
||||||
|
// GridWalkRandomHeadingUpdateAdv<MyGridNode>* walk = new GridWalkRandomHeadingUpdateAdv<MyGridNode>();
|
||||||
|
// //GridWalkPushForward<MyGridNode>* walk = new GridWalkPushForward<MyGridNode>();
|
||||||
|
// //GridWalkLightAtTheEndOfTheTunnel<MyGridNode>* walk = new GridWalkLightAtTheEndOfTheTunnel<MyGridNode>(grid, DijkstraMapper(grid), end);
|
||||||
|
|
||||||
|
// pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
// sr = new SensorReader("./measurements/13/Galaxy/Path2/1433588396094.csv");
|
||||||
|
// srt = new SensorReaderTurn("./measurements/13/Galaxy/Path2/Turns.txt");
|
||||||
|
// srs = new SensorReaderStep("./measurements/13/Galaxy/Path2/Steps2.txt");
|
||||||
|
|
||||||
|
// gtw = getGroundTruthWay(*sr, floors.gtwp, way2);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //wifi also uniform dist 0/1 fuer bereiche die OK sind?
|
||||||
|
// //steps hochzaehlen weil mehr als einer in einer transition??
|
||||||
|
// //increase regional average region
|
||||||
|
|
||||||
|
// void setEval1() {
|
||||||
|
|
||||||
|
|
||||||
|
// runName = "TODO";
|
||||||
|
|
||||||
|
// // the particle filter's evaluation method
|
||||||
|
// std::unique_ptr<MyEvaluation> eval = std::unique_ptr<MyEvaluation>( new MyEvaluation() );
|
||||||
|
// eval.get()->setUsage(true, false, false, true, true);
|
||||||
|
// pf->setEvaluation( std::move(eval) );
|
||||||
|
|
||||||
|
// // resampling step?
|
||||||
|
// pf->setNEffThreshold(1.0);
|
||||||
|
// pf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||||
|
|
||||||
|
// // state estimation step
|
||||||
|
// //pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||||
|
// //pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationRegionalWeightedAverage<MyState>>(new K::ParticleFilterEstimationRegionalWeightedAverage<MyState>()));
|
||||||
|
// pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.33f)));
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // EVAL_H
|
||||||
264
code/eval/Eval1.h
Normal file
264
code/eval/Eval1.h
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
#ifndef EVAL1_H
|
||||||
|
#define EVAL1_H
|
||||||
|
|
||||||
|
#include "EvalBase.h"
|
||||||
|
#include "../DijkstraMapper.h"
|
||||||
|
#include <Indoor/grid/walk/GridWalkRandomHeadingUpdate.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkRandomHeadingUpdateAdv.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkPushForward.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkLightAtTheEndOfTheTunnel.h>
|
||||||
|
|
||||||
|
#include <Indoor/grid/walk/GridWalkSimpleControl.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkPathControl.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkShortestPathControl.h>
|
||||||
|
#include "DebugShortestPath.h"
|
||||||
|
|
||||||
|
#include <KLib/math/filter/particles/resampling/ParticleFilterResamplingSimple.h>
|
||||||
|
#include <KLib/math/filter/particles/resampling/ParticleFilterResamplingPercent.h>
|
||||||
|
|
||||||
|
#include <KLib/math/filter/particles/estimation/ParticleFilterEstimationWeightedAverage.h>
|
||||||
|
#include <KLib/math/filter/particles/estimation/ParticleFilterEstimationRegionalWeightedAverage.h>
|
||||||
|
#include <KLib/math/filter/particles/estimation/ParticleFilterEstimationOrderedWeightedAverage.h>
|
||||||
|
|
||||||
|
class Eval1 : public EvalBase {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Eval1() {
|
||||||
|
|
||||||
|
|
||||||
|
pf = new K::ParticleFilter<MyState, MyControl, MyObservation>( MiscSettings::numParticles, std::unique_ptr<MyInitializer>(new MyInitializer(grid, 1120, 150, 3*350, 90)) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
std::unique_ptr<MyEvaluation> eval = std::unique_ptr<MyEvaluation>( new MyEvaluation() );
|
||||||
|
eval.get()->setUsage(true, true, true, true, true);
|
||||||
|
pf->setEvaluation( std::move(eval) );
|
||||||
|
|
||||||
|
// resampling step?
|
||||||
|
pf->setNEffThreshold(1.0);
|
||||||
|
pf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||||
|
//pf->setResampling( std::unique_ptr<K::ParticleFilterResamplingPercent<MyState>>(new K::ParticleFilterResamplingPercent<MyState>(0.10)) );
|
||||||
|
|
||||||
|
// state estimation step
|
||||||
|
pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||||
|
//pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationRegionalWeightedAverage<MyState>>(new K::ParticleFilterEstimationRegionalWeightedAverage<MyState>()));
|
||||||
|
//pf->setEstimation( std::unique_ptr<K::ParticleFilterEstimationOrderedWeightedAverage<MyState>>(new K::ParticleFilterEstimationOrderedWeightedAverage<MyState>(0.50f)));
|
||||||
|
|
||||||
|
|
||||||
|
// std::vector<int> wp = path2;// std::reverse(wp.begin(), wp.end());
|
||||||
|
|
||||||
|
// MyGridNode& start = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[wp.front()]) );
|
||||||
|
// MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[wp.back()]) );
|
||||||
|
|
||||||
|
// //GridWalkRandomHeadingUpdate<MyGridNode>* walk = new GridWalkRandomHeadingUpdate<MyGridNode>();
|
||||||
|
// //GridWalkRandomHeadingUpdateAdv<MyGridNode>* walk = new GridWalkRandomHeadingUpdateAdv<MyGridNode>();
|
||||||
|
// //GridWalkPushForward<MyGridNode>* walk = new GridWalkPushForward<MyGridNode>();
|
||||||
|
// //GridWalkLightAtTheEndOfTheTunnel<MyGridNode>* walk = new GridWalkLightAtTheEndOfTheTunnel<MyGridNode>(grid, DijkstraMapper(grid), end);
|
||||||
|
// //GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
|
||||||
|
// GridWalkPathControl<MyGridNode>* walk = new GridWalkPathControl<MyGridNode>(grid, DijkstraMapper(grid), end);
|
||||||
|
|
||||||
|
// pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
// // path1
|
||||||
|
//// sr = new SensorReader("./measurements/path1/1/1454345312844.csv"); // forward
|
||||||
|
//// srt = new SensorReaderTurn("./measurements/path1/1/Turns.txt");
|
||||||
|
//// srs = new SensorReaderStep("./measurements/path1/1/Steps2.txt");
|
||||||
|
//// sr = new SensorReader("./measurements/path1/2/1454345421125.csv"); // backward
|
||||||
|
//// srt = new SensorReaderTurn("./measurements/path1/2/Turns.txt");
|
||||||
|
//// srs = new SensorReaderStep("./measurements/path1/2/Steps2.txt");
|
||||||
|
|
||||||
|
// // path2
|
||||||
|
// sr = new SensorReader("./measurements/path2/1/1454345775306.csv"); // forward
|
||||||
|
// srt = new SensorReaderTurn("./measurements/path2/1/Turns.txt");
|
||||||
|
// srs = new SensorReaderStep("./measurements/path2/1/Steps2.txt");
|
||||||
|
// //sr = new SensorReader("./measurements/path2/2/1454346071347.csv"); // backward
|
||||||
|
// //srt = new SensorReaderTurn("./measurements/path2/2/Turns.txt");
|
||||||
|
// //srs = new SensorReaderStep("./measurements/path2/2/Steps2.txt");
|
||||||
|
|
||||||
|
// // path3
|
||||||
|
//// sr = new SensorReader("./measurements/path3/1/1454345546308.csv"); // forward
|
||||||
|
//// srt = new SensorReaderTurn("./measurements/path3/1/Turns.txt");
|
||||||
|
//// srs = new SensorReaderStep("./measurements/path3/1/Steps2.txt");
|
||||||
|
//// sr = new SensorReader("./measurements/path3/2/1454345622819.csv"); // backward
|
||||||
|
//// srt = new SensorReaderTurn("./measurements/path3/2/Turns.txt");
|
||||||
|
//// srs = new SensorReaderStep("./measurements/path3/2/Steps2.txt");
|
||||||
|
|
||||||
|
// // path4
|
||||||
|
//// sr = new SensorReader("./measurements/path4/1454595382218.csv"); // forward
|
||||||
|
//// srt = new SensorReaderTurn("./measurements/path4/Turns.txt");
|
||||||
|
//// srs = new SensorReaderStep("./measurements/path4/Steps2.txt");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// gtw = getGroundTruthWay(*sr, floors.gtwp, wp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void setEvalFails() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* starting with bad barometer readings. takes some time to move upwards
|
||||||
|
* will be fixed by using the path
|
||||||
|
*/
|
||||||
|
void path2_forward_simple() {
|
||||||
|
|
||||||
|
// forward
|
||||||
|
runName = "path2_forward_simple";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.16;
|
||||||
|
sr = new SensorReader("./measurements/path2/1/1454345775306.csv");
|
||||||
|
srt = new SensorReaderTurn("./measurements/path2/1/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path2/1/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path2);
|
||||||
|
|
||||||
|
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void path2_forward_path() {
|
||||||
|
|
||||||
|
// forward
|
||||||
|
runName = "path2_forward_path";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.16;
|
||||||
|
sr = new SensorReader("./measurements/path2/1/1454345775306.csv");
|
||||||
|
srt = new SensorReaderTurn("./measurements/path2/1/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path2/1/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path2);
|
||||||
|
|
||||||
|
MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path2.back()]) );
|
||||||
|
GridWalkPathControl<MyGridNode>* walk = new GridWalkPathControl<MyGridNode>(grid, DijkstraMapper(grid), end);
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: plot grid-nodes for stairs for the paper (also look at z-transitions. some have NO x/y change even though they should have!)
|
||||||
|
|
||||||
|
|
||||||
|
void path3_forward_simple() {
|
||||||
|
|
||||||
|
// forward
|
||||||
|
runName = "path3_forward_simple";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.16;
|
||||||
|
sr = new SensorReader("./measurements/path3/1/1454345546308.csv"); // forward
|
||||||
|
srt = new SensorReaderTurn("./measurements/path3/1/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path3/1/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path3);
|
||||||
|
|
||||||
|
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void path3_forward_path() {
|
||||||
|
|
||||||
|
// looks like the left stairs here are NOT working as expected?!
|
||||||
|
// plot them
|
||||||
|
// look at the probability-draw, maybe there is an issue there
|
||||||
|
|
||||||
|
// forward
|
||||||
|
runName = "path3_forward_path";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.16;
|
||||||
|
sr = new SensorReader("./measurements/path3/1/1454345546308.csv"); // forward
|
||||||
|
srt = new SensorReaderTurn("./measurements/path3/1/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path3/1/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path3);
|
||||||
|
|
||||||
|
MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path3.back()]) );
|
||||||
|
GridWalkPathControl<MyGridNode>* walk = new GridWalkPathControl<MyGridNode>(grid, DijkstraMapper(grid), end);
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void path4_nexus_simple() {
|
||||||
|
|
||||||
|
runName = "path4_nexus_simple";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.16;
|
||||||
|
sr = new SensorReader("./measurements/path4/nexus/1454695040555.csv"); // forward
|
||||||
|
srt = new SensorReaderTurn("./measurements/path4/nexus/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path4/nexus/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path4dbl);
|
||||||
|
|
||||||
|
// remove importance
|
||||||
|
for (auto& n : grid) {n.imp = 1;}
|
||||||
|
|
||||||
|
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void path4_nexus_imp() {
|
||||||
|
|
||||||
|
runName = "path4_nexus_importance";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.05;
|
||||||
|
sr = new SensorReader("./measurements/path4/nexus/1454695040555.csv"); // forward
|
||||||
|
srt = new SensorReaderTurn("./measurements/path4/nexus/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path4/nexus/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path4dbl);
|
||||||
|
|
||||||
|
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void path4_nexus_path() {
|
||||||
|
|
||||||
|
runName = "path4_nexus_path";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.05;
|
||||||
|
sr = new SensorReader("./measurements/path4/nexus/1454695040555.csv"); // forward
|
||||||
|
srt = new SensorReaderTurn("./measurements/path4/nexus/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path4/nexus/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path4dbl);
|
||||||
|
|
||||||
|
MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path4dbl.back()]) );
|
||||||
|
GridWalkPathControl<MyGridNode>* walk = new GridWalkPathControl<MyGridNode>(grid, DijkstraMapper(grid), end);
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void path4_nexus_path_b() {
|
||||||
|
|
||||||
|
runName = "path4_nexus_path";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.05;
|
||||||
|
sr = new SensorReader("./measurements/path4/nexus/1454695040555.csv"); // forward
|
||||||
|
srt = new SensorReaderTurn("./measurements/path4/nexus/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/path4/nexus/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path4dbl);
|
||||||
|
|
||||||
|
MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path4dbl.back()]) );
|
||||||
|
DebugShortestPath<MyGridNode>* walk = new DebugShortestPath<MyGridNode>(grid, DijkstraMapper(grid), end, this->floors);
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void bergwerk_path1_nexus_simple() {
|
||||||
|
|
||||||
|
runName = "bergwerk_path1_nexus_simple";
|
||||||
|
|
||||||
|
BarometerEvaluation::barometerSigma = 0.10;
|
||||||
|
sr = new SensorReader("./measurements/bergwerk/path1/nexus/vor/1454775984079.csv"); // forward
|
||||||
|
srt = new SensorReaderTurn("./measurements/bergwerk/path1/nexus/vor/Turns.txt");
|
||||||
|
srs = new SensorReaderStep("./measurements/bergwerk/path1/nexus/vor/Steps2.txt");
|
||||||
|
gtw = getGroundTruthWay(*sr, floors.gtwp, path1dbl);
|
||||||
|
|
||||||
|
GridWalkSimpleControl<MyGridNode>* walk = new GridWalkSimpleControl<MyGridNode>();
|
||||||
|
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // EVAL1_H
|
||||||
308
code/eval/EvalBase.h
Normal file
308
code/eval/EvalBase.h
Normal file
@@ -0,0 +1,308 @@
|
|||||||
|
#ifndef EVALBASE_H
|
||||||
|
#define EVALBASE_H
|
||||||
|
|
||||||
|
#include "../Settings.h"
|
||||||
|
#include "../Helper.h"
|
||||||
|
#include "../Vis.h"
|
||||||
|
|
||||||
|
#include <KLib/math/filter/particles/ParticleFilter.h>
|
||||||
|
#include <KLib/math/statistics/Statistics.h>
|
||||||
|
|
||||||
|
#include "GroundTruthWay.h"
|
||||||
|
|
||||||
|
#include "../particles/MyState.h"
|
||||||
|
#include "../particles/MyObservation.h"
|
||||||
|
#include "../particles/MyEvaluation.h"
|
||||||
|
#include "../particles/MyTransition.h"
|
||||||
|
#include "../particles/MyInitializer.h"
|
||||||
|
|
||||||
|
#include "../reader/SensorReader.h"
|
||||||
|
#include "../reader/SensorReaderStep.h"
|
||||||
|
#include "../reader/SensorReaderTurn.h"
|
||||||
|
|
||||||
|
#include "../lukas/TurnObservation.h"
|
||||||
|
#include "../lukas/StepObservation.h"
|
||||||
|
|
||||||
|
#include "../toni/BarometerSensorReader.h"
|
||||||
|
|
||||||
|
#include "../frank/WiFiSensorReader.h"
|
||||||
|
#include "../frank/BeaconSensorReader.h"
|
||||||
|
#include "../frank/OrientationSensorReader.h"
|
||||||
|
|
||||||
|
class EvalBase {
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
Grid<MyGridNode> grid;
|
||||||
|
Helper::FHWSFloors floors;
|
||||||
|
Vis vis;
|
||||||
|
|
||||||
|
K::ParticleFilter<MyState, MyControl, MyObservation>* pf;
|
||||||
|
|
||||||
|
SensorReader* sr;
|
||||||
|
SensorReaderTurn* srt;
|
||||||
|
SensorReaderStep* srs;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
std::string runName;
|
||||||
|
|
||||||
|
GroundTruthWay gtw;
|
||||||
|
|
||||||
|
// OLD
|
||||||
|
//std::vector<int> way0 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 1, 0};
|
||||||
|
//std::vector<int> way1 = {29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 13, 14, 15, 16, 17, 18, 19, 2, 1, 0};
|
||||||
|
//std::vector<int> way2 = {29, 28, 27, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 19, 18, 17, 16, 15, 14, 13, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29};
|
||||||
|
|
||||||
|
// NEW
|
||||||
|
std::vector<int> path1 = {29, 28,27,26,255,25,24,23,22,21,20};
|
||||||
|
std::vector<int> path1dbl = {29, 29, 28,27,26,255,25,24,23,22,21,20};
|
||||||
|
std::vector<int> path2 = {19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 23, 7, 6};
|
||||||
|
std::vector<int> path2dbl = {19, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 23, 7, 6};
|
||||||
|
std::vector<int> path3 = {5, 27, 26, 255, 25, 4, 3, 2, 215, 1, 0, 30, 31};
|
||||||
|
std::vector<int> path3dbl = {5, 5, 27, 26, 255, 25, 4, 3, 2, 215, 1, 0, 30, 31};
|
||||||
|
std::vector<int> path4 = {29, 28, 27, 32, 33, 34, 35, 36, 10, 9, 8, 22, 37, 38, 39, 40, 41, 42, 43, 44};
|
||||||
|
std::vector<int> path4dbl = {29, 29, 28, 27, 32, 33, 34, 35, 36, 10, 9, 8, 22, 37, 38, 39, 40, 41, 42, 43, 44}; // duplicate 1st waypoint!
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
EvalBase() : grid(MiscSettings::gridSize_cm), floors(Helper::getFloors()) {
|
||||||
|
|
||||||
|
// build the grid
|
||||||
|
Helper::buildTheGrid(grid, floors);
|
||||||
|
|
||||||
|
// setup the visualisation
|
||||||
|
vis.addFloor(floors.f0, floors.h0);
|
||||||
|
vis.addFloor(floors.f1, floors.h1);
|
||||||
|
vis.addFloor(floors.f2, floors.h2);
|
||||||
|
vis.addFloor(floors.f3, floors.h3);
|
||||||
|
|
||||||
|
vis.floors.setColorHex("#666666");
|
||||||
|
vis.groundTruth.setCustomAttr("dashtype 3");
|
||||||
|
vis.groundTruth.setColorHex("#009900");
|
||||||
|
vis.gp << "unset cbrange\n";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static GridPoint conv(const Point3& p) {
|
||||||
|
return GridPoint(p.x, p.y, p.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
GroundTruthWay getGroundTruthWay(SensorReader& sr, const std::unordered_map<int, Point3>& waypoints, std::vector<int> ids) {
|
||||||
|
|
||||||
|
// construct the ground-truth-path by using all contained waypoint ids
|
||||||
|
std::vector<Point3> path;
|
||||||
|
for (int id : ids) {
|
||||||
|
auto it = waypoints.find(id);
|
||||||
|
if(it == waypoints.end()) {throw "not found";}
|
||||||
|
path.push_back(it->second);
|
||||||
|
}
|
||||||
|
|
||||||
|
// new created the timed path
|
||||||
|
GroundTruthWay gtw;
|
||||||
|
int i = 0;
|
||||||
|
while (sr.hasNext()) {
|
||||||
|
const SensorEntry se = sr.getNext();
|
||||||
|
if (se.data.empty()) {continue;} // why necessary??
|
||||||
|
if (se.idx == 99) {
|
||||||
|
gtw.add(se.ts, path[i]);
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ensure the sensor-data contained usable timestamps for the ground-truth mapping
|
||||||
|
assert(i>0);
|
||||||
|
|
||||||
|
sr.rewind();
|
||||||
|
return gtw;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void run() {
|
||||||
|
|
||||||
|
// sensor numbers
|
||||||
|
const int s_wifi = 8; const int s_beacons = 9; const int s_barometer = 5; const int s_orientation = 6;
|
||||||
|
//const int s_linearAcceleration = 2;
|
||||||
|
|
||||||
|
std::list<TurnObservation> turn_observations;
|
||||||
|
std::list<StepObservation> step_observations;
|
||||||
|
|
||||||
|
//Create an BarometerSensorReader
|
||||||
|
BarometerSensorReader baroSensorReader;
|
||||||
|
|
||||||
|
|
||||||
|
//Read all turn Observations
|
||||||
|
while(srt->hasNext()) {
|
||||||
|
|
||||||
|
SensorEntryTurn set = srt->getNext();
|
||||||
|
TurnObservation to;
|
||||||
|
|
||||||
|
to.ts = set.ts;
|
||||||
|
to.delta_heading = set.delta_heading;
|
||||||
|
to.delta_motion = set.delta_motion;
|
||||||
|
|
||||||
|
turn_observations.push_back(to);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Step Observations
|
||||||
|
while(srs->hasNext()) {
|
||||||
|
|
||||||
|
SensorEntryStep ses = srs->getNext();
|
||||||
|
StepObservation so;
|
||||||
|
|
||||||
|
so.ts = ses.ts;
|
||||||
|
|
||||||
|
step_observations.push_back(so);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// the to-be-evaluated observation
|
||||||
|
MyObservation obs;
|
||||||
|
obs.step = new StepObservation(); obs.step->steps = 0;
|
||||||
|
obs.turn = new TurnObservation(); obs.turn->delta_heading = 0; obs.turn->delta_motion = 0;
|
||||||
|
|
||||||
|
// control data
|
||||||
|
MyControl ctrl;
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<Point3> pathEst;
|
||||||
|
|
||||||
|
uint64_t lastTransitionTS = 0;
|
||||||
|
int64_t start_time = -1;
|
||||||
|
|
||||||
|
K::Statistics<double> stats;
|
||||||
|
int cnt = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// process each single sensor reading
|
||||||
|
while(sr->hasNext()) {
|
||||||
|
|
||||||
|
// get the next sensor reading from the CSV
|
||||||
|
const SensorEntry se = sr->getNext();
|
||||||
|
|
||||||
|
//start_time needed for time calculation of steps and turns
|
||||||
|
obs.latestSensorDataTS = se.ts;
|
||||||
|
if (start_time == -1) {start_time = se.ts;}
|
||||||
|
int64_t current_time = se.ts - start_time;
|
||||||
|
|
||||||
|
switch(se.idx) {
|
||||||
|
|
||||||
|
case s_wifi: {
|
||||||
|
obs.wifi = WiFiSensorReader::readWifi(se);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case s_beacons: {
|
||||||
|
BeaconObservationEntry boe = BeaconSensorReader::getBeacon(se);
|
||||||
|
if (!boe.mac.empty()) {
|
||||||
|
obs.beacons.entries.push_back(boe);
|
||||||
|
} // add the observed beacon
|
||||||
|
obs.beacons.removeOld(obs.latestSensorDataTS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case s_barometer: {
|
||||||
|
obs.barometer = baroSensorReader.readBarometer(se);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// case s_linearAcceleration:{
|
||||||
|
// baroSensorReader.readVerticalAcceleration(se);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
|
||||||
|
case s_orientation: {
|
||||||
|
obs.orientation = OrientationSensorReader::read(se);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// process all occurred turns
|
||||||
|
while (!step_observations.empty() && current_time > step_observations.front().ts) {
|
||||||
|
const StepObservation _so = step_observations.front(); step_observations.pop_front(); (void) _so;
|
||||||
|
obs.step->steps++;
|
||||||
|
ctrl.walked_m = obs.step->steps * 0.71;
|
||||||
|
}
|
||||||
|
|
||||||
|
// process all occurred steps
|
||||||
|
while (!turn_observations.empty() && current_time > turn_observations.front().ts) {
|
||||||
|
const TurnObservation _to = turn_observations.front(); turn_observations.pop_front();
|
||||||
|
obs.turn->delta_heading += _to.delta_heading;
|
||||||
|
obs.turn->delta_motion += _to.delta_motion;
|
||||||
|
ctrl.headingChange_rad = Angle::degToRad(obs.turn->delta_heading);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// time for a transition?
|
||||||
|
if (se.ts - lastTransitionTS > MiscSettings::timeSteps) {
|
||||||
|
|
||||||
|
lastTransitionTS = se.ts;
|
||||||
|
|
||||||
|
// timed updates
|
||||||
|
((MyTransition*)pf->getTransition())->setCurrentTime(lastTransitionTS);
|
||||||
|
|
||||||
|
|
||||||
|
// update the particle filter (transition + eval), estimate a new current position and add it to the estimated path
|
||||||
|
const MyState est = pf->update(&ctrl, obs);
|
||||||
|
const Point3 curEst = est.pCur;
|
||||||
|
|
||||||
|
// error calculation. compare ground-truth to estimation
|
||||||
|
const int offset = 750;
|
||||||
|
const Point3 curGT = gtw.getPosAtTime(se.ts - offset);
|
||||||
|
const Point3 diff = curEst - curGT;
|
||||||
|
|
||||||
|
// skip the first 10 scans due to uniform distribution start
|
||||||
|
if (++cnt > 10) {
|
||||||
|
pathEst.push_back(curEst);
|
||||||
|
const float err = diff.length();
|
||||||
|
stats.add(err);
|
||||||
|
std::cout << stats.asString() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// plot
|
||||||
|
vis.clearStates();
|
||||||
|
for (int i = 0; i < (int) pf->getParticles().size(); i+=15) {
|
||||||
|
const K::Particle<MyState>& p = pf->getParticles()[i];
|
||||||
|
vis.addState(p.state.walkState);
|
||||||
|
}
|
||||||
|
vis.setTimestamp(se.ts);
|
||||||
|
vis.addGroundTruth(gtw);
|
||||||
|
vis.addEstPath(pathEst);
|
||||||
|
vis.setEstAndShould(curEst, curGT);
|
||||||
|
|
||||||
|
if (obs.barometer != nullptr) {
|
||||||
|
vis.gp << "set label 112 'baro: " << obs.barometer->hpa << "' at screen 0.1,0.2\n";
|
||||||
|
}
|
||||||
|
vis.gp << "set label 111 '" <<ctrl.walked_m << ":" << ctrl.headingChange_rad << "' at screen 0.1,0.1\n";
|
||||||
|
|
||||||
|
//vis.gp << "set label 111 '" <<ctrl.walked_m << ":" << obs.orientation.values[0] << "' at screen 0.1,0.1\n";
|
||||||
|
|
||||||
|
Point2 p1(0.1, 0.1);
|
||||||
|
Point2 p2 = p1 + Angle::getPointer(ctrl.headingChange_rad) * 0.05;
|
||||||
|
//Point2 p2 = p1 + Angle::getPointer(obs.orientation.values[0]) * 0.05;
|
||||||
|
vis.gp << "set arrow 999 from screen " << p1.x<<","<<p1.y << " to screen " << p2.x<<","<<p2.y<<"\n";
|
||||||
|
|
||||||
|
vis.show();
|
||||||
|
|
||||||
|
// prevent gnuplot errors
|
||||||
|
usleep(1000*333);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sleep(1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // EVALBASE_H
|
||||||
24
code/eval/GroundTruthWay.h
Normal file
24
code/eval/GroundTruthWay.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#ifndef GROUNDTRUTHWAY_H
|
||||||
|
#define GROUNDTRUTHWAY_H
|
||||||
|
|
||||||
|
#include <Indoor/math/Interpolator.h>
|
||||||
|
#include <Indoor/geo/Point3.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* interpolated ground-trouth based on timed check-points
|
||||||
|
*/
|
||||||
|
class GroundTruthWay : public Interpolator<uint64_t, Point3> {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Point3 getPosAtTime(const uint64_t ts) const {
|
||||||
|
return get(ts);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** get the ground truth way */
|
||||||
|
const std::vector<InterpolatorEntry>& getWay() const {return entries;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // GROUNDTRUTHWAY_H
|
||||||
134
code/eval/PaperPlot.h
Normal file
134
code/eval/PaperPlot.h
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
#ifndef PAPERPLOT_H
|
||||||
|
#define PAPERPLOT_H
|
||||||
|
|
||||||
|
#include <KLib/misc/gnuplot/Gnuplot.h>
|
||||||
|
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplot.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementLines.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementPoints.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotSplotElementColorPoints.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <Indoor/floorplan/Floor.h>
|
||||||
|
#include <Indoor/geo/Length.h>
|
||||||
|
|
||||||
|
class PaperPlot {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
K::Gnuplot gp;
|
||||||
|
K::GnuplotSplot plot;
|
||||||
|
|
||||||
|
K::GnuplotSplotElementLines floors;
|
||||||
|
K::GnuplotSplotElementColorPoints nodes;
|
||||||
|
K::GnuplotSplotElementLines edges;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
PaperPlot() {
|
||||||
|
|
||||||
|
floors.setLineWidth(2);
|
||||||
|
|
||||||
|
plot.add(&edges);
|
||||||
|
plot.add(&nodes);
|
||||||
|
plot.add(&floors);
|
||||||
|
|
||||||
|
nodes.setPointSize(0.7);
|
||||||
|
edges.setColorHex("#555555");
|
||||||
|
|
||||||
|
gp << "set ticslevel 0\n";
|
||||||
|
|
||||||
|
|
||||||
|
//gp << "set zrange [0:0]\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void show() {
|
||||||
|
gp.draw(plot);
|
||||||
|
gp.flush();;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** add all obstacles of the given floor to the provided height */
|
||||||
|
void addFloor(const Floor& f, const LengthF height) {
|
||||||
|
|
||||||
|
// add each wall
|
||||||
|
for (const Line2& l : f.getObstacles()) {
|
||||||
|
const K::GnuplotPoint3 p1(l.p1.x, l.p1.y, height.cm());
|
||||||
|
const K::GnuplotPoint3 p2(l.p2.x, l.p2.y, height.cm());
|
||||||
|
floors.addSegment(p1, p2);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** add the grid to the plot */
|
||||||
|
template <typename T> void addGrid(Grid<T>& grid) {
|
||||||
|
|
||||||
|
// std::set<uint64_t> used;
|
||||||
|
|
||||||
|
// get the min/max value
|
||||||
|
float max = -999999;
|
||||||
|
float min = +999999;
|
||||||
|
for (const T& n1 : grid) {
|
||||||
|
const float val = n1.imp;
|
||||||
|
//const float val = n1.distToTarget;
|
||||||
|
if (val > max) {max = val;}
|
||||||
|
if (val < min) {min = val;}
|
||||||
|
}
|
||||||
|
gp << "set cbrange["<<min<<":"<<max<<"]\n";
|
||||||
|
|
||||||
|
for (const T& n1 : grid) {
|
||||||
|
const K::GnuplotPoint3 p1(n1.x_cm, n1.y_cm, n1.z_cm);
|
||||||
|
const float color = n1.imp;
|
||||||
|
//const float color = n1.distToTarget/max;
|
||||||
|
//const float color = 0;
|
||||||
|
nodes.add(p1, color);
|
||||||
|
// for (const T& n2 : grid.neighbors(n1)) {
|
||||||
|
// const uint64_t idx = n1.getIdx() * n2.getIdx();
|
||||||
|
// if (used.find(idx) == used.end()) {
|
||||||
|
// const K::GnuplotPoint3 p2(n2.x_cm, n2.y_cm, n2.z_cm);
|
||||||
|
// gridEdges.addSegment(p1, p2);
|
||||||
|
// used.insert(idx);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** show all nodes (and edges?) within the given region */
|
||||||
|
template <typename T> void debugGrid(Grid<T>& grid, const BBox3& bbox, const bool addNodes, const bool addEdges) {
|
||||||
|
|
||||||
|
std::set<uint64_t> used;
|
||||||
|
|
||||||
|
for (T& n1 : grid) {
|
||||||
|
if (bbox.contains(n1)) {
|
||||||
|
const K::GnuplotPoint3 p1(n1.x_cm, n1.y_cm, n1.z_cm);
|
||||||
|
if (addNodes) {
|
||||||
|
nodes.add(p1, 0);
|
||||||
|
}
|
||||||
|
if (addEdges) {
|
||||||
|
for (const T& n2 : grid.neighbors(n1)) {
|
||||||
|
if (n1.z_cm == n2.z_cm) {continue;} // speedup
|
||||||
|
if (used.find(n2.getIdx()) == used.end()) {
|
||||||
|
const K::GnuplotPoint3 p2(n2.x_cm, n2.y_cm, n2.z_cm);
|
||||||
|
edges.addSegment(p1, p2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
used.insert(n1.getIdx());
|
||||||
|
// for (const T& n2 : grid.neighbors(n1)) {
|
||||||
|
// const uint64_t idx = n1.getIdx() * n2.getIdx();
|
||||||
|
// if (used.find(idx) == used.end()) {
|
||||||
|
// const K::GnuplotPoint3 p2(n2.x_cm, n2.y_cm, n2.z_cm);
|
||||||
|
// edges.addSegment(p1, p2);
|
||||||
|
// used.insert(idx);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PAPERPLOT_H
|
||||||
141
code/eval/PaperPlot2D.h
Normal file
141
code/eval/PaperPlot2D.h
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
#ifndef PAPERPLOT2D_H
|
||||||
|
#define PAPERPLOT2D_H
|
||||||
|
|
||||||
|
#include <KLib/misc/gnuplot/Gnuplot.h>
|
||||||
|
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotPlot.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotPlotElementLines.h>
|
||||||
|
#include <KLib/misc/gnuplot/GnuplotPlotElementColorPoints.h>
|
||||||
|
|
||||||
|
#include <Indoor/floorplan/Floor.h>
|
||||||
|
#include <Indoor/geo/Length.h>
|
||||||
|
|
||||||
|
class PaperPlot2D {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
struct Size {
|
||||||
|
float w;
|
||||||
|
float h;
|
||||||
|
Size(const float w, const float h) : w(w), h(h) {;}
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
K::Gnuplot gp;
|
||||||
|
K::GnuplotPlot plot;
|
||||||
|
|
||||||
|
K::GnuplotPlotElementLines floors;
|
||||||
|
K::GnuplotPlotElementColorPoints nodes;
|
||||||
|
|
||||||
|
std::string file;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
PaperPlot2D(const std::string& file, Size s) : file(file) {
|
||||||
|
toFile(file, s);
|
||||||
|
setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
PaperPlot2D() {
|
||||||
|
setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
|
||||||
|
floors.setLineWidth(1.5);
|
||||||
|
|
||||||
|
nodes.setPointType(7);
|
||||||
|
|
||||||
|
plot.add(&nodes);
|
||||||
|
plot.add(&floors);
|
||||||
|
|
||||||
|
gp << "unset border\n";
|
||||||
|
gp << "unset colorbox\n";
|
||||||
|
|
||||||
|
gp << "set tics scale 0,0\n"; // HACK! "unset tics\n" segfaults current gnuplot version...
|
||||||
|
gp << "set format x ' '\n";
|
||||||
|
gp << "set format y ' '\n";
|
||||||
|
|
||||||
|
gp << "set size ratio -1\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void toFile(const std::string& file, const Size s) {
|
||||||
|
gp << "set output '" << file << "'\n";
|
||||||
|
gp << "set terminal eps size " << s.w << "," << s.h << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void setRanges(const float x1, const float x2, const float y1, const float y2) {
|
||||||
|
gp << "set xrange [" << x1 << ":" << x2 << "]\n";
|
||||||
|
gp << "set yrange [" << y1 << ":" << y2 << "]\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void show() {
|
||||||
|
gp.draw(plot);
|
||||||
|
if (file.length() != 0) {
|
||||||
|
std::string dataFile = file + ".dat";
|
||||||
|
std::ofstream os(dataFile.c_str());
|
||||||
|
os << gp.getBuffer();
|
||||||
|
os.close();
|
||||||
|
}
|
||||||
|
gp.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** add all obstacles of the given floor to the provided height */
|
||||||
|
void addFloor(const Floor& f) {
|
||||||
|
|
||||||
|
// add each wall
|
||||||
|
for (const Line2& l : f.getObstacles()) {
|
||||||
|
const K::GnuplotPoint2 p1(l.p1.x, l.p1.y);
|
||||||
|
const K::GnuplotPoint2 p2(l.p2.x, l.p2.y);
|
||||||
|
floors.addSegment(p1, p2);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// void removeGrid() {
|
||||||
|
// gp << "unset object\n";
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** add the grid to the plot */
|
||||||
|
template <typename T, typename Colorizer> void addGrid(Grid<T>& grid, const Colorizer col) {
|
||||||
|
|
||||||
|
// get the min/max value
|
||||||
|
float max = -999999;
|
||||||
|
float min = +999999;
|
||||||
|
for (const T& n1 : grid) {
|
||||||
|
const float val = col.get(n1);
|
||||||
|
//const float val = n1.distToTarget;
|
||||||
|
if (val > max) {max = val;}
|
||||||
|
if (val < min) {min = val;}
|
||||||
|
}
|
||||||
|
gp << "set cbrange["<<min<<":"<<max<<"]\n";
|
||||||
|
|
||||||
|
// for (const T& n1 : grid) {
|
||||||
|
// const K::GnuplotPoint2 p1(n1.x_cm, n1.y_cm);
|
||||||
|
// const float color = n1.imp;
|
||||||
|
// //const float color = n1.distToTarget/max;
|
||||||
|
// //const float color = 0;
|
||||||
|
// nodes.add(p1, color);
|
||||||
|
// }
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
|
for (const T& n1 : grid) {
|
||||||
|
if (col.skip(n1)) {continue;}
|
||||||
|
gp << "set object " << (++i) << " rectangle center " << n1.x_cm << "," << n1.y_cm << " size 20,20 fs solid noborder fc palette cb " << col.get(n1) << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PAPERPLOT2D_H
|
||||||
4
code/eval/PaperVisDijkstra.h
Normal file
4
code/eval/PaperVisDijkstra.h
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#ifndef PAPERVISDIJKSTRA_H
|
||||||
|
#define PAPERVISDIJKSTRA_H
|
||||||
|
|
||||||
|
#endif // PAPERVISDIJKSTRA_H
|
||||||
111
code/eval/PaperVisGrid.h
Normal file
111
code/eval/PaperVisGrid.h
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
#ifndef PAPERVISGRID_H
|
||||||
|
#define PAPERVISGRID_H
|
||||||
|
|
||||||
|
#include <Indoor/grid/Grid.h>
|
||||||
|
#include <Indoor/grid/factory/GridFactory.h>
|
||||||
|
#include <Indoor/grid/factory/GridImportance.h>
|
||||||
|
|
||||||
|
#include <Indoor/floorplan/FloorplanFactorySVG.h>
|
||||||
|
|
||||||
|
#include <Indoor/grid/walk/GridWalkLightAtTheEndOfTheTunnel.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <Indoor/nav/dijkstra/Dijkstra.h>
|
||||||
|
#include <Indoor/nav/dijkstra/DijkstraPath.h>
|
||||||
|
|
||||||
|
#include "PaperPlot.h"
|
||||||
|
#include "PaperPlot2D.h"
|
||||||
|
|
||||||
|
#include "../MyGridNode.h"
|
||||||
|
#include "../Settings.h"
|
||||||
|
|
||||||
|
#include "../Helper.h"
|
||||||
|
|
||||||
|
class PaperVisGrid {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
static void showStairs() {
|
||||||
|
|
||||||
|
// the grid
|
||||||
|
Grid<MyGridNode> grid(20);
|
||||||
|
|
||||||
|
// floors
|
||||||
|
Helper::FHWSFloors floors = Helper::getFloors();
|
||||||
|
Helper::buildTheGrid(grid, floors);
|
||||||
|
|
||||||
|
// // load the floorplan
|
||||||
|
// FloorplanFactorySVG fpFac(MiscSettings::floorplan, 2.822222);
|
||||||
|
// Floor f0 = fpFac.getFloor("floor_0");
|
||||||
|
// Floor f0 = fpFac.getFloor("floor_1");
|
||||||
|
// const LengthF h0 = LengthF::cm(0);
|
||||||
|
// const LengthF h1 = LengthF::cm(400);
|
||||||
|
// const LengthF h2 = LengthF::cm(400+340);
|
||||||
|
// const LengthF h3 = LengthF::cm(400+340+340);
|
||||||
|
|
||||||
|
// add the floorplan to the grid
|
||||||
|
|
||||||
|
// GridFactory<MyGridNode> gridFac(grid);
|
||||||
|
|
||||||
|
// gridFac.addFloor(f0, h0.cm());
|
||||||
|
// gridFac.addFloor(f1, h1.cm());
|
||||||
|
// gridFac.addFloor(f2, h2.cm());
|
||||||
|
// gridFac.addFloor(f3, h3.cm());
|
||||||
|
|
||||||
|
// remove all isolated nodes not attached to 300,300,floor0
|
||||||
|
// gridFac.removeIsolated( (MyGridNode&)grid.getNodeFor( GridPoint(300,300,h0.cm()) ) );
|
||||||
|
|
||||||
|
PaperPlot plot;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// stairwell low left
|
||||||
|
{BBox3 bbox;
|
||||||
|
bbox.add(Point3(1300, 650,000));
|
||||||
|
bbox.add(Point3(2000,1300,1400));
|
||||||
|
plot.debugGrid(grid, bbox, true, true);}
|
||||||
|
|
||||||
|
// stairwell upper left
|
||||||
|
{BBox3 bbox;
|
||||||
|
bbox.add(Point3(1200,4758,000));
|
||||||
|
bbox.add(Point3(1800,5158,1400));
|
||||||
|
plot.debugGrid(grid, bbox, true, true);}
|
||||||
|
|
||||||
|
// stairwell upper right
|
||||||
|
{BBox3 bbox;
|
||||||
|
bbox.add(Point3(6240,4718,000));
|
||||||
|
bbox.add(Point3(6830,5158,1400));
|
||||||
|
plot.debugGrid(grid, bbox, true, true);}
|
||||||
|
|
||||||
|
// stair left
|
||||||
|
{BBox3 bbox;
|
||||||
|
bbox.add(Point3(1200,3200,000));
|
||||||
|
bbox.add(Point3(1440,4078,1400));
|
||||||
|
plot.debugGrid(grid, bbox, true, true);}
|
||||||
|
|
||||||
|
// stair center
|
||||||
|
{BBox3 bbox;
|
||||||
|
bbox.add(Point3(4200,4118,100));
|
||||||
|
bbox.add(Point3(6120,4438,1400));
|
||||||
|
plot.debugGrid(grid, bbox, true, true);}
|
||||||
|
|
||||||
|
//stair lower right
|
||||||
|
{BBox3 bbox;
|
||||||
|
bbox.add(Point3(7360,3358,000));
|
||||||
|
bbox.add(Point3(7880,4300,500));
|
||||||
|
plot.debugGrid(grid, bbox, true, true);}
|
||||||
|
|
||||||
|
|
||||||
|
plot.show();
|
||||||
|
|
||||||
|
sleep(1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PAPERVISGRID_H
|
||||||
190
code/eval/PaperVisImportance.h
Normal file
190
code/eval/PaperVisImportance.h
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
#ifndef PAPERVISIMPORTANCE_H
|
||||||
|
#define PAPERVISIMPORTANCE_H
|
||||||
|
|
||||||
|
#include <Indoor/grid/Grid.h>
|
||||||
|
#include <Indoor/grid/factory/GridFactory.h>
|
||||||
|
#include <Indoor/grid/factory/GridImportance.h>
|
||||||
|
|
||||||
|
#include <Indoor/floorplan/FloorplanFactorySVG.h>
|
||||||
|
|
||||||
|
#include <Indoor/grid/walk/GridWalkLightAtTheEndOfTheTunnel.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <Indoor/nav/dijkstra/Dijkstra.h>
|
||||||
|
#include <Indoor/nav/dijkstra/DijkstraPath.h>
|
||||||
|
|
||||||
|
#include "PaperPlot.h"
|
||||||
|
#include "PaperPlot2D.h"
|
||||||
|
|
||||||
|
#include "../MyGridNode.h"
|
||||||
|
#include "../Settings.h"
|
||||||
|
#include "../DijkstraMapper.h"
|
||||||
|
|
||||||
|
PaperPlot2D::Size s1 = PaperPlot2D::Size(2,4);
|
||||||
|
|
||||||
|
class PaperVisImportance {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static float clamp(const float in, const float min, const float max) {
|
||||||
|
if (in < min) {return min;}
|
||||||
|
if (in > max) {return max;}
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
// use node-importance as grid-color
|
||||||
|
struct ColorizerImp {
|
||||||
|
float get(const MyGridNode& n) const {return n.imp;}
|
||||||
|
bool skip(const MyGridNode& n) const {(void) n; return false;}
|
||||||
|
};
|
||||||
|
|
||||||
|
// use node-distance as grid-color
|
||||||
|
struct ColorizerDist {
|
||||||
|
float get(const MyGridNode& n) const {return n.distToTarget;}
|
||||||
|
bool skip(const MyGridNode& n) const {(void) n; return false;}
|
||||||
|
};
|
||||||
|
|
||||||
|
// use num-visited as grid-color
|
||||||
|
struct ColorizeHeat {
|
||||||
|
int maxCnt; int cutoff;
|
||||||
|
ColorizeHeat(const int maxCnt, const int cutoff) : maxCnt(maxCnt), cutoff(cutoff) {;}
|
||||||
|
float get(const MyGridNode& n) const {return (n.cnt > maxCnt) ? (maxCnt) : (n.cnt);}
|
||||||
|
bool skip(const MyGridNode& n) const {return n.cnt < cutoff;} // skip to reduce plot size
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static void createImportance() {
|
||||||
|
|
||||||
|
// load the floorplan
|
||||||
|
FloorplanFactorySVG fpFac(MiscSettings::floorplanPlot, 2.822222);
|
||||||
|
Floor f0 = fpFac.getFloor("test1");
|
||||||
|
const LengthF h0 = LengthF::cm(0);
|
||||||
|
|
||||||
|
// add the floorplan to the grid
|
||||||
|
Grid<MyGridNode> grid(20);
|
||||||
|
GridFactory<MyGridNode> gridFac(grid);
|
||||||
|
|
||||||
|
gridFac.addFloor(f0, h0.cm());
|
||||||
|
|
||||||
|
// remove all isolated nodes not attached to 300,300,floor0
|
||||||
|
gridFac.removeIsolated( (MyGridNode&)grid.getNodeFor( GridPoint(400,400,h0.cm()) ) );
|
||||||
|
|
||||||
|
// stamp importance information onto the grid-nodes
|
||||||
|
GridImportance gridImp;
|
||||||
|
gridImp.addImportance(grid, h0.cm());
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
PaperPlot2D plot("floorplan_importance.eps", s1);
|
||||||
|
plot.setRanges(0,2100, 0,5100);
|
||||||
|
plot.addFloor(f0);
|
||||||
|
plot.addGrid(grid, ColorizerImp());
|
||||||
|
plot.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void createPath() {
|
||||||
|
|
||||||
|
// load the floorplan
|
||||||
|
FloorplanFactorySVG fpFac(MiscSettings::floorplanPlot, 2.822222);
|
||||||
|
Floor f0 = fpFac.getFloor("test1");
|
||||||
|
const LengthF h0 = LengthF::cm(0);
|
||||||
|
|
||||||
|
// add the floorplan to the grid
|
||||||
|
Grid<MyGridNode> grid(20);
|
||||||
|
GridFactory<MyGridNode> gridFac(grid);
|
||||||
|
|
||||||
|
gridFac.addFloor(f0, h0.cm());
|
||||||
|
|
||||||
|
// remove all isolated nodes not attached to 300,300,floor0
|
||||||
|
gridFac.removeIsolated( (MyGridNode&)grid.getNodeFor( GridPoint(300,300,h0.cm()) ) );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// start and end
|
||||||
|
const MyGridNode& gnStart = grid.getNodeFor(GridPoint(1500, 300, 0));
|
||||||
|
const MyGridNode& gnEnd = grid.getNodeFor(GridPoint(900, 4600, 0));
|
||||||
|
|
||||||
|
// build all shortest path to reach th target
|
||||||
|
Dijkstra<MyGridNode> dijkstra;
|
||||||
|
DijkstraMapper accImp(grid);
|
||||||
|
DijkstraMapperNormal accNormal(grid);
|
||||||
|
|
||||||
|
// path without importance
|
||||||
|
dijkstra.build(gnStart, gnStart, accNormal);
|
||||||
|
DijkstraPath<MyGridNode> pathNormal(dijkstra.getNode(gnEnd), dijkstra.getNode(gnStart));
|
||||||
|
|
||||||
|
// stamp importance information onto the grid-nodes
|
||||||
|
GridImportance gridImp;
|
||||||
|
gridImp.addImportance(grid, h0.cm());
|
||||||
|
|
||||||
|
// path WITH importance
|
||||||
|
dijkstra.build(gnStart, gnStart, accImp);
|
||||||
|
DijkstraPath<MyGridNode> pathImp(dijkstra.getNode(gnEnd), dijkstra.getNode(gnStart));
|
||||||
|
|
||||||
|
// build plot
|
||||||
|
K::GnuplotPlotElementLines gpPath1; gpPath1.setLineWidth(2); gpPath1.setColorHex("#444444");
|
||||||
|
K::GnuplotPlotElementLines gpPath2; gpPath2.setLineWidth(2); gpPath2.setColorHex("#000000");
|
||||||
|
|
||||||
|
for (DijkstraNode<MyGridNode>* dn : pathNormal) {
|
||||||
|
gpPath1.add(K::GnuplotPoint2(dn->element->x_cm, dn->element->y_cm));
|
||||||
|
}
|
||||||
|
for (DijkstraNode<MyGridNode>* dn : pathImp) {
|
||||||
|
gpPath2.add(K::GnuplotPoint2(dn->element->x_cm, dn->element->y_cm));
|
||||||
|
}
|
||||||
|
|
||||||
|
// plot the 2 paths
|
||||||
|
{
|
||||||
|
PaperPlot2D plot("floorplan_paths.eps", s1);
|
||||||
|
plot.setRanges(0,2100, 0,5100);
|
||||||
|
plot.addFloor(f0);
|
||||||
|
plot.plot.add(&gpPath1); gpPath1.setCustomAttr("dashtype 3");
|
||||||
|
plot.plot.add(&gpPath2);
|
||||||
|
plot.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
// stamp distance information onto the grid
|
||||||
|
// attach a corresponding weight-information to each user-grid-node
|
||||||
|
for (MyGridNode& node : grid) {
|
||||||
|
const DijkstraNode<MyGridNode>* dn = dijkstra.getNode(node);
|
||||||
|
node.distToTarget = dn->cumWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
// walk
|
||||||
|
GridWalkLightAtTheEndOfTheTunnel<MyGridNode> walk (grid, accImp, gnStart);
|
||||||
|
|
||||||
|
for (int i = 0; i < 30000; ++i) {
|
||||||
|
|
||||||
|
if (i % 250 == 0) {std::cout << i << std::endl;}
|
||||||
|
const MyGridNode& nStart = gnEnd;
|
||||||
|
GridWalkState<MyGridNode> sStart(&nStart, Heading::rnd());
|
||||||
|
//GridWalkState<MyGridNode> sEnd = walk.getDestination(grid, sStart, 135, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// plot the heat-map
|
||||||
|
{
|
||||||
|
PaperPlot2D plot("floorplan_dijkstra_heatmap.eps", s1);
|
||||||
|
plot.setRanges(0,2100, 0,5100);
|
||||||
|
plot.gp << "set palette gray negative\n";
|
||||||
|
plot.addFloor(f0);
|
||||||
|
plot.addGrid(grid, ColorizeHeat(7000, 50));
|
||||||
|
plot.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PAPERVISIMPORTANCE_H
|
||||||
110
code/frank/BeaconEvaluation.h
Executable file
110
code/frank/BeaconEvaluation.h
Executable file
@@ -0,0 +1,110 @@
|
|||||||
|
#ifndef BEACONEVALUATION_H
|
||||||
|
#define BEACONEVALUATION_H
|
||||||
|
|
||||||
|
#include <KLib/math/distribution/Normal.h>
|
||||||
|
#include "BeaconObservation.h"
|
||||||
|
#include "Settings.h"
|
||||||
|
#include "../particles/MyState.h"
|
||||||
|
#include "../particles/MyObservation.h"
|
||||||
|
#include "PositionedBeacon.h"
|
||||||
|
|
||||||
|
class BeaconEvaluation {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Settings settings;
|
||||||
|
//BeaconObservation obs;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
double getProbability(const MyState& state, const MyObservation& observation) const {
|
||||||
|
|
||||||
|
//if (obs.entries.empty()) {return 1.0;}
|
||||||
|
double prob = 1.0;
|
||||||
|
|
||||||
|
// const double tx = -74;
|
||||||
|
const double waf = 8.0;
|
||||||
|
|
||||||
|
// // get the ap the client had the strongest measurement for
|
||||||
|
// const PositionedWifiAP* relAP = settings.getAP(strongest.mac); assert(relAP);
|
||||||
|
// const double distToStrongest_m = state.getDistance2D(relAP->xCM, relAP->yCM) / 100.0;
|
||||||
|
// const double strongestFloorDist = std::abs(relAP->zNr - state.z_nr);
|
||||||
|
// const double mdlStrongestRSSI = distanceToRssi(tx, distToStrongest_m, relAP->pl) - (strongestFloorDist * waf);
|
||||||
|
|
||||||
|
// process each detected beacon
|
||||||
|
for (const BeaconObservationEntry& entry : observation.beacons.entries) {
|
||||||
|
|
||||||
|
// get the AP data from the settings
|
||||||
|
const PositionedBeacon* beacon = settings.getBeacon(entry.mac);
|
||||||
|
if (!beacon) {continue;}
|
||||||
|
|
||||||
|
// distance (in meter) between particle and AP
|
||||||
|
//const double distToBeacon_m = state.getDistance2D(beacon->xCM, beacon->yCM) / 100.0;
|
||||||
|
const double distToBeacon_m = state.pCur.getDistance(*beacon) / 100.0;
|
||||||
|
|
||||||
|
// floor difference?
|
||||||
|
//const double floorDist = std::abs(beacon->zNr - state.getFloorNr());
|
||||||
|
const float floorDist = std::ceil(std::abs(Helper::getFloorNrFloat(beacon->z) - Helper::getFloorNrFloat(state.pCur.z)));
|
||||||
|
|
||||||
|
// estimate the rssi depending on above distance
|
||||||
|
const double mdlRSSI = distanceToRssi(beacon->tx, distToBeacon_m, beacon->pl) - (floorDist * waf);
|
||||||
|
|
||||||
|
// the measured rssi
|
||||||
|
const double realRSSI = entry.rssi;
|
||||||
|
|
||||||
|
// // the measured relative rssi
|
||||||
|
// const double realRelRSSI = strongest.rssi - realRSSI;
|
||||||
|
// const double mdlRelRSSI = mdlStrongestRSSI - mdlRSSI;
|
||||||
|
|
||||||
|
// probability? (sigma grows with measurement's age)
|
||||||
|
const double sigma = 8 + ((observation.latestSensorDataTS - entry.ts) / 1000.0) * 3.0;
|
||||||
|
const double p = K::NormalDistribution::getProbability(mdlRSSI, sigma, realRSSI);
|
||||||
|
//const double p = K::NormalDistribution::getProbability(mdlRelRSSI, sigma, realRelRSSI);
|
||||||
|
|
||||||
|
//prob *= p;
|
||||||
|
prob += std::log(p);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const double lambda = 0.15;
|
||||||
|
const double res = lambda * exp(- lambda * (-prob));
|
||||||
|
return res;
|
||||||
|
//return prob;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// WiFiObservation filter(const WiFiObservation* obs) const {
|
||||||
|
|
||||||
|
// WiFiObservation out;
|
||||||
|
// out.ts = obs->ts;
|
||||||
|
// for (const WiFiObservationEntry& entry : obs->entries) {
|
||||||
|
// // alter the mac
|
||||||
|
// WiFiObservationEntry ne = entry;
|
||||||
|
// ne.mac[ne.mac.length()-1] = '0';
|
||||||
|
// if (settings.getAP(ne.mac)) {out.entries.push_back(ne);}
|
||||||
|
// }
|
||||||
|
// return out;
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** get the strongest AP within all measurements */
|
||||||
|
// WiFiObservationEntry getStrongest(const WiFiObservation* obs) const {
|
||||||
|
// WiFiObservationEntry max = obs->entries.front();
|
||||||
|
// for (const WiFiObservationEntry& entry : obs->entries) {
|
||||||
|
// if (entry.rssi > max.rssi) {max = entry;}
|
||||||
|
// }
|
||||||
|
// return max;
|
||||||
|
// }
|
||||||
|
|
||||||
|
static double rssiToDistance(double txPower, double rssi, double pathLoss) {
|
||||||
|
return pow(10, (txPower - rssi) / (10 * pathLoss));
|
||||||
|
}
|
||||||
|
|
||||||
|
static double distanceToRssi(double txPower, double distance, double pathLoss) {
|
||||||
|
if (distance <= 1) {return txPower;}
|
||||||
|
return (txPower - (10 * pathLoss * log10(distance)));
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BEACONEVALUATION_H
|
||||||
41
code/frank/BeaconObservation.h
Executable file
41
code/frank/BeaconObservation.h
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#ifndef BEACONOBSERVATION_H
|
||||||
|
#define BEACONOBSERVATION_H
|
||||||
|
|
||||||
|
#include "MACAddress.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
/** one observed AP and its signal strength */
|
||||||
|
struct BeaconObservationEntry {
|
||||||
|
|
||||||
|
/** the timestamp this beacon was discovered at */
|
||||||
|
uint64_t ts;
|
||||||
|
|
||||||
|
/** the beacon's mac address */
|
||||||
|
std::string mac;
|
||||||
|
|
||||||
|
/** the beacon's rssi */
|
||||||
|
int rssi;
|
||||||
|
|
||||||
|
BeaconObservationEntry() : ts(0), mac(), rssi(0) {;}
|
||||||
|
BeaconObservationEntry(const uint64_t ts, const std::string& mac, const int rssi) : ts(ts), mac(mac), rssi(rssi) {;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/** all APs observed during one scan */
|
||||||
|
struct BeaconObservation {
|
||||||
|
|
||||||
|
std::vector<BeaconObservationEntry> entries;
|
||||||
|
|
||||||
|
void removeOld(uint64_t latestTS) {
|
||||||
|
auto lambda = [latestTS] (const BeaconObservationEntry& e) {
|
||||||
|
uint64_t age = latestTS - e.ts;
|
||||||
|
return age > 1000*3;
|
||||||
|
};
|
||||||
|
entries.erase(std::remove_if(entries.begin(), entries.end(), lambda), entries.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // BEACONOBSERVATION_H
|
||||||
60
code/frank/BeaconSensorReader.h
Executable file
60
code/frank/BeaconSensorReader.h
Executable file
@@ -0,0 +1,60 @@
|
|||||||
|
#ifndef BEACONSENSORREADER_H
|
||||||
|
#define BEACONSENSORREADER_H
|
||||||
|
|
||||||
|
#include "../reader/SensorReader.h"
|
||||||
|
#include "BeaconObservation.h"
|
||||||
|
#include "Settings.h"
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
class BeaconSensorReader {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// /** get wifi observation data from one CSV entry */
|
||||||
|
// static BeaconObservation* readBeacons(const SensorEntry& se) {
|
||||||
|
|
||||||
|
// std::string tmp = se.data;
|
||||||
|
// BeaconObservation* obs = new BeaconObservation();
|
||||||
|
// obs->ts = se.ts;
|
||||||
|
|
||||||
|
// std::string mac = tmp.substr(0, 17);
|
||||||
|
// tmp = tmp.substr(17);
|
||||||
|
// assert(tmp[0] == ';'); tmp = tmp.substr(1);
|
||||||
|
|
||||||
|
// std::string rssi = tmp;
|
||||||
|
|
||||||
|
// BeaconObservationEntry e(mac, std::stoi(rssi));
|
||||||
|
// obs->entries.push_back(e);
|
||||||
|
|
||||||
|
// /** skip unknown beacons */
|
||||||
|
// if (settings.getBeacon(mac) == nullptr) {return nullptr;}
|
||||||
|
|
||||||
|
// return obs;
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** get wifi observation data from one CSV entry */
|
||||||
|
static BeaconObservationEntry getBeacon(const SensorEntry& se) {
|
||||||
|
|
||||||
|
BeaconObservationEntry boe;
|
||||||
|
std::string tmp = se.data;
|
||||||
|
|
||||||
|
std::string mac = tmp.substr(0, 17);
|
||||||
|
tmp = tmp.substr(17);
|
||||||
|
assert(tmp[0] == ';'); tmp = tmp.substr(1);
|
||||||
|
|
||||||
|
std::string rssi = tmp;
|
||||||
|
|
||||||
|
BeaconObservationEntry e(se.ts, mac, std::stoi(rssi));
|
||||||
|
|
||||||
|
/** skip unknown beacons */
|
||||||
|
if (settings.getBeacon(mac) == nullptr) {return BeaconObservationEntry();}
|
||||||
|
|
||||||
|
return e;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // BEACONSENSORREADER_H
|
||||||
131
code/frank/MACAddress.h
Executable file
131
code/frank/MACAddress.h
Executable file
@@ -0,0 +1,131 @@
|
|||||||
|
#ifndef MACADDRESS_H
|
||||||
|
#define MACADDRESS_H
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* describe a MAC-Address as 64-bit integer
|
||||||
|
* or 8-bit access to all fields
|
||||||
|
*/
|
||||||
|
union MACAddressValue {
|
||||||
|
|
||||||
|
struct {
|
||||||
|
uint8_t h5;
|
||||||
|
uint8_t h4;
|
||||||
|
uint8_t h3;
|
||||||
|
uint8_t h2;
|
||||||
|
uint8_t h1;
|
||||||
|
uint8_t h0;
|
||||||
|
};
|
||||||
|
|
||||||
|
uint64_t mac;
|
||||||
|
|
||||||
|
/** initialize everything with zeros */
|
||||||
|
MACAddressValue() : mac(0) {;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class MACAddress {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/** the address as integer value */
|
||||||
|
MACAddressValue value;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** empty ctor */
|
||||||
|
MACAddress() {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** copy ctor */
|
||||||
|
MACAddress(const MACAddress& o) : value(o.value) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ctor form string (e.g. "xx:xx:xx:xx:xx:xx") */
|
||||||
|
MACAddress(const std::string& str) {
|
||||||
|
|
||||||
|
// sanity check
|
||||||
|
if (str.size() != 17) {throw "invalid hex string length. must be 17";}
|
||||||
|
|
||||||
|
value.mac = 0; // all zeros
|
||||||
|
value.h5 = hexWordToInt(str[ 0], str[ 1]);
|
||||||
|
value.h4 = hexWordToInt(str[ 3], str[ 4]);
|
||||||
|
value.h3 = hexWordToInt(str[ 6], str[ 7]);
|
||||||
|
value.h2 = hexWordToInt(str[ 9], str[10]);
|
||||||
|
value.h1 = hexWordToInt(str[12], str[13]);
|
||||||
|
value.h0 = hexWordToInt(str[15], str[16]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** convert to hex-string ("xx:xx:xx:xx:xx:xx") */
|
||||||
|
std::string asString() {
|
||||||
|
|
||||||
|
std::string str = ":::::::::::::::::";
|
||||||
|
|
||||||
|
intToHexStr(value.h5, &str[ 0]);
|
||||||
|
intToHexStr(value.h4, &str[ 3]);
|
||||||
|
intToHexStr(value.h3, &str[ 6]);
|
||||||
|
intToHexStr(value.h2, &str[ 9]);
|
||||||
|
intToHexStr(value.h1, &str[12]);
|
||||||
|
intToHexStr(value.h0, &str[15]);
|
||||||
|
|
||||||
|
return str;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** get the mac address as a long-int value */
|
||||||
|
uint64_t asLong() const {
|
||||||
|
return value.mac;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** equal? */
|
||||||
|
bool operator == (const MACAddress& o) const {
|
||||||
|
return o.asLong() == asLong();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/** convert the given hex char [0-F] to an integer [0-15] */
|
||||||
|
static uint8_t hexCharToInt(char hex) {
|
||||||
|
|
||||||
|
// to upper case
|
||||||
|
if (hex >= 'a') {hex -= 'a' - 'A';}
|
||||||
|
|
||||||
|
// convert
|
||||||
|
return (hex - '0' < 10) ? (hex - '0') : (hex - 'A' + 10);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** convert the given hex-word to an integer */
|
||||||
|
static uint8_t hexWordToInt(char hi, char lo) {
|
||||||
|
return hexCharToInt(hi) << 4 | hexCharToInt(lo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** conver the given integer [0-15] to a hex char [0-F] */
|
||||||
|
static char intToHexChar(const uint8_t val) {
|
||||||
|
return (val < 10) ? ('0' + val) : ('A' - 10 + val);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** insert two hex chars into the provided string buffer */
|
||||||
|
static void intToHexStr(const uint8_t val, char* dst) {
|
||||||
|
dst[0] = intToHexChar((val >> 4) & 0xF);
|
||||||
|
dst[1] = intToHexChar((val >> 0) & 0xF);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/** hash-method for MAC-Addresses */
|
||||||
|
namespace std {
|
||||||
|
template <> struct hash<MACAddress> {
|
||||||
|
std::size_t operator() (const MACAddress& mac) const {
|
||||||
|
return std::hash<uint64_t>()(mac.asLong());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // MACADDRESS_H
|
||||||
11
code/frank/OrientationObservation.h
Normal file
11
code/frank/OrientationObservation.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#ifndef ORIENTATIONOBSERVATION_H
|
||||||
|
#define ORIENTATIONOBSERVATION_H
|
||||||
|
|
||||||
|
/** android device orientation */
|
||||||
|
struct OrientationObservation {
|
||||||
|
|
||||||
|
float values[3];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ORIENTATIONOBSERVATION_H
|
||||||
42
code/frank/OrientationSensorReader.h
Normal file
42
code/frank/OrientationSensorReader.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#ifndef ORIENTATIONSENSORREADER_H
|
||||||
|
#define ORIENTATIONSENSORREADER_H
|
||||||
|
|
||||||
|
|
||||||
|
#include "../reader/SensorReader.h"
|
||||||
|
#include "OrientationObservation.h"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
class OrientationSensorReader {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** get wifi observation data from one CSV entry */
|
||||||
|
static OrientationObservation read(const SensorEntry& se) {
|
||||||
|
|
||||||
|
std::string tmp = se.data;
|
||||||
|
OrientationObservation obs;
|
||||||
|
|
||||||
|
size_t pos1 = tmp.find(';');
|
||||||
|
size_t pos2 = tmp.find(';', pos1+1);
|
||||||
|
size_t pos3 = tmp.find(';', pos2+1);
|
||||||
|
|
||||||
|
assert(pos1 != std::string::npos);
|
||||||
|
assert(pos2 != std::string::npos);
|
||||||
|
assert(pos3 != std::string::npos);
|
||||||
|
|
||||||
|
const std::string s1 = tmp.substr(0, pos1);
|
||||||
|
const std::string s2 = tmp.substr(pos1+1, pos2-pos1-1);
|
||||||
|
const std::string s3 = tmp.substr(pos2+1, pos3-pos2-1);
|
||||||
|
|
||||||
|
obs.values[0] = std::stof(s1);
|
||||||
|
obs.values[1] = std::stof(s2);
|
||||||
|
obs.values[2] = std::stof(s3);
|
||||||
|
|
||||||
|
return obs;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ORIENTATIONSENSORREADER_H
|
||||||
36
code/frank/Position3D.h
Executable file
36
code/frank/Position3D.h
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#ifndef POSITION3D_H
|
||||||
|
#define POSITION3D_H
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* represents a 3D position (x,y,z)
|
||||||
|
*/
|
||||||
|
struct Position3D {
|
||||||
|
|
||||||
|
/** x-position (in centimeter) */
|
||||||
|
double xCM;
|
||||||
|
|
||||||
|
/** y-position (in centimeter) */
|
||||||
|
double yCM;
|
||||||
|
|
||||||
|
/** floor number */
|
||||||
|
int zNr;
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
Position3D() : xCM(0), yCM(0), zNr(0) {;}
|
||||||
|
|
||||||
|
/** ctor. x,y in centimeter, z = floor-number */
|
||||||
|
Position3D(const double xCM, const double yCM, const int zNr) : xCM(xCM), yCM(yCM), zNr(zNr) {;}
|
||||||
|
|
||||||
|
/** get the distance to the given position (in centimeter) */
|
||||||
|
double getDistanceCM(const Position3D& p) const {
|
||||||
|
const double dx = xCM - p.xCM;
|
||||||
|
const double dy = yCM - p.yCM;
|
||||||
|
const double dz = (zNr - p.zNr) * 300; // 300 = average floor height (centimeter)
|
||||||
|
return std::sqrt(dx*dx + dy*dy + dz*dz);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // POSITION3D_H
|
||||||
30
code/frank/PositionedBeacon.h
Executable file
30
code/frank/PositionedBeacon.h
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#ifndef POSITIONEDBEACON_H
|
||||||
|
#define POSITIONEDBEACON_H
|
||||||
|
|
||||||
|
#include "WiFiAP.h"
|
||||||
|
//#include "Position3D.h"
|
||||||
|
#include <Indoor/geo/Point3.h>
|
||||||
|
|
||||||
|
class PositionedBeacon : public Point3 {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
MACAddress mac;
|
||||||
|
float tx;
|
||||||
|
float pl;
|
||||||
|
|
||||||
|
// /** ctor */
|
||||||
|
// PositionedBeacon(const MACAddress& mac, const double tx, const double pl, const double xM, const double yM, const int zNr) :
|
||||||
|
// mac(mac), tx(tx), pl(pl), Position3D(xM, yM, zNr) {
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
PositionedBeacon(const MACAddress& mac, const float tx, const float pl, const float x_cm, const float y_cm, const float z_cm) :
|
||||||
|
Point3(x_cm, y_cm, z_cm), mac(mac), tx(tx), pl(pl) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // POSITIONEDBEACON_H
|
||||||
26
code/frank/PositionedWiFiAP.h
Executable file
26
code/frank/PositionedWiFiAP.h
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef POSITIONEDWIFIAP_H
|
||||||
|
#define POSITIONEDWIFIAP_H
|
||||||
|
|
||||||
|
#include "WiFiAP.h"
|
||||||
|
//#include "Position3D.h"
|
||||||
|
#include <Indoor/geo/Point3.h>
|
||||||
|
|
||||||
|
class PositionedWifiAP : public WiFiAP, public Point3 {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// /** ctor */
|
||||||
|
// PositionedWifiAP(const MACAddress& mac, const std::string& ssid, const double tx, const double pl, const double xM, const double yM, const int zNr) :
|
||||||
|
// WiFiAP(mac, ssid, tx, pl), Position3D(xM, yM, zNr) {
|
||||||
|
// ;
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
PositionedWifiAP(const MACAddress& mac, const std::string& ssid, const float tx, const float pl, const float x_cm, const float y_cm, const float z_cm) :
|
||||||
|
WiFiAP(mac, ssid, tx, pl), Point3(x_cm, y_cm, z_cm) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // POSITIONEDWIFIAP_H
|
||||||
178
code/frank/Settings.h
Executable file
178
code/frank/Settings.h
Executable file
@@ -0,0 +1,178 @@
|
|||||||
|
#ifndef SETTINGS_H
|
||||||
|
#define SETTINGS_H
|
||||||
|
|
||||||
|
#include "PositionedWiFiAP.h"
|
||||||
|
#include "PositionedBeacon.h"
|
||||||
|
#include "MACAddress.h"
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
#include "../Helper.h"
|
||||||
|
|
||||||
|
class Settings {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::unordered_map<MACAddress, PositionedWifiAP*> aps;
|
||||||
|
std::unordered_map<MACAddress, PositionedBeacon*> beacons;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Settings() {
|
||||||
|
|
||||||
|
const double pl = 2.7; // 2.7
|
||||||
|
const double tx = -46;
|
||||||
|
const float ibPLE = 1.5;
|
||||||
|
|
||||||
|
addAP(("00:04:96:6b:64:99"), "i.3.20", 290, 1300, Helper::getHeight(3), tx, pl);
|
||||||
|
addAP(("00:04:96:6b:70:c9"), "i.3.25", 290, 3930, Helper::getHeight(3), tx, pl);
|
||||||
|
addAP(("00:04:96:6b:82:79"), "i.3.16", 1860, 3400, Helper::getHeight(3), tx, pl);
|
||||||
|
addAP(("00:04:96:77:ed:f9"), "i.3.39", 4700, 4850, Helper::getHeight(3), tx, pl);
|
||||||
|
addAP(("00:04:96:77:ed:69"), "i.3.3", 6460, 3400, Helper::getHeight(3), tx, pl);
|
||||||
|
|
||||||
|
// 2nd floor (vague AP position)
|
||||||
|
addAP(("00:04:96:6c:3a:a9"), "I.2.1", 6750, 3350, Helper::getHeight(2), tx, pl);
|
||||||
|
addAP(("00:04:96:6b:bf:f9"), "I.2.9", 3000, 3350, Helper::getHeight(2), tx, pl);
|
||||||
|
addAP(("00:04:96:77:ec:a9"), "I.2.15", 290, 750, Helper::getHeight(2), tx, pl);
|
||||||
|
addAP(("00:04:96:6b:0c:c9"), "I.2.19", 300, 4000, Helper::getHeight(2), tx, pl);
|
||||||
|
addAP(("00:04:96:6b:db:69"), "I.2.34", 4320, 4780, Helper::getHeight(2), tx, pl);
|
||||||
|
|
||||||
|
// 1st floor (vague AP position)
|
||||||
|
addAP(("00:04:96:6c:cf:19"), "I.1.2", 6150, 3420, Helper::getHeight(1), tx, pl);
|
||||||
|
addAP(("00:04:96:7d:07:79"), "I.1.9", 1800, 3300, Helper::getHeight(1), tx, pl);
|
||||||
|
addAP(("00:04:96:69:48:c9"), "I.1.17", 1500, 300, Helper::getHeight(1), tx, pl);
|
||||||
|
addAP(("00:04:96:77:eb:99"), "I.1.21", 500, 1700, Helper::getHeight(1), tx, pl);
|
||||||
|
addAP(("00:04:96:6b:45:59"), "I.1.30", 800, 4800, Helper::getHeight(1), tx, pl);
|
||||||
|
addAP(("00:04:96:77:ed:89"), "I.1.43", 4600, 4800, Helper::getHeight(1), tx, pl);
|
||||||
|
|
||||||
|
// 0th floor (exact AP position)
|
||||||
|
addAP(("00:04:96:6C:6E:F9"), "I.0.27", 530, 4970, Helper::getHeight(0), tx, pl);
|
||||||
|
addAP(("00:04:96:6C:A5:39"), "I.0.17", 1030, 270, Helper::getHeight(0), tx, pl);
|
||||||
|
addAP(("00:04:96:6C:A4:A9"), "I.0.9", 1660, 2780, Helper::getHeight(0), tx, pl);
|
||||||
|
addAP(("00:04:96:77:EE:69"), "I.0.7", 3560, 3380, Helper::getHeight(0), tx, pl);
|
||||||
|
addAP(("00:04:96:6B:46:09"), "I.0.xx", 6860, 3690, Helper::getHeight(0), tx, pl);
|
||||||
|
addAP(("00:04:96:6C:5E:39"), "I.0.36", 4480, 4800, Helper::getHeight(0), tx, pl); // vague!!
|
||||||
|
|
||||||
|
addBeacon("48:EF:8D:77:66:DF", -81, ibPLE, 6984, 4526, Helper::getHeight(2));
|
||||||
|
addBeacon("6F:5F:39:0C:51:E4", -81, ibPLE, 7829, 3916, 200);
|
||||||
|
addBeacon("49:23:D8:7F:E8:D2", -81, ibPLE, 6946, 4536, Helper::getHeight(1));
|
||||||
|
|
||||||
|
// OLD
|
||||||
|
|
||||||
|
// const double pl = 2.7; // 2.7
|
||||||
|
// const double tx = -46;
|
||||||
|
|
||||||
|
// addAP(("00:04:96:6b:64:99"), "i.3.20", 290, 1300, Helper::getHeight(3), tx, pl-1);
|
||||||
|
// addAP(("00:04:96:6b:70:c9"), "i.3.25", 290, 3930, Helper::getHeight(3), tx, pl);
|
||||||
|
// addAP(("00:04:96:6b:82:79"), "i.3.16", 1860, 3400, Helper::getHeight(3), tx, pl-1);
|
||||||
|
// addAP(("00:04:96:77:ed:f9"), "i.3.39", 4700, 4850, Helper::getHeight(3), tx, pl);
|
||||||
|
// addAP(("00:04:96:77:ed:69"), "i.3.3", 6460, 3400, Helper::getHeight(3), tx, pl);
|
||||||
|
|
||||||
|
// // 2nd floor (vague AP position)
|
||||||
|
// addAP(("00:04:96:6c:3a:a9"), "I.2.1", 6750, 3350, Helper::getHeight(2), tx, pl);
|
||||||
|
// addAP(("00:04:96:6b:bf:f9"), "I.2.9", 3000, 3350, Helper::getHeight(2), tx, pl);
|
||||||
|
// addAP(("00:04:96:77:ec:a9"), "I.2.15", 290, 750, Helper::getHeight(2), tx, pl);
|
||||||
|
// addAP(("00:04:96:6b:0c:c9"), "I.2.19", 300, 4000, Helper::getHeight(2), tx, pl);
|
||||||
|
// addAP(("00:04:96:6b:db:69"), "I.2.34", 4320, 4780, Helper::getHeight(2), tx, pl);
|
||||||
|
|
||||||
|
// // 1st floor (vague AP position)
|
||||||
|
// addAP(("00:04:96:6c:cf:19"), "I.1.2", 6150, 3420, Helper::getHeight(1), tx, pl);
|
||||||
|
// addAP(("00:04:96:7d:07:79"), "I.1.9", 1800, 3300, Helper::getHeight(1), tx, pl);
|
||||||
|
// addAP(("00:04:96:69:48:c9"), "I.1.17", 1500, 300, Helper::getHeight(1), tx, pl);
|
||||||
|
// addAP(("00:04:96:77:eb:99"), "I.1.21", 500, 1700, Helper::getHeight(1), tx, pl);
|
||||||
|
// addAP(("00:04:96:6b:45:59"), "I.1.30", 800, 4800, Helper::getHeight(1), tx, pl);
|
||||||
|
// addAP(("00:04:96:77:ed:89"), "I.1.43", 4600, 4800, Helper::getHeight(1), tx, pl);
|
||||||
|
|
||||||
|
// // 0th floor (exact AP position)
|
||||||
|
// addAP(("00:04:96:6C:6E:F9"), "I.0.27", 530, 4970, Helper::getHeight(0), tx, pl);
|
||||||
|
// addAP(("00:04:96:6C:A5:39"), "I.0.17", 1030, 270, Helper::getHeight(0), tx, pl);
|
||||||
|
// addAP(("00:04:96:6C:A4:A9"), "I.0.9", 1660, 2780, Helper::getHeight(0), tx, pl);
|
||||||
|
// addAP(("00:04:96:77:EE:69"), "I.0.7", 3560, 3380, Helper::getHeight(0), tx, pl);
|
||||||
|
// addAP(("00:04:96:6B:46:09"), "I.0.xx", 6860, 3690, Helper::getHeight(0), tx, pl);
|
||||||
|
// addAP(("00:04:96:6C:5E:39"), "I.0.36", 4480, 4800, Helper::getHeight(0), tx, pl); // vague!!
|
||||||
|
|
||||||
|
|
||||||
|
// const int ibOff = +2;
|
||||||
|
// const float ibPLE = 1.9;
|
||||||
|
// addBeacon("78:A5:04:1F:87:64", -71+ibOff, ibPLE, 1088, 4858, Helper::getHeight(3)); // id:16
|
||||||
|
// addBeacon("78:A5:04:1F:8A:59", -65+4, 2.0, 1088, 4858, Helper::getHeight(2)); // id:18
|
||||||
|
// addBeacon("1C:BA:8C:21:71:70", -71+ibOff, ibPLE, 1088, 4858, Helper::getHeight(1)); // id:11
|
||||||
|
// addBeacon("78:A5:04:1F:88:9F", -71+ibOff, ibPLE, 1088, 4858, Helper::getHeight(0)); // id:20
|
||||||
|
|
||||||
|
// addBeacon("F9:CC:C0:A2:02:17", -77+ibOff, ibPLE, 7068, 4518, Helper::getHeight(2)); // idis switchboard
|
||||||
|
// addBeacon("E5:6F:57:34:94:40", -77+ibOff, ibPLE, 7468, 5108, Helper::getHeight(2)); // idis outside
|
||||||
|
// addBeacon("C6:FC:6E:25:F5:29", -77+ibOff, ibPLE, 6115, 4527, Helper::getHeight(2)); // idis toni
|
||||||
|
|
||||||
|
// addBeacon("78:A5:04:1E:B1:50", -88+ibOff-4, ibPLE, 6108, 4528, Helper::getHeight(1)); // i.1.47
|
||||||
|
// addBeacon("78:A5:04:1F:91:41", -88+ibOff-4, ibPLE, 6508, 4038, Helper::getHeight(1)); // fachschaft
|
||||||
|
// addBeacon("78:A5:04:1F:8E:35", -88+ibOff-4, ibPLE, 6313, 4038, Helper::getHeight(1)); // neben fachschaft
|
||||||
|
|
||||||
|
//// addBeacon("00:07:80:78:F7:B3", -82, ibPLE, 1038, 4018, 3);
|
||||||
|
//// addBeacon("78:A5:04:1F:93:02", -88, ibPLE, 1538, 4038, 3);
|
||||||
|
// addBeacon("78:A5:04:1F:91:08", -88, ibPLE, 1448, 4538, 3);
|
||||||
|
// addBeacon("78:A5:04:1F:93:02", -88, ibPLE, 2028, 4528, 3);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** get the AP behind the given MAC (if any) */
|
||||||
|
const PositionedWifiAP* getAP(const MACAddress& mac) const {
|
||||||
|
auto it = aps.find(mac);
|
||||||
|
if (it == aps.end()) {return nullptr;}
|
||||||
|
return (it->second);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** get the Beacon behind the given MAC (if any) */
|
||||||
|
const PositionedBeacon* getBeacon(const MACAddress& mac) const {
|
||||||
|
auto it = beacons.find(mac);
|
||||||
|
if (it == beacons.end()) {return nullptr;}
|
||||||
|
return (it->second);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/** add a new known AP */
|
||||||
|
void addAP(const std::string& mac, const std::string& room, const double x_cm, const double y_cm, const int floor, const double tx, const double pl) {
|
||||||
|
std::string mac2 = mac;
|
||||||
|
//mac2[mac2.length()-1] = '9';
|
||||||
|
PositionedWifiAP* pap = new PositionedWifiAP(MACAddress(mac2), room, tx, pl, x_cm, y_cm, floor);
|
||||||
|
aps[mac2] = pap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** add a new known Beacon */
|
||||||
|
void addBeacon(const std::string& mac, const double tx, const double pl, const double x_cm, const double y_cm, const int floor) {
|
||||||
|
PositionedBeacon* pap = new PositionedBeacon(MACAddress(mac), tx, pl, x_cm, y_cm, floor);
|
||||||
|
beacons[mac] = pap;
|
||||||
|
}
|
||||||
|
|
||||||
|
// // access points
|
||||||
|
// PositionedWifiAP aps[] = {
|
||||||
|
|
||||||
|
//// // 3rd floor (excat AP position)
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6b:64:90"), "i.3.20", 290, 1300, 3),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6b:70:c0"), "i.3.25", 290, 3930, 3),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6b:82:70"), "i.3.16", 1860, 3400, 3),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:77:ed:f0"), "i.3.39", 4700, 4850, 3),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:77:ed:60"), "i.3.3", 6460, 3400, 3),
|
||||||
|
|
||||||
|
//// // 2nd floor (vague AP position)
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6c:3a:a9"), "I.2.1", 6300, 3600, 2),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6b:bf:89"), "I.2.8", 3300, 3500, 2),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:77:ec:a9"), "I.2.15", 300, 1300, 2),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6b:0c:c9"), "I.2.19", 300, 4000, 2),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6b:db:69"), "I.2.34", 4400, 4800, 2),
|
||||||
|
|
||||||
|
//// // 1st floor (vague AP position)
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6c:cf:19"), "I.1.2", 5700, 3500, 1),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:7d:07:79"), "I.1.9", 1800, 3300, 1),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:69:48:89"), "I.1.17", 1500, 300, 1),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:77:eb:99"), "I.1.21", 500, 1700, 1),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:6b:45:59"), "I.1.30", 800, 4800, 1),
|
||||||
|
//// PositionedWifiAP(MACAddress("00:04:96:77:ed:89"), "I.1.43", 4600, 4800, 1),
|
||||||
|
|
||||||
|
// };
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
extern Settings settings;
|
||||||
|
|
||||||
|
#endif // SETTINGS_H
|
||||||
45
code/frank/WiFiAP.h
Executable file
45
code/frank/WiFiAP.h
Executable file
@@ -0,0 +1,45 @@
|
|||||||
|
#ifndef WIFIAP_H
|
||||||
|
#define WIFIAP_H
|
||||||
|
|
||||||
|
#include "MACAddress.h"
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* represents a WiFi-AccessPoint
|
||||||
|
* an AP is represented by its MAC-Address and
|
||||||
|
* may provide a readably SSID
|
||||||
|
*/
|
||||||
|
class WiFiAP {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** the AP's MAC-Address */
|
||||||
|
const MACAddress mac;
|
||||||
|
|
||||||
|
/** the AP's readable SSID */
|
||||||
|
const std::string ssid;
|
||||||
|
|
||||||
|
/** AP tx-power */
|
||||||
|
const float tx;
|
||||||
|
|
||||||
|
/** path loss for this ap. for testing */
|
||||||
|
const float pl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
WiFiAP(const MACAddress& mac, const std::string& ssid, const double tx, const double pl) : mac(mac), ssid(ssid), tx(tx), pl(pl) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
WiFiAP(const std::string& mac, const std::string& ssid, const double tx, const double pl) : mac(mac), ssid(ssid), tx(tx), pl(pl) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WIFIAP_H
|
||||||
128
code/frank/WiFiEvaluation.h
Executable file
128
code/frank/WiFiEvaluation.h
Executable file
@@ -0,0 +1,128 @@
|
|||||||
|
#ifndef WIFIEVALUATION_H
|
||||||
|
#define WIFIEVALUATION_H
|
||||||
|
|
||||||
|
#include "../particles/MyState.h"
|
||||||
|
#include "WiFiObservation.h"
|
||||||
|
#include "PositionedWiFiAP.h"
|
||||||
|
#include "Settings.h"
|
||||||
|
#include "../particles/MyObservation.h"
|
||||||
|
|
||||||
|
#include <KLib/math/distribution/Normal.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class WiFiEvaluation {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Settings settings;
|
||||||
|
WiFiObservation obs;
|
||||||
|
WiFiObservationEntry strongest;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void nextObservation(const WiFiObservation& _obs) {
|
||||||
|
|
||||||
|
if (_obs.entries.empty()) {return;}
|
||||||
|
|
||||||
|
obs = filter(_obs);
|
||||||
|
strongest = getStrongest(&obs);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
double getProbability(const MyState& state, const MyObservation& observation) const {
|
||||||
|
|
||||||
|
if (obs.entries.empty()) {return 1.0;}
|
||||||
|
double prob = 0;//1.0;
|
||||||
|
|
||||||
|
//const double tx = -48; // tablet
|
||||||
|
//const double pl = 3.15;
|
||||||
|
const float waf = 8;//10.0; // was 7 before?! has something todo with the floor heights / levels
|
||||||
|
|
||||||
|
// get the ap the client had the strongest measurement for
|
||||||
|
//const PositionedWifiAP* relAP = settings.getAP(strongest.mac); assert(relAP);
|
||||||
|
//const double distToStrongest_m = state.getDistance2D(relAP->xCM, relAP->yCM) / 100.0;
|
||||||
|
//const double strongestFloorDist = std::abs(relAP->zNr - state.z_nr);
|
||||||
|
//const double mdlStrongestRSSI = distanceToRssi(relAP->tx, distToStrongest_m, relAP->pl) - (strongestFloorDist * waf);
|
||||||
|
|
||||||
|
// process each detected AP
|
||||||
|
for (const WiFiObservationEntry& entry : obs.entries) {
|
||||||
|
|
||||||
|
// get the AP data from the settings
|
||||||
|
const PositionedWifiAP* ap = settings.getAP(entry.mac); assert(ap);
|
||||||
|
|
||||||
|
// distance (in meter) between particle and AP
|
||||||
|
const float distToAP_m = state.pCur.getDistance(*ap) / 100.0;
|
||||||
|
|
||||||
|
// floor difference?
|
||||||
|
const float floorDiff = std::abs(Helper::getFloorNrFloat(ap->z) - Helper::getFloorNrFloat(state.pCur.z));
|
||||||
|
//const float floorDiff = std::round(std::abs(Helper::getFloorNr(ap->z) - Helper::getFloorNr(state.pCur.z)));
|
||||||
|
|
||||||
|
//const float floorDiff = std::abs(ap->z - state.pCur.z) / 340;
|
||||||
|
|
||||||
|
// estimate the rssi depending on above distance
|
||||||
|
const double mdlRSSI = distanceToRssi(ap->tx, distToAP_m, ap->pl) - (floorDiff * waf);
|
||||||
|
|
||||||
|
// the measured rssi
|
||||||
|
const double realRSSI = entry.rssi;
|
||||||
|
|
||||||
|
// the measured relative rssi
|
||||||
|
//const double realRelRSSI = strongest.rssi - realRSSI;
|
||||||
|
//const double mdlRelRSSI = mdlStrongestRSSI - mdlRSSI;
|
||||||
|
|
||||||
|
// probability? (sigma grows with measurement's age)
|
||||||
|
const double sigma = (8) + ((observation.latestSensorDataTS - entry.ts) / 1000.0) * 3.5;
|
||||||
|
const double p = K::NormalDistribution::getProbability(mdlRSSI, sigma, realRSSI); // absolute
|
||||||
|
//const double p = K::NormalDistribution::getProbability(mdlRelRSSI, sigma, realRelRSSI); // relative
|
||||||
|
|
||||||
|
//prob *= p;
|
||||||
|
prob += std::log(p);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//const double lambda = 0.05;//0.15; //0.12;
|
||||||
|
//return lambda * exp(- lambda * (-prob));
|
||||||
|
return std::pow(std::exp(prob), 0.1);
|
||||||
|
// if (prob < -30) {return 0.01;}
|
||||||
|
// if (prob < -15) {return 0.50;}
|
||||||
|
// else {return 1.00;}
|
||||||
|
|
||||||
|
|
||||||
|
//return prob;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
WiFiObservation filter(const WiFiObservation& obs) const {
|
||||||
|
|
||||||
|
WiFiObservation out;
|
||||||
|
for (const WiFiObservationEntry& entry : obs.entries) {
|
||||||
|
// alter the mac
|
||||||
|
WiFiObservationEntry ne = entry;
|
||||||
|
//ne.mac[ne.mac.length()-1] = '0'; // enabled = VAP grouping. also adjust settings to use ending "0"
|
||||||
|
if (settings.getAP(ne.mac)) {out.entries.push_back(ne);}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** get the strongest AP within all measurements */
|
||||||
|
WiFiObservationEntry getStrongest(const WiFiObservation* obs) const {
|
||||||
|
WiFiObservationEntry max = obs->entries.front();
|
||||||
|
for (const WiFiObservationEntry& entry : obs->entries) {
|
||||||
|
if (entry.rssi > max.rssi) {max = entry;}
|
||||||
|
}
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
static double rssiToDistance(double txPower, double rssi, double pathLoss) {
|
||||||
|
return pow(10, (txPower - rssi) / (10 * pathLoss));
|
||||||
|
}
|
||||||
|
|
||||||
|
static double distanceToRssi(double txPower, double distance, double pathLoss) {
|
||||||
|
if (distance <= 1) {return txPower;}
|
||||||
|
return (txPower - (10 * pathLoss * log10(distance)));
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WIFIEVALUATION_H
|
||||||
4
code/frank/WiFiHelper.h
Executable file
4
code/frank/WiFiHelper.h
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#ifndef WIFIHELPER_H
|
||||||
|
#define WIFIHELPER_H
|
||||||
|
|
||||||
|
#endif // WIFIHELPER_H
|
||||||
23
code/frank/WiFiObservation.h
Executable file
23
code/frank/WiFiObservation.h
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#ifndef WIFIOBSERVATION_H
|
||||||
|
#define WIFIOBSERVATION_H
|
||||||
|
|
||||||
|
#include "MACAddress.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
/** one observed AP and its signal strength */
|
||||||
|
struct WiFiObservationEntry {
|
||||||
|
uint64_t ts;
|
||||||
|
std::string mac;
|
||||||
|
int freq;
|
||||||
|
int rssi;
|
||||||
|
WiFiObservationEntry() {;}
|
||||||
|
WiFiObservationEntry(const uint64_t ts, const std::string& mac, const int freq, const int rssi) : ts(ts), mac(mac), freq(freq), rssi(rssi) {;}
|
||||||
|
};
|
||||||
|
|
||||||
|
/** all APs observed during one scan */
|
||||||
|
struct WiFiObservation {
|
||||||
|
|
||||||
|
std::vector<WiFiObservationEntry> entries;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WIFIOBSERVATION_H
|
||||||
46
code/frank/WiFiSensorReader.h
Executable file
46
code/frank/WiFiSensorReader.h
Executable file
@@ -0,0 +1,46 @@
|
|||||||
|
#ifndef WIFISENSORREADER_H
|
||||||
|
#define WIFISENSORREADER_H
|
||||||
|
|
||||||
|
#include "../reader/SensorReader.h"
|
||||||
|
#include "WiFiObservation.h"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
class WiFiSensorReader {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** get wifi observation data from one CSV entry */
|
||||||
|
static WiFiObservation readWifi(const SensorEntry& se) {
|
||||||
|
|
||||||
|
std::string tmp = se.data;
|
||||||
|
WiFiObservation obs;
|
||||||
|
|
||||||
|
// process all APs
|
||||||
|
while(!tmp.empty()) {
|
||||||
|
|
||||||
|
std::string mac = tmp.substr(0, 17);
|
||||||
|
tmp = tmp.substr(17);
|
||||||
|
assert(tmp[0] == ';'); tmp = tmp.substr(1);
|
||||||
|
|
||||||
|
std::string freq = tmp.substr(0, 4);
|
||||||
|
tmp = tmp.substr(4);
|
||||||
|
assert(tmp[0] == ';'); tmp = tmp.substr(1);
|
||||||
|
|
||||||
|
int pos = tmp.find(';');
|
||||||
|
std::string rssi = tmp.substr(0, pos);
|
||||||
|
tmp = tmp.substr(pos);
|
||||||
|
assert(tmp[0] == ';'); tmp = tmp.substr(1);
|
||||||
|
|
||||||
|
WiFiObservationEntry e(se.ts, mac, std::stoi(freq), std::stoi(rssi));
|
||||||
|
obs.entries.push_back(e);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return obs;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WIFISENSORREADER_H
|
||||||
14
code/lukas/ReadMe.txt
Executable file
14
code/lukas/ReadMe.txt
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
Python Skripte:
|
||||||
|
StepDetector.py TurnDetector.py
|
||||||
|
|
||||||
|
Benötigt wird Python2.7, scipy und numpy, sowie zum plotten matplotlib
|
||||||
|
|
||||||
|
Benötigte Parameter:
|
||||||
|
1. Input-Datei
|
||||||
|
2. Output-Datei
|
||||||
|
|
||||||
|
Beispiel:
|
||||||
|
python StepDetector.py ./FH_Sensor.csv Steps.txt
|
||||||
|
python TurnDetector.py ./FH_Sensor.csv Turns.txt
|
||||||
|
|
||||||
|
Weitere optimale Parameter mit -h aufrufbar
|
||||||
278
code/lukas/StepDetector.py
Executable file
278
code/lukas/StepDetector.py
Executable file
@@ -0,0 +1,278 @@
|
|||||||
|
import numpy as np
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
from scipy.signal import argrelmax
|
||||||
|
import sys
|
||||||
|
import math
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
|
def rotate_data_fhws(data, data_t, rotation, rotation_t):
|
||||||
|
#Invert rotationmatrix
|
||||||
|
np.linalg.inv(rotation)
|
||||||
|
|
||||||
|
#Align rotation time according to data time
|
||||||
|
tmp = []
|
||||||
|
for t in data_t:
|
||||||
|
# Find indices of roation matrix that are earlier
|
||||||
|
#than the current time of the sensor value
|
||||||
|
ind = np.where(rotation_t <= t)[0]
|
||||||
|
|
||||||
|
#Use the last index
|
||||||
|
if len(ind) != 0:
|
||||||
|
tmp.append(ind[-1])
|
||||||
|
else:
|
||||||
|
tmp.append(0)
|
||||||
|
|
||||||
|
#Only use the values of the rotation matrix that are aligned with the sensor data
|
||||||
|
rotation = rotation[tmp]
|
||||||
|
|
||||||
|
# Multiply data with rotationmatrix
|
||||||
|
rot_data = []
|
||||||
|
for i, row in enumerate(data):
|
||||||
|
row = np.append(row, 1)
|
||||||
|
rot_data.append(np.dot(rotation[i], row))
|
||||||
|
|
||||||
|
return np.array(rot_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def rotate_data_lukas(data, rotation):
|
||||||
|
#Invert rotationmatrix
|
||||||
|
np.linalg.inv(rotation)
|
||||||
|
|
||||||
|
rot_data = []
|
||||||
|
for i, row in enumerate(data):
|
||||||
|
row = np.append(row, 1)
|
||||||
|
rot_data.append(np.dot(rotation[i], row))
|
||||||
|
|
||||||
|
return np.array(rot_data)
|
||||||
|
|
||||||
|
def magnitude(x, y, z):
|
||||||
|
ret = [math.sqrt(i) for i in (x**2 + y**2 + z**2)]
|
||||||
|
mean = np.mean(ret)
|
||||||
|
ret -= mean
|
||||||
|
return ret
|
||||||
|
|
||||||
|
def count_steps(time, signal, lt, ht, dead):
|
||||||
|
"""
|
||||||
|
Find steps in the accelerometer signal.
|
||||||
|
After a step was found, a "dead" period exists, where no step can be found again.
|
||||||
|
This is to avoid too many steps
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
time: array_like
|
||||||
|
Timestaps of accelerometer signal
|
||||||
|
Must have same length as signal
|
||||||
|
signal: array_like
|
||||||
|
Accelerometer signal of all three axis.
|
||||||
|
Must have same length as time
|
||||||
|
lt: float
|
||||||
|
Low threshold, which must be exceeded by the accelerometer signal to be counted as step
|
||||||
|
ht: float
|
||||||
|
High treshold, which must not be exceeded by the accelerometer signal to be counted as step
|
||||||
|
dead: float
|
||||||
|
After a step was detected, during the dead time no other step will be found.
|
||||||
|
Given in milliseconds
|
||||||
|
"""
|
||||||
|
|
||||||
|
time_signal = zip(time, signal)
|
||||||
|
dead_time = 0
|
||||||
|
|
||||||
|
steps = []
|
||||||
|
for i in time_signal:
|
||||||
|
if lt < i[1] < ht and i[0] > dead_time:
|
||||||
|
steps.append(i[0])
|
||||||
|
dead_time = i[0] + dead
|
||||||
|
|
||||||
|
return np.array(steps)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def write_steps_to_file(fname, steps):
|
||||||
|
f = open(fname, 'w')
|
||||||
|
|
||||||
|
print steps
|
||||||
|
for s in steps:
|
||||||
|
f.write(str(s) + "\n")
|
||||||
|
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
def plot_steps(time, signal, steps):
|
||||||
|
plt.title("Step detection")
|
||||||
|
plt.xlabel("ms")
|
||||||
|
plt.ylabel("Accelerometer magnitude")
|
||||||
|
plt.plot(time, signal, label="Accelerometer")
|
||||||
|
|
||||||
|
s = []
|
||||||
|
for i,t in enumerate(time):
|
||||||
|
if t in steps:
|
||||||
|
s.append((t, signal[i]))
|
||||||
|
|
||||||
|
s = np.array(s)
|
||||||
|
plt.plot(s[:,0], s[:,1], 'ro', label = "Steps")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
plt.legend(numpoints=1)
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def read_data(fname):
|
||||||
|
time = np.loadtxt(fname,
|
||||||
|
delimiter=";",
|
||||||
|
usecols=[0],
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
f = open(fname, 'r')
|
||||||
|
|
||||||
|
accls = []
|
||||||
|
accls_t = []
|
||||||
|
rotations = []
|
||||||
|
rotations_t = []
|
||||||
|
start = time[0]
|
||||||
|
|
||||||
|
for line in f:
|
||||||
|
line = line.split(";")
|
||||||
|
t = int(line[0]) - start
|
||||||
|
|
||||||
|
#Lin Accel
|
||||||
|
if line[1] == "2":
|
||||||
|
accls_t.append(t)
|
||||||
|
accls.append((line[2], line[3], line[4]))
|
||||||
|
|
||||||
|
#Rotation
|
||||||
|
elif line[1] == "7":
|
||||||
|
rotations_t.append(t)
|
||||||
|
rotations.append((line[2], line[3], line[4], line[5],
|
||||||
|
line[6], line[7], line[8], line[9],
|
||||||
|
line[10], line[11], line[12],line[13],
|
||||||
|
line[14], line[15], line[16], line[17]))
|
||||||
|
|
||||||
|
|
||||||
|
accls = np.array(accls, dtype=float)
|
||||||
|
accls_t = np.array(accls_t, dtype=int)
|
||||||
|
|
||||||
|
rotations = np.array(rotations, dtype=float)
|
||||||
|
rotations = [row.reshape((4,4)) for row in rotations]
|
||||||
|
rotations = np.array(rotations)
|
||||||
|
rotations_t = np.array(rotations_t, dtype=int)
|
||||||
|
|
||||||
|
return accls, accls_t, rotations, rotations_t
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("fname_sensor",
|
||||||
|
help = "Accelerometer file")
|
||||||
|
parser.add_argument("fname_output",
|
||||||
|
help = "Output file, where timestamps of steps will be saved")
|
||||||
|
parser.add_argument("--dead",
|
||||||
|
help = "Time span (in ms) after a detected step in which no additional step will be detected (default=600)",
|
||||||
|
type=int)
|
||||||
|
parser.add_argument("--lt",
|
||||||
|
help = "Low threshold, which must be exceeded by the accelerometer signal to be counted as step (default=1.5)",
|
||||||
|
type=float)
|
||||||
|
parser.add_argument("--ht",
|
||||||
|
help = "High treshold, which must not be exceeded by the accelerometer signal to be counted as step(default=6.5)",
|
||||||
|
type=float)
|
||||||
|
parser.add_argument("--plot",
|
||||||
|
help = "Plot step detection",
|
||||||
|
action="store_true")
|
||||||
|
parser.add_argument("--file_format",
|
||||||
|
help = "Sensor data file format [fhws|lukas] (default: fhws)",
|
||||||
|
type = str)
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
file_format = "fhws"
|
||||||
|
|
||||||
|
if args.file_format:
|
||||||
|
file_format = args.file_format
|
||||||
|
|
||||||
|
#My own data format
|
||||||
|
if file_format == "lukas":
|
||||||
|
|
||||||
|
delimiter = ','
|
||||||
|
time_cols = [40]
|
||||||
|
accel_cols = [6,7,8]
|
||||||
|
|
||||||
|
time = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter=delimiter,
|
||||||
|
usecols=time_cols,
|
||||||
|
skiprows=2,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
accelX, accelY, accelZ = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter=delimiter,
|
||||||
|
usecols=accel_cols,
|
||||||
|
skiprows=2,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
rotation = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter = delimiter,
|
||||||
|
usecols=range(18,34),
|
||||||
|
skiprows=1,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
rotations = rotation.T
|
||||||
|
rotations = [row.reshape((4,4)) for row in rotations]
|
||||||
|
accl = np.array([accelX, accelY, accelZ]).T
|
||||||
|
world_accl = rotate_data_lukas(accl, rotations)
|
||||||
|
|
||||||
|
#FHWS file format
|
||||||
|
else:
|
||||||
|
accls, time, rotation, rotation_t = read_data(args.fname_sensor)
|
||||||
|
world_accl = rotate_data_fhws(accls, time, rotation, rotation_t)
|
||||||
|
|
||||||
|
accelX = world_accl[:,0]
|
||||||
|
accelY = world_accl[:,1]
|
||||||
|
accelZ = world_accl[:,2]
|
||||||
|
|
||||||
|
accel_mag = magnitude(accelX, accelY, accelZ)
|
||||||
|
|
||||||
|
lt = 1.5
|
||||||
|
ht = 6.5
|
||||||
|
dead = 600
|
||||||
|
|
||||||
|
if args.dead:
|
||||||
|
dead = args.dead
|
||||||
|
if args.lt:
|
||||||
|
lt = args.lt
|
||||||
|
if args.ht:
|
||||||
|
ht = args.ht
|
||||||
|
|
||||||
|
steps = count_steps(time, accel_mag, lt, ht, dead)
|
||||||
|
print("#Steps detected: ", len(steps))
|
||||||
|
write_steps_to_file(args.fname_output, steps)
|
||||||
|
|
||||||
|
if args.plot:
|
||||||
|
plot_steps(time, accel_mag, steps)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
55
code/lukas/StepEvaluation.h
Executable file
55
code/lukas/StepEvaluation.h
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
#ifndef STEPEVALUATION_H
|
||||||
|
#define STEPEVALUATION_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "../particles/MyState.h"
|
||||||
|
#include "StepObservation.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
static constexpr double mu_walk = 90;
|
||||||
|
static constexpr double sigma_walk = 30;
|
||||||
|
static constexpr double mu_stop = 0;
|
||||||
|
static constexpr double sigma_stop = 5;
|
||||||
|
|
||||||
|
class StepEvaluation {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
double getProbability(const MyState& state, const StepObservation* obs) const {
|
||||||
|
|
||||||
|
(void) state;
|
||||||
|
(void) obs;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// see: particle-filter-control-data
|
||||||
|
// const float mdlWalked_m = state.walkState.distanceWalked_m;
|
||||||
|
|
||||||
|
// ((MyState&)state).walkState.distanceWalked_m = 0;
|
||||||
|
|
||||||
|
// const float stepSize_m = 0.71;
|
||||||
|
// const float sensSigma_m = 0.05 + (0.05 * obs->steps);
|
||||||
|
// const float sensWalked_m = obs->steps * stepSize_m;
|
||||||
|
|
||||||
|
// if (obs->steps > 1) {
|
||||||
|
// int i = 0;
|
||||||
|
// int j = i+1; ++j;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const double prob = K::NormalDistribution::getProbability(sensWalked_m, sensSigma_m, mdlWalked_m);
|
||||||
|
|
||||||
|
// if (prob != prob) {
|
||||||
|
// throw 1;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return prob;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // STEPEVALUATION_H
|
||||||
17
code/lukas/StepObservation.h
Executable file
17
code/lukas/StepObservation.h
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#ifndef STEPOBSERVATION_H
|
||||||
|
#define STEPOBSERVATION_H
|
||||||
|
|
||||||
|
struct StepObservation {
|
||||||
|
|
||||||
|
float ts;
|
||||||
|
|
||||||
|
int steps = 0;
|
||||||
|
|
||||||
|
StepObservation() {;}
|
||||||
|
|
||||||
|
StepObservation(const float ts) : ts(ts), steps(0) {;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // STEPOBSERVATION_H
|
||||||
25
code/lukas/StepReader.h
Executable file
25
code/lukas/StepReader.h
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#ifndef STEPREADER_H
|
||||||
|
#define STEPREADER_H
|
||||||
|
|
||||||
|
#endif // STEPREADER_H
|
||||||
|
|
||||||
|
#include "../SensorReaderStep.h"
|
||||||
|
|
||||||
|
class StepReader {
|
||||||
|
public:
|
||||||
|
static StepObservation* readStep(const SensorEntryStep& se) {
|
||||||
|
|
||||||
|
std::string tmp = se.data;
|
||||||
|
StepObservation* obs = new TurnObservation();
|
||||||
|
|
||||||
|
while(!tmp.empty()) {
|
||||||
|
std::string angle = tmp;
|
||||||
|
|
||||||
|
StepObservation t(std::stof(angle));
|
||||||
|
}
|
||||||
|
|
||||||
|
return obs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
445
code/lukas/TurnDetector.py
Executable file
445
code/lukas/TurnDetector.py
Executable file
@@ -0,0 +1,445 @@
|
|||||||
|
import numpy as np
|
||||||
|
import sys
|
||||||
|
import scipy.integrate
|
||||||
|
import math
|
||||||
|
import argparse
|
||||||
|
from sklearn.decomposition import PCA
|
||||||
|
import scipy.signal as signal
|
||||||
|
|
||||||
|
|
||||||
|
def project(v1, v2):
|
||||||
|
"""
|
||||||
|
Project vector v1 on v2
|
||||||
|
Return projected vector
|
||||||
|
"""
|
||||||
|
|
||||||
|
p = [np.dot(a, g) / np.dot(g,g) for a,g in zip(v1, v2)]
|
||||||
|
p = np.array(p)
|
||||||
|
|
||||||
|
p = [p*g for p,g in zip(p, v2)]
|
||||||
|
p = np.array(p)
|
||||||
|
|
||||||
|
return p
|
||||||
|
|
||||||
|
|
||||||
|
def motion_axis(time, lin_accel, gravity, interval = 500):
|
||||||
|
"""
|
||||||
|
Returns the motion axis, which is the axis with the biggest variance
|
||||||
|
lin_accel -- Linear acceleration
|
||||||
|
gravity -- Gravity
|
||||||
|
|
||||||
|
Lin_accel and gravity should have equal length
|
||||||
|
"""
|
||||||
|
|
||||||
|
p = project(lin_accel, gravity)
|
||||||
|
|
||||||
|
#add time to vector p
|
||||||
|
p = np.array([time, p[:,0], p[:,1], p[:,2]]).T
|
||||||
|
|
||||||
|
start = 0
|
||||||
|
end = start + interval
|
||||||
|
end_time = p[:,0][-1] #last timestep
|
||||||
|
|
||||||
|
pca = PCA(n_components=1)
|
||||||
|
|
||||||
|
result = []
|
||||||
|
while start < end_time:
|
||||||
|
indices = np.where((p[:,0] >= start) & (p[:,0] < end))
|
||||||
|
Z = p[indices, 1:3][0]
|
||||||
|
Z[:,0] = signal.medfilt(Z[:,0],31)
|
||||||
|
Z[:,1] = signal.medfilt(Z[:,1],31)
|
||||||
|
|
||||||
|
pca.fit(Z)
|
||||||
|
|
||||||
|
x1 = pca.components_[0][0]
|
||||||
|
y1 = pca.components_[0][1]
|
||||||
|
|
||||||
|
result.append((end, x1, y1))
|
||||||
|
|
||||||
|
start += interval
|
||||||
|
end += interval
|
||||||
|
|
||||||
|
return np.array(result)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def angle_between(v1, v2):
|
||||||
|
|
||||||
|
l_a = np.linalg.norm(v1)
|
||||||
|
l_b = np.linalg.norm(v2)
|
||||||
|
cos_ab = np.dot(v1, v2 / (l_a * l_b))
|
||||||
|
angle = np.arccos(cos_ab) * 180/math.pi
|
||||||
|
|
||||||
|
return min([180 - angle, angle])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def rotate_data_fhws(data, data_t, rotation, rotation_t):
|
||||||
|
#Invert rotationmatrix
|
||||||
|
np.linalg.inv(rotation)
|
||||||
|
|
||||||
|
#Align rotation time according to data time
|
||||||
|
tmp = []
|
||||||
|
for t in data_t:
|
||||||
|
# Find indices of roation matrix that are earlier
|
||||||
|
#than the current time of the sensor value
|
||||||
|
ind = np.where(rotation_t <= t)[0]
|
||||||
|
|
||||||
|
#Use the last index
|
||||||
|
if len(ind) != 0:
|
||||||
|
tmp.append(ind[-1])
|
||||||
|
else:
|
||||||
|
tmp.append(0)
|
||||||
|
|
||||||
|
#Only use the values of the rotation matrix that are aligned with the sensor data
|
||||||
|
rotation = rotation[tmp]
|
||||||
|
|
||||||
|
# Multiply data with rotation matrix
|
||||||
|
rot_data = []
|
||||||
|
for i, row in enumerate(data):
|
||||||
|
row = np.append(row, 1)
|
||||||
|
rot_data.append(np.dot(rotation[i], row))
|
||||||
|
|
||||||
|
return np.array(rot_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def rotate_data_lukas(data, rotation):
|
||||||
|
#Invert rotationmatrix
|
||||||
|
np.linalg.inv(rotation)
|
||||||
|
|
||||||
|
rot_data = []
|
||||||
|
for i, row in enumerate(data):
|
||||||
|
row = np.append(row, 1)
|
||||||
|
rot_data.append(np.dot(rotation[i], row))
|
||||||
|
|
||||||
|
return np.array(rot_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def read_data(fname):
|
||||||
|
"""
|
||||||
|
Read the data out of the file provided by FHWS sensor reader app
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
time = np.loadtxt(fname,
|
||||||
|
delimiter=";",
|
||||||
|
usecols=[0],
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
|
||||||
|
f = open(fname, 'r')
|
||||||
|
|
||||||
|
lin_accel = []
|
||||||
|
gyros = []
|
||||||
|
rotations = []
|
||||||
|
gravity = []
|
||||||
|
start = time[0]
|
||||||
|
time = []
|
||||||
|
|
||||||
|
gyro_tmp = [0, 0, 0]
|
||||||
|
lin_accel_tmp = [0, 0, 0]
|
||||||
|
gravity_tmp = [0, 0, 9.81]
|
||||||
|
rotations_tmp = 16*[-1]
|
||||||
|
|
||||||
|
s = 0
|
||||||
|
for line in f:
|
||||||
|
line = line.split(";")
|
||||||
|
t = int(line[0]) - start
|
||||||
|
|
||||||
|
|
||||||
|
#Gyro-Data
|
||||||
|
if line[1] == "3":
|
||||||
|
gyro_tmp[0] = line[2]
|
||||||
|
gyro_tmp[1] = line[3]
|
||||||
|
gyro_tmp[2] = line[4]
|
||||||
|
|
||||||
|
|
||||||
|
#Linear Acceleration-Data
|
||||||
|
elif line[1] == "2":
|
||||||
|
lin_accel_tmp[0] = line[2]
|
||||||
|
lin_accel_tmp[1] = line[3]
|
||||||
|
lin_accel_tmp[2] = line[4]
|
||||||
|
|
||||||
|
|
||||||
|
#Gravity data
|
||||||
|
elif line[1] == "1":
|
||||||
|
gravity_tmp[0] = line[2]
|
||||||
|
gravity_tmp[1] = line[3]
|
||||||
|
gravity_tmp[2] = line[4]
|
||||||
|
|
||||||
|
|
||||||
|
#Rotation-Data
|
||||||
|
elif line[1] == "7":
|
||||||
|
for i in range(0,16):
|
||||||
|
rotations_tmp[i] = line[i+2]
|
||||||
|
|
||||||
|
|
||||||
|
if s != t:
|
||||||
|
gyros.append(gyro_tmp[:])
|
||||||
|
lin_accel.append(lin_accel_tmp[:])
|
||||||
|
gravity.append(gravity_tmp[:])
|
||||||
|
rotations.append(rotations_tmp[:])
|
||||||
|
time.append(t)
|
||||||
|
s = t
|
||||||
|
|
||||||
|
|
||||||
|
gyros = np.array(gyros, dtype=float)
|
||||||
|
lin_accel = np.array(lin_accel, dtype=float)
|
||||||
|
gravity = np.array(gravity, dtype=float)
|
||||||
|
rotations = np.array(rotations, dtype=float)
|
||||||
|
time = np.array(time, dtype = int)
|
||||||
|
|
||||||
|
#HACK
|
||||||
|
#In the first timestamps the rotation matrix is all zero, because
|
||||||
|
#no measurements are available yet.
|
||||||
|
#Avoid this by replacing these lines with the first measured
|
||||||
|
#rotation matrix
|
||||||
|
ind = np.where(rotations[:,0] == -1)[0]
|
||||||
|
if len(ind) != 0:
|
||||||
|
index = ind[-1] + 1
|
||||||
|
rotations[ind] = rotations[index]
|
||||||
|
|
||||||
|
#Reshape matrix
|
||||||
|
rotations = [row.reshape((4,4)) for row in rotations]
|
||||||
|
rotations = np.array(rotations)
|
||||||
|
|
||||||
|
|
||||||
|
return time, gyros, lin_accel, gravity, rotations
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def detect_turns(time, signal, interval):
|
||||||
|
|
||||||
|
n_intervals = int(time[-1] / interval) + 1
|
||||||
|
result = []
|
||||||
|
|
||||||
|
for i in range(n_intervals):
|
||||||
|
start = i * interval
|
||||||
|
end = start + interval
|
||||||
|
|
||||||
|
tmp = integrate(start, end, zip(time, signal)) * 180.0/math.pi
|
||||||
|
result.append((end, tmp))
|
||||||
|
|
||||||
|
return np.array(result)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def integrate(time_from, time_to, signal):
|
||||||
|
"""Integrate signal from time_from to time_to. Signal should be two dimensional.
|
||||||
|
First dimension is the timestamp, second dimension is the signal value.
|
||||||
|
dt is the interval between two recordings
|
||||||
|
"""
|
||||||
|
sum = 0
|
||||||
|
last_time = 0
|
||||||
|
|
||||||
|
#go through signal
|
||||||
|
for value in signal:
|
||||||
|
#check if time is in the given timespan
|
||||||
|
if time_from <= value[0] < time_to:
|
||||||
|
#multiply value with dt and add it to the sum = integral
|
||||||
|
# sum += value[1] * dt
|
||||||
|
sum += value[1] * ((value[0] - last_time)/1000.)
|
||||||
|
last_time = value[0]
|
||||||
|
|
||||||
|
#sum is the integral over rad/s
|
||||||
|
return sum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def write_to_file(fname, turns, motion):
|
||||||
|
f = open(fname, 'w')
|
||||||
|
|
||||||
|
for index, t in enumerate(turns):
|
||||||
|
f.write(str(t[0]) + "," + str(t[1]) + "," + str(motion[index][1]) + "\n")
|
||||||
|
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def deg_to_rad(deg):
|
||||||
|
return deg * math.pi / 180.0
|
||||||
|
|
||||||
|
|
||||||
|
def rad_to_deg(rad):
|
||||||
|
return rad * 180.0 / math.pi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
parser.add_argument("fname_sensor",
|
||||||
|
help = "Gyroscope file")
|
||||||
|
|
||||||
|
parser.add_argument("fname_output",
|
||||||
|
help = "Output file, where timestamps and angle of heading will be saved")
|
||||||
|
|
||||||
|
parser.add_argument("--time",
|
||||||
|
help = "Time interval, over which gyroscope will be integrated (default=500ms)",
|
||||||
|
type=int)
|
||||||
|
|
||||||
|
parser.add_argument("--rad",
|
||||||
|
help = "Output angles in rad (default in degree)",
|
||||||
|
action = "store_true")
|
||||||
|
|
||||||
|
parser.add_argument("--file_format",
|
||||||
|
help = "Sensor data file format [fhws|lukas] (default: fhws)",
|
||||||
|
type = str)
|
||||||
|
|
||||||
|
parser.add_argument("--cosy",
|
||||||
|
help = "Coordinate system of the gyroscope data [world|device] (default: device). If given in device, the data will automatically be rotated in world coordinates.",
|
||||||
|
type = str)
|
||||||
|
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
#Choose between file format of sensor data and coordinate system
|
||||||
|
file_format = "fhws"
|
||||||
|
cosy = "device"
|
||||||
|
|
||||||
|
if args.file_format:
|
||||||
|
file_format = args.file_format
|
||||||
|
|
||||||
|
if args.cosy:
|
||||||
|
cosy = args.cosy
|
||||||
|
|
||||||
|
|
||||||
|
#My own data format
|
||||||
|
if file_format == "lukas":
|
||||||
|
delimiter = ","
|
||||||
|
time_cols = [40]
|
||||||
|
|
||||||
|
time = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter=delimiter,
|
||||||
|
usecols=time_cols,
|
||||||
|
skiprows = 1,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
if cosy == "device":
|
||||||
|
gyros_cols = [9, 10, 11]
|
||||||
|
lin_accel_cols = [6, 7, 8]
|
||||||
|
else:
|
||||||
|
gyros_cols = [34, 35,36]
|
||||||
|
lin_accel_cols = [37, 38, 39]
|
||||||
|
|
||||||
|
grav_cols = [3, 4, 5]
|
||||||
|
|
||||||
|
|
||||||
|
gyroX, gyroY, gyroZ = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter=delimiter,
|
||||||
|
usecols=gyros_cols,
|
||||||
|
skiprows = 1,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
rotation = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter = delimiter,
|
||||||
|
usecols=range(18,34),
|
||||||
|
skiprows=1,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
lin_accel_X, lin_accel_Y, lin_accel_Z = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter=delimiter,
|
||||||
|
usecols=lin_accel_cols,
|
||||||
|
skiprows=1,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
gravity_X, gravity_Y, gravity_Z = np.loadtxt(args.fname_sensor,
|
||||||
|
delimiter=delimiter,
|
||||||
|
usecols=grav_cols,
|
||||||
|
skiprows=1,
|
||||||
|
unpack=True)
|
||||||
|
|
||||||
|
rotation = rotation.T
|
||||||
|
rotation = [row.reshape((4,4)) for row in rotation]
|
||||||
|
# rotation = np.array(rotation).T
|
||||||
|
print rotation
|
||||||
|
|
||||||
|
gyro = np.array([gyroX, gyroY, gyroZ]).T
|
||||||
|
lin_accel = np.array([lin_accel_X, lin_accel_Y, lin_accel_Z]).T
|
||||||
|
gravity = np.array([gravity_X, gravity_Y, gravity_Z]).T
|
||||||
|
|
||||||
|
if cosy == "device":
|
||||||
|
world_gyro = rotate_data_lukas(gyro, rotation)
|
||||||
|
world_lin_accel = rotate_data_lukas(lin_accel, rotation)
|
||||||
|
else:
|
||||||
|
world_gyro = gyro
|
||||||
|
world_lin_accel = lin_accel
|
||||||
|
|
||||||
|
|
||||||
|
#FHWS file format
|
||||||
|
else:
|
||||||
|
time, gyro, lin_accel, gravity, rotation = read_data(args.fname_sensor)
|
||||||
|
|
||||||
|
if cosy == "device":
|
||||||
|
world_gyro = rotate_data_lukas(gyro, rotation)
|
||||||
|
world_lin_accel = rotate_data_lukas(lin_accel, rotation)
|
||||||
|
else:
|
||||||
|
print "Option 'fhws' in combination with 'world' not available"
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
gyroX = world_gyro[:,0]
|
||||||
|
gyroY = world_gyro[:,1]
|
||||||
|
gyroZ = world_gyro[:,2]
|
||||||
|
|
||||||
|
lin_accel_X = world_lin_accel[:,0]
|
||||||
|
lin_accel_Y = world_lin_accel[:,1]
|
||||||
|
lin_accel_Z = world_lin_accel[:,2]
|
||||||
|
|
||||||
|
|
||||||
|
#Parameters
|
||||||
|
#---------
|
||||||
|
|
||||||
|
time_interval = 500
|
||||||
|
|
||||||
|
if args.time:
|
||||||
|
time_interval = args.time
|
||||||
|
|
||||||
|
|
||||||
|
turns = detect_turns(time, gyroZ, time_interval)
|
||||||
|
motion = motion_axis(time, lin_accel, gravity, 500)
|
||||||
|
|
||||||
|
angles = []
|
||||||
|
for index, axis in enumerate(motion):
|
||||||
|
if index == 0:
|
||||||
|
angle = 0
|
||||||
|
else:
|
||||||
|
x_1 = motion[index-1][1]
|
||||||
|
y_1 = motion[index-1][2]
|
||||||
|
x_2 = axis[1]
|
||||||
|
y_2 = axis[2]
|
||||||
|
|
||||||
|
a = np.array([x_1, y_1])
|
||||||
|
b = np.array([x_2, y_2])
|
||||||
|
|
||||||
|
angle = angle_between(a,b)
|
||||||
|
angles.append((axis[0], angle))
|
||||||
|
|
||||||
|
|
||||||
|
np.set_printoptions(suppress=True)
|
||||||
|
turns = np.array(turns)
|
||||||
|
angles = np.array(angles)
|
||||||
|
|
||||||
|
|
||||||
|
if args.rad:
|
||||||
|
turns[:,1] = deg_to_rad(turns[:,1])
|
||||||
|
|
||||||
|
print "Sum of all angles: ", np.sum(turns[:,1])
|
||||||
|
write_to_file(args.fname_output, turns, angles)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
49
code/lukas/TurnEvaluation.h
Executable file
49
code/lukas/TurnEvaluation.h
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
#ifndef TURNEVALUATION_H
|
||||||
|
#define TURNEVALUATION_H
|
||||||
|
|
||||||
|
|
||||||
|
#include "../particles/MyState.h"
|
||||||
|
#include "TurnObservation.h"
|
||||||
|
//#include <boost/math/special_functions/bessel.hpp>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
//static constexpr double sigma_heading = 5;
|
||||||
|
|
||||||
|
class TurnEvaluation {
|
||||||
|
|
||||||
|
//All calculations use degree not rad!!!
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
double getProbability(const MyState& state, const TurnObservation* obs, bool simple = false) const {
|
||||||
|
|
||||||
|
(void) state;
|
||||||
|
(void) obs;
|
||||||
|
(void) simple;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
// see: particle-filter-control-data
|
||||||
|
// // get the current heading-change
|
||||||
|
// const float delta = Angle::radToDeg(state.walkState.headingChange_rad);
|
||||||
|
|
||||||
|
// // and reset it as it was evaluated
|
||||||
|
// ((MyState&) state).walkState.headingChange_rad = 0;
|
||||||
|
|
||||||
|
// // proability?
|
||||||
|
// const float sigma = 15.0;
|
||||||
|
// const double prob = K::NormalDistribution::getProbability(obs->delta_heading, sigma, delta);
|
||||||
|
|
||||||
|
// if (prob != prob) {
|
||||||
|
// throw 1;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return prob;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // TURNEVALUATION_H
|
||||||
21
code/lukas/TurnObservation.h
Executable file
21
code/lukas/TurnObservation.h
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#ifndef TURNOBSERVATION_H
|
||||||
|
#define TURNOBSERVATION_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct TurnObservation {
|
||||||
|
float ts;
|
||||||
|
float delta_heading; //measured change of heading direction (given by Gyroskop)
|
||||||
|
float delta_motion; //measured change of motion direction (given by PCA)
|
||||||
|
|
||||||
|
TurnObservation() {;}
|
||||||
|
TurnObservation(const float delta_heading, const float motion_angle) : delta_heading(delta_heading), delta_motion(motion_angle) {;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // TURNOBSERVATION_H
|
||||||
36
code/lukas/TurnReader.h
Executable file
36
code/lukas/TurnReader.h
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#ifndef TURNREADER_H
|
||||||
|
#define TURNREADER_H
|
||||||
|
|
||||||
|
#include "../reader/SensorReaderTurn.h"
|
||||||
|
#include "TurnObservation.h"
|
||||||
|
|
||||||
|
class TurnReader {
|
||||||
|
public:
|
||||||
|
static TurnObservation* readTurn(const SensorEntryTurn& se) {
|
||||||
|
|
||||||
|
std::string tmp = se.data;
|
||||||
|
TurnObservation* obs = new TurnObservation();
|
||||||
|
|
||||||
|
while(!tmp.empty()) {
|
||||||
|
|
||||||
|
int pos = tmp.find(',');
|
||||||
|
std::string heading = tmp.substr(0, pos);
|
||||||
|
tmp = tmp.substr(pos);
|
||||||
|
assert(tmp[0] == ';'); tmp = tmp.substr(1);
|
||||||
|
|
||||||
|
std::string motion = tmp;
|
||||||
|
|
||||||
|
TurnObservation t(std::stof(heading), std::stof(motion));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return obs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // TURNREADER_H
|
||||||
21
code/lukas/detection.sh
Executable file
21
code/lukas/detection.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
FILES=$(find ../measurements/18/{Galaxy,Nexus}/ -name "*.csv")
|
||||||
|
|
||||||
|
for f in $FILES
|
||||||
|
do
|
||||||
|
echo $f
|
||||||
|
filename=$(basename $f)
|
||||||
|
directory=$(dirname $f)
|
||||||
|
|
||||||
|
#echo $filename
|
||||||
|
#echo $directory
|
||||||
|
|
||||||
|
step=$directory/Steps2.txt
|
||||||
|
turn=$directory/Turns.txt
|
||||||
|
|
||||||
|
echo $step
|
||||||
|
echo $turn
|
||||||
|
|
||||||
|
python StepDetector.py $f $step --lt -1.2 --ht 1.2
|
||||||
|
python TurnDetector.py $f $turn
|
||||||
|
done
|
||||||
113
code/main.cpp
Normal file
113
code/main.cpp
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
|
||||||
|
#include <Indoor/grid/walk/GridWalkLightAtTheEndOfTheTunnel.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkRandomHeadingUpdate.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkRandomHeadingUpdateAdv.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalkPushForward.h>
|
||||||
|
|
||||||
|
#include "Vis.h"
|
||||||
|
#include "Helper.h"
|
||||||
|
#include "MyGridNode.h"
|
||||||
|
#include "Helper.h"
|
||||||
|
#include "DijkstraMapper.h"
|
||||||
|
|
||||||
|
#include "eval/Eval.h"
|
||||||
|
#include "eval/Eval1.h"
|
||||||
|
#include "eval/EvalBase.h"
|
||||||
|
|
||||||
|
#include "eval/PaperVisImportance.h"
|
||||||
|
#include "eval/PaperVisDijkstra.h"
|
||||||
|
#include "eval/PaperVisGrid.h"
|
||||||
|
|
||||||
|
|
||||||
|
float BarometerEvaluation::barometerSigma = NAN;
|
||||||
|
|
||||||
|
Settings settings;
|
||||||
|
|
||||||
|
void testModelWalk() {
|
||||||
|
|
||||||
|
Grid<MyGridNode> grid(MiscSettings::gridSize_cm);
|
||||||
|
|
||||||
|
Helper::FHWSFloors floors = Helper::getFloors();
|
||||||
|
Helper::buildTheGrid(grid, floors);
|
||||||
|
|
||||||
|
MyGridNode& start = (MyGridNode&)grid.getNodeFor(GridPoint(500,300,floors.h0.cm()));
|
||||||
|
//MyGridNode& end = (MyGridNode&)grid.getNodeFor(GridPoint(7000,5000,floors.h3.cm()));
|
||||||
|
|
||||||
|
Vis vis;
|
||||||
|
vis.addFloor(floors.f0, floors.h0);
|
||||||
|
vis.addFloor(floors.f1, floors.h1);
|
||||||
|
vis.addFloor(floors.f2, floors.h2);
|
||||||
|
vis.addFloor(floors.f3, floors.h3);
|
||||||
|
|
||||||
|
|
||||||
|
vis.gp << "set xrange [1100:1800]\n";
|
||||||
|
vis.gp << "set yrange [4500:5200]\n";
|
||||||
|
|
||||||
|
// vis.gp << "set xrange [1000:4000]\n";
|
||||||
|
// vis.gp << "set yrange [1000:4000]\n";
|
||||||
|
// vis.gp << "set zrange [0:600]\n";
|
||||||
|
|
||||||
|
// switch between different grid-walkers
|
||||||
|
GridWalkRandomHeadingUpdate<MyGridNode> walk;
|
||||||
|
//GridWalkRandomHeadingUpdateAdv<MyGridNode> walk;
|
||||||
|
//GridWalkPushForward<MyGridNode> walk;
|
||||||
|
//GridWalkLightAtTheEndOfTheTunnel<MyGridNode> walk(grid, DijkstraMapper(grid), end);
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<GridWalkState<MyGridNode>> states;
|
||||||
|
for (int i = 0; i < 1000; ++i) { states.push_back(GridWalkState<MyGridNode>(&start, Heading::rnd())); }
|
||||||
|
|
||||||
|
// track the number-of-visits for each node to draw something like a particle-heat-map?
|
||||||
|
|
||||||
|
// show the importance factors
|
||||||
|
vis.addGrid(grid);
|
||||||
|
vis.show();
|
||||||
|
sleep(100);
|
||||||
|
vis.removeGrid();
|
||||||
|
|
||||||
|
Distribution::Normal<float> wDist(0.3, 0.3);
|
||||||
|
Distribution::Normal<float> wHead(0.3, 0.3);
|
||||||
|
|
||||||
|
while(true) {
|
||||||
|
for (GridWalkState<MyGridNode>& state : states) {
|
||||||
|
state = walk.getDestination(grid, state, std::abs(wDist.draw()), wHead.draw());
|
||||||
|
}
|
||||||
|
usleep(1000*80);
|
||||||
|
vis.showStates(states);
|
||||||
|
vis.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
sleep(1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
|
||||||
|
// testModelWalk();
|
||||||
|
|
||||||
|
Eval1 eval;
|
||||||
|
//eval.path2_forward_simple();
|
||||||
|
//eval.path2_forward_path();
|
||||||
|
//eval.path3_forward_simple();
|
||||||
|
//eval.path3_forward_path();
|
||||||
|
|
||||||
|
//eval.path4_nexus_simple();
|
||||||
|
//eval.path4_nexus_imp();
|
||||||
|
//eval.path4_nexus_path();
|
||||||
|
//eval.path4_nexus_path_b();
|
||||||
|
|
||||||
|
eval.bergwerk_path1_nexus_simple();
|
||||||
|
|
||||||
|
eval.run();
|
||||||
|
|
||||||
|
// PaperVisGrid::showStairs();
|
||||||
|
// PaperVisImportance::createImportance();
|
||||||
|
// PaperVisImportance::createPath();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
12
code/particles/MyControl.h
Executable file
12
code/particles/MyControl.h
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#ifndef MYCONTROL_H
|
||||||
|
#define MYCONTROL_H
|
||||||
|
|
||||||
|
struct MyControl {
|
||||||
|
|
||||||
|
float walked_m = 0;
|
||||||
|
|
||||||
|
float headingChange_rad = 0;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MYCONTROL_H
|
||||||
89
code/particles/MyEvaluation.h
Executable file
89
code/particles/MyEvaluation.h
Executable file
@@ -0,0 +1,89 @@
|
|||||||
|
#ifndef MYEVALUATION_H
|
||||||
|
#define MYEVALUATION_H
|
||||||
|
|
||||||
|
#include <KLib/math/filter/particles/ParticleFilterEvaluation.h>
|
||||||
|
#include "MyObservation.h"
|
||||||
|
#include "MyState.h"
|
||||||
|
|
||||||
|
#include "../frank/WiFiEvaluation.h"
|
||||||
|
#include "../frank/BeaconEvaluation.h"
|
||||||
|
#include "../toni/BarometerEvaluation.h"
|
||||||
|
#include "../lukas/StepEvaluation.h"
|
||||||
|
#include "../lukas/TurnEvaluation.h"
|
||||||
|
|
||||||
|
class MyEvaluation : public K::ParticleFilterEvaluation<MyState, MyObservation> {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
WiFiEvaluation wifiEval;
|
||||||
|
BeaconEvaluation beaconEval;
|
||||||
|
BarometerEvaluation barometerEval;
|
||||||
|
StepEvaluation stepEval;
|
||||||
|
TurnEvaluation turnEval;
|
||||||
|
|
||||||
|
bool useWifi = true;
|
||||||
|
bool useStep = true;
|
||||||
|
bool useTurn = true;
|
||||||
|
bool useBaro = true;
|
||||||
|
bool useIB = true;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
void setUsage(bool useWifi, bool useStep, bool useTurn, bool useBaro, bool useIB) {
|
||||||
|
this->useWifi = useWifi;
|
||||||
|
this->useStep = useStep;
|
||||||
|
this->useTurn = useTurn;
|
||||||
|
this->useBaro = useBaro;
|
||||||
|
this->useIB = useIB;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual double evaluation(std::vector<K::Particle<MyState>>& particles, const MyObservation& observation) override {
|
||||||
|
|
||||||
|
//if (observation.wifi) {
|
||||||
|
wifiEval.nextObservation(observation.wifi);
|
||||||
|
//}
|
||||||
|
|
||||||
|
// evalulate each particle
|
||||||
|
double sum = 0;
|
||||||
|
for (K::Particle<MyState>& p : particles) {
|
||||||
|
|
||||||
|
double weight = 1.0;
|
||||||
|
|
||||||
|
if (useWifi) {
|
||||||
|
weight *= wifiEval.getProbability(p.state, observation);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useBaro && observation.barometer) {
|
||||||
|
weight *= barometerEval.getProbability(p.state, observation.barometer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useIB) {
|
||||||
|
weight *= beaconEval.getProbability(p.state, observation);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useStep) {
|
||||||
|
weight *= stepEval.getProbability(p.state, observation.step);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (useTurn) {
|
||||||
|
weight *= turnEval.getProbability(p.state, observation.turn, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set and accumulate
|
||||||
|
p.weight = weight;
|
||||||
|
sum += p.weight;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// reset
|
||||||
|
observation.step->steps = 0;
|
||||||
|
observation.turn->delta_heading = 0;
|
||||||
|
observation.turn->delta_motion = 0;
|
||||||
|
|
||||||
|
return sum;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MYEVALUATION_H
|
||||||
62
code/particles/MyInitializer.h
Executable file
62
code/particles/MyInitializer.h
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#ifndef MYINITIALIZER3_H
|
||||||
|
#define MYINITIALIZER3_H
|
||||||
|
|
||||||
|
#include <KLib/math/filter/particles/ParticleFilterInitializer.h>
|
||||||
|
#include "MyState.h"
|
||||||
|
|
||||||
|
#include <Indoor/grid/Grid.h>
|
||||||
|
|
||||||
|
class MyInitializer : public K::ParticleFilterInitializer<MyState> {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Grid<MyGridNode>& grid;
|
||||||
|
|
||||||
|
int x_cm;
|
||||||
|
int y_cm;
|
||||||
|
int z_cm;
|
||||||
|
|
||||||
|
int heading;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** q0 = random */
|
||||||
|
MyInitializer(Grid<MyGridNode>& grid) : grid(grid), heading(0) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** q0 = given */
|
||||||
|
MyInitializer(Grid<MyGridNode>& grid, int x_cm, int y_cm, int z_cm, int heading) :
|
||||||
|
grid(grid), x_cm(x_cm), y_cm(y_cm), z_cm(z_cm), heading(heading) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void initialize(std::vector<K::Particle<MyState>>& particles) override {
|
||||||
|
|
||||||
|
std::minstd_rand gen;
|
||||||
|
std::uniform_int_distribution<> dist(0, grid.getNumNodes());
|
||||||
|
|
||||||
|
for (K::Particle<MyState>& p : particles) {
|
||||||
|
|
||||||
|
MyGridNode& n = grid[dist(gen)];
|
||||||
|
|
||||||
|
//p.state.pCur = Point3(x_cm, y_cm, z_cm);
|
||||||
|
//GridPoint gp(p.state.pCur.x, p.state.pCur.y, p.state.pCur.z);
|
||||||
|
//p.state.walkState.node = &grid.getNodeFor(gp);
|
||||||
|
|
||||||
|
p.state.pCur = (Point3) n;
|
||||||
|
p.state.walkState.node = &n;
|
||||||
|
|
||||||
|
p.state.pOld = p.state.pCur;
|
||||||
|
p.state.walkState.heading = Heading::rnd();
|
||||||
|
p.state.hPa = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MYINITIALIZER_H
|
||||||
53
code/particles/MyObservation.h
Executable file
53
code/particles/MyObservation.h
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
#ifndef MYOBSERVATION_H
|
||||||
|
#define MYOBSERVATION_H
|
||||||
|
|
||||||
|
#include "../frank/WiFiObservation.h"
|
||||||
|
#include "../frank/BeaconObservation.h"
|
||||||
|
#include "../frank/OrientationObservation.h"
|
||||||
|
|
||||||
|
#include "../toni/BarometerObservation.h"
|
||||||
|
#include "../lukas/StepObservation.h"
|
||||||
|
#include "../lukas/TurnObservation.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* all available sensor readings
|
||||||
|
*/
|
||||||
|
struct MyObservation {
|
||||||
|
|
||||||
|
/** wifi observation */
|
||||||
|
WiFiObservation wifi;
|
||||||
|
|
||||||
|
OrientationObservation orientation;
|
||||||
|
|
||||||
|
/** barometer observation data (if any) */
|
||||||
|
BarometerObservation* barometer = nullptr;
|
||||||
|
|
||||||
|
/** beacon observation data */
|
||||||
|
BeaconObservation beacons;
|
||||||
|
|
||||||
|
/** step observation data (if any) */
|
||||||
|
StepObservation* step = nullptr;
|
||||||
|
|
||||||
|
/** turn observation data (if any) */
|
||||||
|
TurnObservation* turn = nullptr;
|
||||||
|
|
||||||
|
/** timestamp of the youngest sensor data that resides within this observation. used to detect the age of all other observations! */
|
||||||
|
uint64_t latestSensorDataTS = 0;
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
MyObservation() {
|
||||||
|
// reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
// /** set all observations to null */
|
||||||
|
// void reset() {
|
||||||
|
// //delete wifi; wifi = nullptr;
|
||||||
|
// delete barometer; barometer = nullptr;
|
||||||
|
// delete beacons; beacons = nullptr;
|
||||||
|
// //delete step; step = nullptr;
|
||||||
|
// //delete turn; turn = nullptr;
|
||||||
|
// }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MYOBSERVATION_H
|
||||||
140
code/particles/MyState.h
Executable file
140
code/particles/MyState.h
Executable file
@@ -0,0 +1,140 @@
|
|||||||
|
#ifndef MYSTATE_H
|
||||||
|
#define MYSTATE_H
|
||||||
|
|
||||||
|
#include <KLib/math/distribution/Normal.h>
|
||||||
|
#include <KLib/math/optimization/NumOptVector.h>
|
||||||
|
|
||||||
|
#include <Indoor/grid/walk/GridWalkState.h>
|
||||||
|
|
||||||
|
#include "../MyGridNode.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* one possible state for the pedestrian
|
||||||
|
* 3D position (x, y, floor-nr)
|
||||||
|
*/
|
||||||
|
struct MyState {
|
||||||
|
|
||||||
|
// current position
|
||||||
|
Point3 pCur;
|
||||||
|
|
||||||
|
// previous position
|
||||||
|
Point3 pOld;
|
||||||
|
|
||||||
|
// the grid-walk state
|
||||||
|
GridWalkState<MyGridNode> walkState;
|
||||||
|
|
||||||
|
//int distanceWalkedCM;
|
||||||
|
|
||||||
|
|
||||||
|
// double heading_old;
|
||||||
|
|
||||||
|
// //double transHeading;
|
||||||
|
// float numZChanges;
|
||||||
|
|
||||||
|
// // cumulative distance (in cm) this particle has taken. to-be-reset by the step detector whenever needed!
|
||||||
|
// double distanceWalkedCM;
|
||||||
|
|
||||||
|
double hPa; //relative Pressure given by a history with size defined in BarometerSensorReader.h
|
||||||
|
|
||||||
|
// double vertical_acc; //vertical acceleration
|
||||||
|
|
||||||
|
// /** the pedestrian's current heading */
|
||||||
|
// double heading;
|
||||||
|
|
||||||
|
/** empty ctor */
|
||||||
|
MyState() : pCur(0,0,0), pOld(0,0,0), walkState(nullptr, Heading(0)) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
// /** get the 2D distance between this state and the given x,y (in centimter) */
|
||||||
|
// double getDistance2D(const double x_cm, const double y_cm) const {
|
||||||
|
// const double dx = (x_cm - this->x_cm);
|
||||||
|
// const double dy = (y_cm - this->y_cm);
|
||||||
|
// return std::sqrt( (dx*dx) + (dy*dy) );
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /** get the 3D distance between this state and the given x,y,floor (in centimter) */
|
||||||
|
// double getDistance3D(const double x_cm, const double y_cm, const double floor_height_cm) const {
|
||||||
|
// const double dx = (x_cm - this->x_cm);
|
||||||
|
// const double dy = (y_cm - this->y_cm);
|
||||||
|
// const double dz = (z_nr - this->z_nr) * floor_height_cm;
|
||||||
|
// return std::sqrt( (dx*dx) + (dy*dy) + (dz*dz) );
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** -------- METHODS FOR THE PARTICLE FILTER -------- */
|
||||||
|
|
||||||
|
MyState& operator += (const MyState& o) {
|
||||||
|
pCur += o.pCur;
|
||||||
|
hPa += o.hPa;
|
||||||
|
//distanceWalked += o.distanceWalked;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyState& operator /= (const double d) {
|
||||||
|
pCur /= d;
|
||||||
|
hPa /= d;
|
||||||
|
//distanceWalked /= d;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyState operator * (const double d) const {
|
||||||
|
MyState s = MyState(*this);
|
||||||
|
s.pCur *= d;
|
||||||
|
s.hPa *= d;
|
||||||
|
//distanceWalked *= d;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// use the default one
|
||||||
|
// MyState& operator = (const MyState& o) {
|
||||||
|
// x_cm = o.x_cm;
|
||||||
|
// y_cm = o.y_cm;
|
||||||
|
// z_nr = o.z_nr;
|
||||||
|
// x_cm_old = o.x_cm_old;
|
||||||
|
// y_cm_old = o.y_cm_old;
|
||||||
|
// z_nr_old = o.z_nr_old;
|
||||||
|
// hPa = o.hPa;
|
||||||
|
// heading_old = o.heading_old;
|
||||||
|
// heading = o.heading;
|
||||||
|
// distanceWalkedCM = o.distanceWalkedCM;
|
||||||
|
// return *this;
|
||||||
|
// }
|
||||||
|
|
||||||
|
bool belongsToRegion(const MyState& o) const {
|
||||||
|
return o.pCur.getDistance(pCur) < 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
// /** rejection for the regional estimator. reject after 150cm distance */
|
||||||
|
// bool belongsToRegion(const MyState& o) const {
|
||||||
|
|
||||||
|
//// // do NOT group particles in distinct floors!
|
||||||
|
//// if (z_nr != o.z_nr) {return false;}
|
||||||
|
|
||||||
|
//// // get the 2D distance
|
||||||
|
//// double d = (x_cm - o.x_cm)*(x_cm - o.x_cm) +
|
||||||
|
//// (y_cm - o.y_cm)*(y_cm - o.y_cm);
|
||||||
|
//// d = std::sqrt(d);
|
||||||
|
|
||||||
|
//// // 2D distance below grouping threshold?
|
||||||
|
//// return d < 350.0;
|
||||||
|
|
||||||
|
// const double dx = (x_cm - o.x_cm);
|
||||||
|
// const double dy = (y_cm - o.y_cm);
|
||||||
|
// const double dz = (z_nr - o.z_nr) * 3000;
|
||||||
|
|
||||||
|
// // get the 2D distance
|
||||||
|
// double d = dx*dx + dy*dy + dz*dz;
|
||||||
|
// d = std::sqrt(d);
|
||||||
|
// return d < 350.0;
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// MyState(K::NumOptVector<3>& params) : x_cm(params[0]), y_cm(params[1]), z_cm(params[2]) {;}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MYSTATE_H
|
||||||
125
code/particles/MyTransition.h
Executable file
125
code/particles/MyTransition.h
Executable file
@@ -0,0 +1,125 @@
|
|||||||
|
#ifndef MYTRANSITION_H
|
||||||
|
#define MYTRANSITION_H
|
||||||
|
|
||||||
|
#include <KLib/math/filter/particles/ParticleFilterTransition.h>
|
||||||
|
#include <KLib/math/distribution/Normal.h>
|
||||||
|
#include <KLib/math/distribution/Uniform.h>
|
||||||
|
|
||||||
|
|
||||||
|
#include <Indoor/grid/Grid.h>
|
||||||
|
#include <Indoor/grid/walk/GridWalk.h>
|
||||||
|
|
||||||
|
#include "MyState.h"
|
||||||
|
#include "MyControl.h"
|
||||||
|
//#include "Helper.h"
|
||||||
|
|
||||||
|
#include "../toni/barometric.h"
|
||||||
|
|
||||||
|
#include "../MyGridNode.h"
|
||||||
|
|
||||||
|
inline double sgn(double x){
|
||||||
|
return ((x>0)?1 : ((x<0)?-1 : 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyTransition : public K::ParticleFilterTransition<MyState, MyControl> {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Grid<MyGridNode>& grid;
|
||||||
|
GridWalk<MyGridNode>& walker;
|
||||||
|
|
||||||
|
|
||||||
|
/** a simple normal distribution */
|
||||||
|
K::UniformDistribution distWalkStop;
|
||||||
|
K::NormalDistribution distWalkPerSec;
|
||||||
|
K::NormalDistribution distStop;
|
||||||
|
|
||||||
|
|
||||||
|
/** normal distribution for barometer */
|
||||||
|
K::NormalDistribution distBaro;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ctor
|
||||||
|
* @param choice the choice to use for randomly drawing nodes
|
||||||
|
* @param fp the underlying floorplan
|
||||||
|
*/
|
||||||
|
MyTransition(Grid<MyGridNode>& grid, GridWalk<MyGridNode>& walker) :
|
||||||
|
grid(grid), walker(walker),
|
||||||
|
distWalkStop(0.0, 1.0), distWalkPerSec(1.0, 0.3), distStop(0.0, 0.1), distBaro(0.3, 0.05) {
|
||||||
|
|
||||||
|
distWalkStop.setSeed(1234);
|
||||||
|
distWalkPerSec.setSeed(1234);
|
||||||
|
distStop.setSeed(1234);
|
||||||
|
|
||||||
|
distBaro.setSeed(5678);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
uint64_t ts = 0;
|
||||||
|
uint64_t deltaMS = 0;
|
||||||
|
|
||||||
|
/** set the current time in millisconds */
|
||||||
|
void setCurrentTime(const uint64_t ts) {
|
||||||
|
if (this->ts == 0) {
|
||||||
|
this->ts = ts;
|
||||||
|
deltaMS = 0;
|
||||||
|
} else {
|
||||||
|
deltaMS = ts - this->ts;
|
||||||
|
this->ts = ts;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void transition(std::vector<K::Particle<MyState>>& particles, const MyControl* control) override {
|
||||||
|
|
||||||
|
for (K::Particle<MyState>& p : particles) {
|
||||||
|
|
||||||
|
// TODO: depending on the time since the last update
|
||||||
|
// random distance to move
|
||||||
|
// const double distance = (distWalkStop.draw() > 0.2) ? (distWalk.draw()) : (distStop.draw());
|
||||||
|
// double dist_m = distance * deltaMS / 1000.0;
|
||||||
|
|
||||||
|
// if (dist_m < 0) {dist_m = -dist_m; p.state.heading = rand() % 360;}
|
||||||
|
|
||||||
|
// update the old heading and the other old values
|
||||||
|
//p.state.walkState.heading = p.state.heading;
|
||||||
|
p.state.pOld = p.state.pCur;
|
||||||
|
|
||||||
|
|
||||||
|
// // 10% stand still, 90% walk
|
||||||
|
// double dist_m;
|
||||||
|
// if (distWalkStop.draw() > 0.9) {
|
||||||
|
// dist_m = std::abs(distStop.draw() * deltaMS / 1000.0);
|
||||||
|
// } else {
|
||||||
|
// dist_m = std::abs(distWalkPerSec.draw() * deltaMS / 1000.0);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// get new destination
|
||||||
|
//const Node3* dst = choice->getTarget(src, p.state, dist_m);
|
||||||
|
p.state.walkState = walker.getDestination(grid, p.state.walkState, control->walked_m, control->headingChange_rad );
|
||||||
|
|
||||||
|
// randomly move the particle within its target grid (box)
|
||||||
|
// (z remains unchanged!)
|
||||||
|
//const int grid_size_cm = grid.getGridSize_cm();
|
||||||
|
|
||||||
|
// new position (x,y) is randomly distributed within the target node
|
||||||
|
Point3 noise = Point3(0,0,0); // TODO
|
||||||
|
p.state.pCur = (Point3) *p.state.walkState.node + noise;
|
||||||
|
|
||||||
|
|
||||||
|
// update the baromter
|
||||||
|
p.state.hPa += (p.state.pOld.z - p.state.pCur.z) / 100.0f * 0.105f;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MYTRANSITION_H
|
||||||
83
code/particles/MyTransitionSimple.h
Executable file
83
code/particles/MyTransitionSimple.h
Executable file
@@ -0,0 +1,83 @@
|
|||||||
|
#ifndef MYTRANSITIONSIMPLE_H
|
||||||
|
#define MYTRANSITIONSIMPLE_H
|
||||||
|
|
||||||
|
#include <KLib/math/filter/particles/ParticleFilterTransition.h>
|
||||||
|
#include <KLib/math/distribution/Normal.h>
|
||||||
|
#include "MyState.h"
|
||||||
|
#include "MyControl.h"
|
||||||
|
|
||||||
|
class MyTransitionSimple : public K::ParticleFilterTransition<MyState, MyControl> {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
/** a simple normal distribution */
|
||||||
|
K::NormalDistribution distX;
|
||||||
|
K::NormalDistribution distY;
|
||||||
|
K::NormalDistribution distZ;
|
||||||
|
K::NormalDistribution distBaro;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
MyTransitionSimple() : distX(0, 1.0), distY(0, 1.0), distZ(0, 1.0), distBaro(0.3, 0.05) {
|
||||||
|
distX.setSeed(1234);
|
||||||
|
distY.setSeed(1235);
|
||||||
|
distZ.setSeed(1236);
|
||||||
|
distBaro.setSeed(5678);
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
uint64_t ts = 0;
|
||||||
|
uint64_t deltaMS = 0;
|
||||||
|
|
||||||
|
/** set the current time in millisconds */
|
||||||
|
void setCurrentTime(const uint64_t ts) {
|
||||||
|
if (this->ts == 0) {
|
||||||
|
this->ts = ts;
|
||||||
|
deltaMS = 0;
|
||||||
|
} else {
|
||||||
|
deltaMS = ts - this->ts;
|
||||||
|
this->ts = ts;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void transition(std::vector<K::Particle<MyState>>& particles, const MyControl* control) override {
|
||||||
|
|
||||||
|
for (K::Particle<MyState>& p : particles) {
|
||||||
|
|
||||||
|
p.state.heading_old = p.state.heading;
|
||||||
|
p.state.x_cm_old = p.state.x_cm;
|
||||||
|
p.state.y_cm_old = p.state.y_cm;
|
||||||
|
p.state.z_nr_old = p.state.z_nr;
|
||||||
|
|
||||||
|
p.state.x_cm += (distX.draw() * deltaMS / 1000.0) * 250.0;
|
||||||
|
p.state.y_cm += (distY.draw() * deltaMS / 1000.0) * 250.0;
|
||||||
|
p.state.z_nr += (distZ.draw() * deltaMS / 1000.0) * 0.25;
|
||||||
|
p.state.heading = Helper::angleBetween(p.state.x_cm_old, p.state.y_cm_old, p.state.x_cm, p.state.y_cm);
|
||||||
|
|
||||||
|
// if (p.state.z_nr < 0.5) {p.state.z_nr = 0.5;}
|
||||||
|
// if (p.state.z_nr > 3.5) {p.state.z_nr = 3.5;}
|
||||||
|
// if (p.state.x_cm < 0) {p.state.x_cm = 0;}
|
||||||
|
// if (p.state.y_cm < 0) {p.state.y_cm = 0;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//update barometer
|
||||||
|
p.state.hPa += (p.state.z_nr_old - p.state.z_nr) * distBaro.draw();
|
||||||
|
|
||||||
|
// update walked distance (2D)
|
||||||
|
const double dx = p.state.x_cm_old - p.state.x_cm;
|
||||||
|
const double dy = p.state.y_cm_old - p.state.y_cm;
|
||||||
|
p.state.distanceWalkedCM = std::sqrt((dx*dx) + (dy*dy));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // MYTRANSITIONSIMPLE_H
|
||||||
4715
code/plan.svg
Executable file
4715
code/plan.svg
Executable file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 226 KiB |
4957
code/plan_new.svg
Normal file
4957
code/plan_new.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 239 KiB |
355
code/plan_plots.svg
Normal file
355
code/plan_plots.svg
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="724"
|
||||||
|
height="1800"
|
||||||
|
viewBox="0 0 724.00001 1800"
|
||||||
|
id="svg5100"
|
||||||
|
version="1.1"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="plan_plots.svg">
|
||||||
|
<defs
|
||||||
|
id="defs5102" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="0.98994949"
|
||||||
|
inkscape:cx="451.23575"
|
||||||
|
inkscape:cy="136.10259"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
fit-margin-top="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
inkscape:object-nodes="true"
|
||||||
|
inkscape:window-width="1600"
|
||||||
|
inkscape:window-height="845"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
units="px">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid5900"
|
||||||
|
originx="0"
|
||||||
|
originy="6.8902557e-05"
|
||||||
|
empspacing="4" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5105">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="test1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(814.21766,568.50997)">
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -810.32002,-557.59658 0.10236,1785.08658 318.89764,0 0,-162.9922"
|
||||||
|
id="path11563"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,1021.9782 0,-28.34651 -318.89764,0"
|
||||||
|
id="path11567"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,993.63169 0,-38.9764"
|
||||||
|
id="path11569"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,919.22219 0,-123.81877"
|
||||||
|
id="path11571"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,320.40335 0,-464.17327"
|
||||||
|
id="path11577"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,-179.203 0,-109.84247"
|
||||||
|
id="path11581"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,320.40342 -246,0"
|
||||||
|
id="path11587"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -711.32002,320.40342 -98.89764,-7e-5"
|
||||||
|
id="path11589"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,-288.59658 -319,0"
|
||||||
|
id="path11593"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -475.32002,-345.59665 -235.68504,-0.14174 0,-131.10236"
|
||||||
|
id="path11597"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -475.32002,-551.59665 0,206"
|
||||||
|
id="path11605"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -711.00506,-515.81713 0,-42.51968"
|
||||||
|
id="path11607"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,1227.49 287.00787,0 -0.008,-1117.08658"
|
||||||
|
id="path11619"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -425.32002,795.40342 150,0"
|
||||||
|
id="path11623"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,864.40342 209,0"
|
||||||
|
id="path11627"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.36727,1032.6081 209.05512,0"
|
||||||
|
id="path11631"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,864.40342 -0.0472,302.85038"
|
||||||
|
id="path11633"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,795.40342 0,-207"
|
||||||
|
id="path11637"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -420.45388,-345.73843 53.14961,0"
|
||||||
|
id="path11669"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -321.24128,-345.73843 38.97638,0"
|
||||||
|
id="path11671"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -409.82396,-427.23449 0,81.49606"
|
||||||
|
id="path11673"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -409.82396,-427.23449 173.62205,0"
|
||||||
|
id="path11675"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -321.24128,-345.73843 0,-81.49606"
|
||||||
|
id="path11677"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -236.20191,-558.33685 0,212.59842 139.88189,0.14185"
|
||||||
|
id="path11679"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,-223.59658 0,544"
|
||||||
|
id="path11757"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -123.32002,-223.59658 27,0"
|
||||||
|
id="path11761"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -310.61136,-491.01402 -102.75591,0"
|
||||||
|
id="path11822"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -563.32002,696.40342 150,0"
|
||||||
|
id="path4208"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -392.10742,-427.23449 0,-63.77953"
|
||||||
|
id="path5833"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -392.10742,-491.01402 0,-67.32283"
|
||||||
|
id="path5847"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -810.32002,-557.59658 715,0"
|
||||||
|
id="path5902"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -355.32002,110.40342 260,0"
|
||||||
|
id="path5923"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -96.32002,-557.59658 0,668"
|
||||||
|
id="path5925"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -491.32002,660.40339 0,-139.99997"
|
||||||
|
id="path5929"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -810.32002,384.40342 183,0"
|
||||||
|
id="path5931"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -627.32002,384.40342 60,24 52,52"
|
||||||
|
id="path5933"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -515.32002,460.40342 24,60"
|
||||||
|
id="path5935"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,-223.59658 246,0"
|
||||||
|
id="path5937"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,795.40342 -78,0"
|
||||||
|
id="path5939"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,600.40339 134,3e-5"
|
||||||
|
id="path5941"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -563.32002,696.40342 72,98.99997"
|
||||||
|
id="path5945"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,528.40342 134,0"
|
||||||
|
id="path5947"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,320.40342 22,0"
|
||||||
|
id="path5951"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -359.32002,320.40342 155,0"
|
||||||
|
id="path5953"
|
||||||
|
inkscape:connector-curvature="0" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,540.40342 0,-156"
|
||||||
|
id="path5955"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -239.32002,600.40339 35,3e-5"
|
||||||
|
id="path5959"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -239.32002,528.40339 35,3e-5"
|
||||||
|
id="path5961"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -413.32002,110.40342 22,0"
|
||||||
|
id="path5965"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m -235.32002,795.40342 31,-3e-5"
|
||||||
|
id="path5967"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 15 KiB |
66
code/reader/SensorReader.h
Executable file
66
code/reader/SensorReader.h
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
#ifndef SENSORREADER_H
|
||||||
|
#define SENSORREADER_H
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
/** entry for one sensor */
|
||||||
|
struct SensorEntry {
|
||||||
|
|
||||||
|
/** timestamp of occurrence */
|
||||||
|
uint64_t ts;
|
||||||
|
|
||||||
|
/** sensor's number */
|
||||||
|
int idx;
|
||||||
|
|
||||||
|
/** sensor data */
|
||||||
|
std::string data;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/** read sensor data from CSV */
|
||||||
|
class SensorReader {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::string file;
|
||||||
|
std::ifstream fp;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
SensorReader(const std::string& file) : file(file) {
|
||||||
|
rewind();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hasNext() {
|
||||||
|
return !fp.bad() && !fp.eof();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** read the next sensor entry */
|
||||||
|
SensorEntry getNext() {
|
||||||
|
|
||||||
|
char delim;
|
||||||
|
SensorEntry entry;
|
||||||
|
|
||||||
|
fp >> entry.ts;
|
||||||
|
fp >> delim;
|
||||||
|
fp >> entry.idx;
|
||||||
|
fp >> delim;
|
||||||
|
fp >> entry.data;
|
||||||
|
|
||||||
|
return entry;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** start again */
|
||||||
|
void rewind() {
|
||||||
|
fp.close();
|
||||||
|
fp.open(file);
|
||||||
|
assert(fp.is_open());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // SENSORREADER_H
|
||||||
49
code/reader/SensorReaderStep.h
Executable file
49
code/reader/SensorReaderStep.h
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
#ifndef SENSORREADERSTEP_H
|
||||||
|
#define SENSORREADERSTEP_H
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
/** entry for one sensor */
|
||||||
|
struct SensorEntryStep {
|
||||||
|
|
||||||
|
/** sensor data */
|
||||||
|
float ts; //timestamp of the step
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/** read sensor data from CSV */
|
||||||
|
class SensorReaderStep {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::ifstream fp;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
SensorReaderStep(const std::string& file) {
|
||||||
|
fp.open(file);
|
||||||
|
assert(fp.is_open());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hasNext() {
|
||||||
|
return !fp.bad() && !fp.eof();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** read the next sensor entry */
|
||||||
|
SensorEntryStep getNext() {
|
||||||
|
|
||||||
|
SensorEntryStep entry;
|
||||||
|
|
||||||
|
fp >> entry.ts;
|
||||||
|
|
||||||
|
return entry;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SENSORREADERSTEP_H
|
||||||
56
code/reader/SensorReaderTurn.h
Executable file
56
code/reader/SensorReaderTurn.h
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#ifndef SENSORREADERTURN_H
|
||||||
|
#define SENSORREADERTURN_H
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
/** entry for one sensor */
|
||||||
|
struct SensorEntryTurn {
|
||||||
|
|
||||||
|
/** timestamp of occurrence */
|
||||||
|
float ts;
|
||||||
|
|
||||||
|
/** sensor data */
|
||||||
|
float delta_heading;
|
||||||
|
float delta_motion;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/** read sensor data from CSV */
|
||||||
|
class SensorReaderTurn {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::ifstream fp;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
SensorReaderTurn(const std::string& file) {
|
||||||
|
fp.open(file);
|
||||||
|
assert(fp.is_open());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hasNext() {
|
||||||
|
return !fp.bad() && !fp.eof();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** read the next sensor entry */
|
||||||
|
SensorEntryTurn getNext() {
|
||||||
|
|
||||||
|
char delim;
|
||||||
|
SensorEntryTurn entry;
|
||||||
|
|
||||||
|
fp >> entry.ts;
|
||||||
|
fp >> delim;
|
||||||
|
fp >> entry.delta_heading;
|
||||||
|
fp >> delim;
|
||||||
|
fp >> entry.delta_motion;
|
||||||
|
|
||||||
|
return entry;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SENSORREADERTURN_H
|
||||||
65
code/toni/BarometerEvaluation.h
Executable file
65
code/toni/BarometerEvaluation.h
Executable file
@@ -0,0 +1,65 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../particles/MyState.h"
|
||||||
|
#include "BarometerObservation.h"
|
||||||
|
//#include "barometric.h"
|
||||||
|
//#include <KLib/math/distribution/Normal.h>
|
||||||
|
|
||||||
|
static constexpr double g_BarometerObservation = 0.0;
|
||||||
|
|
||||||
|
class BarometerEvaluation {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
static float barometerSigma;//= 0.12+0.04;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
double getProbability(const MyState& state, const BarometerObservation* obs) const {
|
||||||
|
|
||||||
|
|
||||||
|
// //rho_z
|
||||||
|
//double barometerSigma = 0.06;//0.12+0.04;//0.09;
|
||||||
|
|
||||||
|
// //The height of the single floor levels.
|
||||||
|
// const static double floor_height[3] = {4.1, 3.4, 3.4};
|
||||||
|
|
||||||
|
// if(USE_BAROMETRIC_FORMULAR){
|
||||||
|
// //height the particle has climbed.
|
||||||
|
// double h_1 = 0.0;
|
||||||
|
// for(int i = std::min(state.z_nr_old, state.z_nr); i < std::max(state.z_nr_old, state.z_nr); i++){
|
||||||
|
// h_1 += floor_height[i];
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if(h_1 != 0.0){
|
||||||
|
// // use the barometric formular to calculate the relative pressure
|
||||||
|
// // the calculation is done assuming sea level height at every floor.
|
||||||
|
// double mslp = BarometricFormular::s_getSeaLevelPressure();
|
||||||
|
// double pressure = BarometricFormular::s_getAtmosphericPressure(h_1, 297.0);
|
||||||
|
// barometerSigma = std::abs(mslp - pressure);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// // constant value for sigma if we assume all floors are same in height
|
||||||
|
// barometerSigma = 0.30 / 1.0; //hPa
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // evaluate the current particle with a normal distribution
|
||||||
|
const double barometerProbability = K::NormalDistribution::getProbability(state.hPa, barometerSigma, obs->hpa);
|
||||||
|
|
||||||
|
// //Just for the visualization. i'm a lazy bastard
|
||||||
|
//g_BarometerObservation = obs->hpa;
|
||||||
|
|
||||||
|
assert(barometerProbability == barometerProbability);
|
||||||
|
assert(state.hPa == state.hPa);
|
||||||
|
assert(obs->hpa == obs->hpa);
|
||||||
|
|
||||||
|
// //std::cout << barometerProbability << std::endl;
|
||||||
|
|
||||||
|
//return pow(2.0, barometerProbability);
|
||||||
|
return barometerProbability;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
17
code/toni/BarometerObservation.h
Executable file
17
code/toni/BarometerObservation.h
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
||||||
|
struct BarometerObservation {
|
||||||
|
|
||||||
|
double hpa;
|
||||||
|
|
||||||
|
BarometerObservation() { ; }
|
||||||
|
BarometerObservation(const float hpa) : hpa(hpa) {
|
||||||
|
|
||||||
|
;}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
70
code/toni/BarometerSensorReader.h
Executable file
70
code/toni/BarometerSensorReader.h
Executable file
@@ -0,0 +1,70 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
//#include "circular.h"
|
||||||
|
#include "BarometerObservation.h"
|
||||||
|
#include "../reader/SensorReader.h"
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
#include <Indoor/math/MovingAVG.h>
|
||||||
|
#include <Indoor/math/MovingMedian.h>
|
||||||
|
|
||||||
|
//circular_buffer<double> measurementHistory(1000);
|
||||||
|
|
||||||
|
|
||||||
|
class BarometerSensorReader{
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
// NOTE: median or avg?
|
||||||
|
MovingMedian<float> avg;
|
||||||
|
MovingMedian<float> avgStart;
|
||||||
|
|
||||||
|
// avg: lower size, median: bigger still fine
|
||||||
|
static constexpr int avgSize = 10;
|
||||||
|
static constexpr int startAvgSize = 10;
|
||||||
|
|
||||||
|
// skip the first 1-2 seconds and let the sensor settle itself
|
||||||
|
uint64_t skipTS = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
BarometerSensorReader(): avg(avgSize), avgStart(startAvgSize) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
BarometerObservation* readBarometer(const SensorEntry& se) {
|
||||||
|
|
||||||
|
// skip the first few 1.5 seconds
|
||||||
|
if (skipTS == 0) {skipTS = se.ts;}
|
||||||
|
if (se.ts - skipTS < 3000) {return nullptr;}
|
||||||
|
|
||||||
|
std::string tmp = se.data;
|
||||||
|
BarometerObservation* obs = new BarometerObservation();
|
||||||
|
const float cur = std::stof(tmp);
|
||||||
|
|
||||||
|
// get the next hPa reading and average it
|
||||||
|
avg.add(cur);
|
||||||
|
|
||||||
|
// average the first few readings as reference
|
||||||
|
if (avgStart.getNumUsed() < startAvgSize) {
|
||||||
|
avgStart.add(cur);
|
||||||
|
}
|
||||||
|
|
||||||
|
// current average relative to the start-average
|
||||||
|
obs->hpa = avg.get() - avgStart.get();
|
||||||
|
|
||||||
|
// done
|
||||||
|
return obs;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// //TODO
|
||||||
|
// void readVerticalAcceleration(const SensorEntry& se){
|
||||||
|
|
||||||
|
// //Problem: Koordinatensystem LinearAcceleraton ist relativ zum Telefon und nicht zum
|
||||||
|
// //Weltkoordinatensystem. Brauchen die Beschleunigung nach Oben in Weltkoordinaten.
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
52
code/toni/TFRingBuffer.h
Executable file
52
code/toni/TFRingBuffer.h
Executable file
@@ -0,0 +1,52 @@
|
|||||||
|
#ifndef TFObjectPool_TFRingBuffer_h
|
||||||
|
#define TFObjectPool_TFRingBuffer_h
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
|
template <typename T> class TFRingBuffer {
|
||||||
|
T *m_buffer;
|
||||||
|
std::atomic<size_t> m_head;
|
||||||
|
std::atomic<size_t> m_tail;
|
||||||
|
const size_t m_size;
|
||||||
|
|
||||||
|
size_t next(size_t current) {
|
||||||
|
return (current + 1) % m_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
TFRingBuffer(const size_t size) : m_size(size), m_head(0), m_tail(0) {
|
||||||
|
m_buffer = new T[size];
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~TFRingBuffer() {
|
||||||
|
delete[] m_buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool push(const T &object) {
|
||||||
|
size_t head = m_head.load(std::memory_order_relaxed);
|
||||||
|
size_t nextHead = next(head);
|
||||||
|
if (nextHead == m_tail.load(std::memory_order_acquire)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
m_buffer[head] = object;
|
||||||
|
m_head.store(nextHead, std::memory_order_release);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool pop(T &object) {
|
||||||
|
size_t tail = m_tail.load(std::memory_order_relaxed);
|
||||||
|
if (tail == m_head.load(std::memory_order_acquire)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
object = m_buffer[tail];
|
||||||
|
m_tail.store(next(tail), std::memory_order_release);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
111
code/toni/barometric.h
Executable file
111
code/toni/barometric.h
Executable file
@@ -0,0 +1,111 @@
|
|||||||
|
#define BAROMETRIC
|
||||||
|
|
||||||
|
#ifndef BAROMETRIC
|
||||||
|
#define BAROMETRIC
|
||||||
|
|
||||||
|
const static double mslp = 980.25; // mean sea level spressure
|
||||||
|
const static double int_lapse_rate = 0.0065; // a
|
||||||
|
const static double int_exponent = 5.255; // international barometric formular exponent calculated from (M * g) / (R * a)
|
||||||
|
|
||||||
|
//The height of the single floor levels.
|
||||||
|
const static double floor_height[5] = {0.0, 4.1, 3.4, 3.4, 3.4};
|
||||||
|
|
||||||
|
|
||||||
|
class BarometricFormular
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
const double temperature; // T in Kelvin
|
||||||
|
|
||||||
|
const double universal_gas_constant; // R
|
||||||
|
const double molar_mass; // M
|
||||||
|
const double gravitational_acceleration; // g
|
||||||
|
const double lapse_rate; // a
|
||||||
|
double _exponent;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** ctor */
|
||||||
|
BarometricFormular(const double R, const double M, const double g, const double a, const double T):
|
||||||
|
universal_gas_constant(R), molar_mass(M), gravitational_acceleration(g), lapse_rate(a), temperature(T){
|
||||||
|
_exponent = (M * g) / (R * a);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ctor only with Temperature*/
|
||||||
|
BarometricFormular(const double T) :
|
||||||
|
universal_gas_constant(8.314), molar_mass(0.02896), gravitational_acceleration(9.80665), lapse_rate(0.0065), temperature(T){
|
||||||
|
_exponent = (molar_mass * gravitational_acceleration) / (universal_gas_constant * lapse_rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Atmospheric Pressure Calculation */
|
||||||
|
double getAtmosphericPressure(double p_0, double h_1) const{
|
||||||
|
return p_0 * std::pow((1.0 - ((lapse_rate * h_1)/temperature)), _exponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Atmospheric Pressure Calculation above sea level*/
|
||||||
|
double getAtmosphericPressure(double h_1) const{
|
||||||
|
return mslp * std::pow((1.0 - ((lapse_rate * h_1)/temperature)), _exponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO:: Height from pressure for the general formular
|
||||||
|
|
||||||
|
//Static Functions
|
||||||
|
|
||||||
|
/** International Barometric Formular*/
|
||||||
|
static double s_getAtmosphericPressure(double p_0, double h_1, double kelvin){
|
||||||
|
return p_0 * std::pow((1.0 - ((int_lapse_rate * h_1)/kelvin)), int_exponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** International Barometric Formular above Sea Level*/
|
||||||
|
static double s_getAtmosphericPressure(double h_1, double kelvin){
|
||||||
|
return mslp * std::pow((1.0 - ((int_lapse_rate * h_1)/kelvin)), int_exponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** International Barometric Formular above Sea Level at 15 degree*/
|
||||||
|
static double s_getAtmosphericPressure(double height_above_sea_level){
|
||||||
|
return mslp * std::pow((1.0 - ((int_lapse_rate * height_above_sea_level)/288.15)), int_exponent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get the height above sea level using a pressure measurment above sea level*/
|
||||||
|
static double getHeightAboveSeaLevel(double p, double kelvin){
|
||||||
|
// http://www.wolframalpha.com/input/?i=solve+for+h+++p+%3D+980.25*%281+-+0.0065+*+h%2FT%29^5.255
|
||||||
|
return 41.4811 * ((3.70882 * kelvin) - (std::pow(p, 0.1902949571836346) * kelvin));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** This is a helper Class only for gnupplot visualization for ipin2015*/
|
||||||
|
static double getHeightForVisualizationOnly(double p, double z_0, double kelvin){
|
||||||
|
|
||||||
|
// the height of the reference (first) pressure measurement
|
||||||
|
double h_0 = 0.0;
|
||||||
|
for(int i = 0; i <= z_0; i++){
|
||||||
|
h_0 += floor_height[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// pressure value of h_0 above sea level
|
||||||
|
// we define that the bottom of floor 0 is sea level ;).
|
||||||
|
double p_0 = s_getAtmosphericPressure(h_0, kelvin);
|
||||||
|
|
||||||
|
// pressure value of the current particle above floor 0 (sea level)
|
||||||
|
double p_height = p_0 + p;
|
||||||
|
|
||||||
|
// height of the particle above floor 0 (sea level)
|
||||||
|
return getHeightAboveSeaLevel(p_height, kelvin);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static double s_getSeaLevelPressure(){
|
||||||
|
return mslp;
|
||||||
|
}
|
||||||
|
|
||||||
|
static double getPressureOfFloorForVizualization(double z, double kelvin){
|
||||||
|
|
||||||
|
int i = z + 0.5;
|
||||||
|
double h_z = floor_height[i+1];
|
||||||
|
double p_z = s_getAtmosphericPressure(h_z, kelvin);
|
||||||
|
return std::abs(mslp - p_z);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // BAROMETRIC
|
||||||
|
|
||||||
492
code/toni/circular.h
Executable file
492
code/toni/circular.h
Executable file
@@ -0,0 +1,492 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* $Id: $
|
||||||
|
* $Name: $
|
||||||
|
*
|
||||||
|
* Author: Pete Goodliffe
|
||||||
|
*
|
||||||
|
* ----------------------------------------------------------------------------
|
||||||
|
* Copyright 2002 Pete Goodliffe All rights reserved.
|
||||||
|
*
|
||||||
|
* ----------------------------------------------------------------------------
|
||||||
|
* Purpose: STL-style circular buffer
|
||||||
|
*
|
||||||
|
* ----------------------------------------------------------------------------
|
||||||
|
* History: See source control system log.
|
||||||
|
*
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef CIRCULAR_BUFFER_H
|
||||||
|
#define CIRCULAR_BUFFER_H
|
||||||
|
|
||||||
|
#include <exception>
|
||||||
|
#include <iterator>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* Iterators
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Iterator type for the circular_buffer class.
|
||||||
|
*
|
||||||
|
* This one template class provides all variants of forward/reverse
|
||||||
|
* const/non const iterators through plentiful template magic.
|
||||||
|
*
|
||||||
|
* You don't need to instantiate it directly, use the good public functions
|
||||||
|
* availble in circular_buffer.
|
||||||
|
*/
|
||||||
|
template <typename T, //circular_buffer type
|
||||||
|
//(incl const)
|
||||||
|
typename T_nonconst, //with any consts
|
||||||
|
typename elem_type = typename T::value_type> //+ const for const iter
|
||||||
|
class circular_buffer_iterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
typedef circular_buffer_iterator<T, T_nonconst, elem_type> self_type;
|
||||||
|
|
||||||
|
typedef T cbuf_type;
|
||||||
|
typedef std::random_access_iterator_tag iterator_category;
|
||||||
|
typedef typename cbuf_type::value_type value_type;
|
||||||
|
typedef typename cbuf_type::size_type size_type;
|
||||||
|
typedef typename cbuf_type::pointer pointer;
|
||||||
|
typedef typename cbuf_type::const_pointer const_pointer;
|
||||||
|
typedef typename cbuf_type::reference reference;
|
||||||
|
typedef typename cbuf_type::const_reference const_reference;
|
||||||
|
typedef typename cbuf_type::difference_type difference_type;
|
||||||
|
|
||||||
|
circular_buffer_iterator(cbuf_type *b, size_type p)
|
||||||
|
: buf_(b), pos_(p) {}
|
||||||
|
|
||||||
|
// Converting a non-const iterator to a const iterator
|
||||||
|
circular_buffer_iterator
|
||||||
|
(const circular_buffer_iterator<T_nonconst, T_nonconst,
|
||||||
|
typename T_nonconst::value_type>
|
||||||
|
&other)
|
||||||
|
: buf_(other.buf_), pos_(other.pos_) {}
|
||||||
|
friend class circular_buffer_iterator<const T, T, const elem_type>;
|
||||||
|
|
||||||
|
// Use compiler generated copy ctor, copy assignment operator and dtor
|
||||||
|
|
||||||
|
elem_type &operator*() { return (*buf_)[pos_]; }
|
||||||
|
elem_type *operator->() { return &(operator*()); }
|
||||||
|
|
||||||
|
self_type &operator++()
|
||||||
|
{
|
||||||
|
pos_ += 1;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
self_type operator++(int)
|
||||||
|
{
|
||||||
|
self_type tmp(*this);
|
||||||
|
++(*this);
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
self_type &operator--()
|
||||||
|
{
|
||||||
|
pos_ -= 1;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
self_type operator--(int)
|
||||||
|
{
|
||||||
|
self_type tmp(*this);
|
||||||
|
--(*this);
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
self_type operator+(difference_type n) const
|
||||||
|
{
|
||||||
|
self_type tmp(*this);
|
||||||
|
tmp.pos_ += n;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
self_type &operator+=(difference_type n)
|
||||||
|
{
|
||||||
|
pos_ += n;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
self_type operator-(difference_type n) const
|
||||||
|
{
|
||||||
|
self_type tmp(*this);
|
||||||
|
tmp.pos_ -= n;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
self_type &operator-=(difference_type n)
|
||||||
|
{
|
||||||
|
pos_ -= n;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
difference_type operator-(const self_type &c) const
|
||||||
|
{
|
||||||
|
return pos_ - c.pos_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator==(const self_type &other) const
|
||||||
|
{
|
||||||
|
return pos_ == other.pos_ && buf_ == other.buf_;
|
||||||
|
}
|
||||||
|
bool operator!=(const self_type &other) const
|
||||||
|
{
|
||||||
|
return pos_ != other.pos_ && buf_ == other.buf_;
|
||||||
|
}
|
||||||
|
bool operator>(const self_type &other) const
|
||||||
|
{
|
||||||
|
return pos_ > other.pos_;
|
||||||
|
}
|
||||||
|
bool operator>=(const self_type &other) const
|
||||||
|
{
|
||||||
|
return pos_ >= other.pos_;
|
||||||
|
}
|
||||||
|
bool operator<(const self_type &other) const
|
||||||
|
{
|
||||||
|
return pos_ < other.pos_;
|
||||||
|
}
|
||||||
|
bool operator<=(const self_type &other) const
|
||||||
|
{
|
||||||
|
return pos_ <= other.pos_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
cbuf_type *buf_;
|
||||||
|
size_type pos_;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename circular_buffer_iterator_t>
|
||||||
|
circular_buffer_iterator_t operator+
|
||||||
|
(const typename circular_buffer_iterator_t::difference_type &a,
|
||||||
|
const circular_buffer_iterator_t &b)
|
||||||
|
{
|
||||||
|
return circular_buffer_iterator_t(a) + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename circular_buffer_iterator_t>
|
||||||
|
circular_buffer_iterator_t operator-
|
||||||
|
(const typename circular_buffer_iterator_t::difference_type &a,
|
||||||
|
const circular_buffer_iterator_t &b)
|
||||||
|
{
|
||||||
|
return circular_buffer_iterator_t(a) - b;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* circular_buffer
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class provides a circular buffer in the STL style.
|
||||||
|
*
|
||||||
|
* You can add data to the end using the @ref push_back function, read data
|
||||||
|
* using @ref front() and remove data using @ref pop_front().
|
||||||
|
*
|
||||||
|
* The class also provides random access through the @ref operator[]()
|
||||||
|
* function and its random access iterator. Subscripting the array with
|
||||||
|
* an invalid (out of range) index number leads to undefined results, both
|
||||||
|
* for reading and writing.
|
||||||
|
*
|
||||||
|
* This class template accepts three template parameters:
|
||||||
|
* <li> T The type of object contained
|
||||||
|
* <li> always_accept_data_when_full Determines the behaviour of
|
||||||
|
* @ref push_back when the buffer is full.
|
||||||
|
* Set to true new data is always added, the
|
||||||
|
* old "end" data is thrown away.
|
||||||
|
* Set to false, the new data is not added.
|
||||||
|
* No error is returned neither is an
|
||||||
|
* exception raised.
|
||||||
|
* <li> Alloc Allocator type to use (in line with other
|
||||||
|
* STL containers).
|
||||||
|
*
|
||||||
|
* @short STL style circule buffer
|
||||||
|
* @author Pete Goodliffe
|
||||||
|
* @version 1.00
|
||||||
|
*/
|
||||||
|
template <typename T,
|
||||||
|
bool always_accept_data_when_full = true,
|
||||||
|
typename Alloc = std::allocator<T> >
|
||||||
|
class circular_buffer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
version_major = 1,
|
||||||
|
version_minor = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
// Typedefs
|
||||||
|
typedef circular_buffer<T, always_accept_data_when_full, Alloc>
|
||||||
|
self_type;
|
||||||
|
|
||||||
|
typedef Alloc allocator_type;
|
||||||
|
|
||||||
|
typedef typename Alloc::value_type value_type;
|
||||||
|
typedef typename Alloc::pointer pointer;
|
||||||
|
typedef typename Alloc::const_pointer const_pointer;
|
||||||
|
typedef typename Alloc::reference reference;
|
||||||
|
typedef typename Alloc::const_reference const_reference;
|
||||||
|
|
||||||
|
typedef typename Alloc::size_type size_type;
|
||||||
|
typedef typename Alloc::difference_type difference_type;
|
||||||
|
|
||||||
|
typedef circular_buffer_iterator
|
||||||
|
<self_type, self_type>
|
||||||
|
iterator;
|
||||||
|
typedef circular_buffer_iterator
|
||||||
|
<const self_type, self_type, const value_type>
|
||||||
|
const_iterator;
|
||||||
|
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||||
|
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||||
|
|
||||||
|
// Lifetime
|
||||||
|
enum { default_capacity = 100 };
|
||||||
|
explicit circular_buffer(size_type capacity = default_capacity)
|
||||||
|
: array_(alloc_.allocate(capacity)), array_size_(capacity),
|
||||||
|
head_(1), tail_(0), contents_size_(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
circular_buffer(const circular_buffer &other)
|
||||||
|
: array_(alloc_.allocate(other.array_size_)),
|
||||||
|
array_size_(other.array_size_),
|
||||||
|
head_(other.head_), tail_(other.tail_),
|
||||||
|
contents_size_(other.contents_size_)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
assign_into(other.begin(), other.end());
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
destroy_all_elements();
|
||||||
|
alloc_.deallocate(array_, array_size_);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
template <class InputIterator>
|
||||||
|
circular_buffer(InputIterator from, InputIterator to)
|
||||||
|
: array_(alloc_.allocate(1)), array_size_(1),
|
||||||
|
head_(1), tail_(0), contents_size_(0)
|
||||||
|
{
|
||||||
|
circular_buffer tmp;
|
||||||
|
tmp.assign_into_reserving(from, to);
|
||||||
|
swap(tmp);
|
||||||
|
}
|
||||||
|
~circular_buffer()
|
||||||
|
{
|
||||||
|
destroy_all_elements();
|
||||||
|
alloc_.deallocate(array_, array_size_);
|
||||||
|
}
|
||||||
|
circular_buffer &operator=(const self_type &other)
|
||||||
|
{
|
||||||
|
circular_buffer tmp(other);
|
||||||
|
swap(tmp);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
void swap(circular_buffer &other)
|
||||||
|
{
|
||||||
|
std::swap(array_, other.array_);
|
||||||
|
std::swap(array_size_, other.array_size_);
|
||||||
|
std::swap(head_, other.head_);
|
||||||
|
std::swap(tail_, other.tail_);
|
||||||
|
std::swap(contents_size_, other.contents_size_);
|
||||||
|
}
|
||||||
|
allocator_type get_allocator() const { return alloc_; }
|
||||||
|
|
||||||
|
// Iterators
|
||||||
|
iterator begin() { return iterator(this, 0); }
|
||||||
|
iterator end() { return iterator(this, size()); }
|
||||||
|
|
||||||
|
const_iterator begin() const { return const_iterator(this, 0); }
|
||||||
|
const_iterator end() const { return const_iterator(this, size()); }
|
||||||
|
|
||||||
|
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||||
|
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||||
|
|
||||||
|
const_reverse_iterator rbegin() const
|
||||||
|
{
|
||||||
|
return const_reverse_iterator(end());
|
||||||
|
}
|
||||||
|
const_reverse_iterator rend() const
|
||||||
|
{
|
||||||
|
return const_reverse_iterator(begin());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Size
|
||||||
|
size_type size() const { return contents_size_; }
|
||||||
|
size_type capacity() const { return array_size_; }
|
||||||
|
bool empty() const { return !contents_size_; }
|
||||||
|
size_type max_size() const
|
||||||
|
{
|
||||||
|
return alloc_.max_size();
|
||||||
|
}
|
||||||
|
void reserve(size_type new_size)
|
||||||
|
{
|
||||||
|
if (capacity() < new_size)
|
||||||
|
{
|
||||||
|
circular_buffer tmp(new_size);
|
||||||
|
tmp.assign_into(begin(), end());
|
||||||
|
swap(tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Accessing
|
||||||
|
reference front() { return array_[head_]; }
|
||||||
|
reference back() { return array_[tail_]; }
|
||||||
|
const_reference front() const { return array_[head_]; }
|
||||||
|
const_reference back() const { return array_[tail_]; }
|
||||||
|
|
||||||
|
void push_back(const value_type &item)
|
||||||
|
{
|
||||||
|
size_type next = next_tail();
|
||||||
|
if (contents_size_ == array_size_)
|
||||||
|
{
|
||||||
|
if (always_accept_data_when_full)
|
||||||
|
{
|
||||||
|
array_[next] = item;
|
||||||
|
increment_head();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alloc_.construct(array_ + next, item);
|
||||||
|
}
|
||||||
|
increment_tail();
|
||||||
|
}
|
||||||
|
void pop_front()
|
||||||
|
{
|
||||||
|
size_type destroy_pos = head_;
|
||||||
|
increment_head();
|
||||||
|
alloc_.destroy(array_ + destroy_pos);
|
||||||
|
}
|
||||||
|
void clear()
|
||||||
|
{
|
||||||
|
for (size_type n = 0; n < contents_size_; ++n)
|
||||||
|
{
|
||||||
|
alloc_.destroy(array_ + index_to_subscript(n));
|
||||||
|
}
|
||||||
|
head_ = 1;
|
||||||
|
tail_ = contents_size_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
reference operator[](size_type n) { return at_unchecked(n); }
|
||||||
|
const_reference operator[](size_type n) const { return at_unchecked(n); }
|
||||||
|
|
||||||
|
reference at(size_type n) { return at_checked(n); }
|
||||||
|
const_reference at(size_type n) const { return at_checked(n); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
reference at_unchecked(size_type index) const
|
||||||
|
{
|
||||||
|
return array_[index_to_subscript(index)];
|
||||||
|
}
|
||||||
|
|
||||||
|
reference at_checked(size_type index) const
|
||||||
|
{
|
||||||
|
if (size >= contents_size_)
|
||||||
|
{
|
||||||
|
throw std::out_of_range();
|
||||||
|
}
|
||||||
|
return at_unchecked(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rounds an unbounded to an index into array_
|
||||||
|
size_type normalise(size_type n) const { return n % array_size_; }
|
||||||
|
|
||||||
|
// Converts external index to an array subscript
|
||||||
|
size_type index_to_subscript(size_type index) const
|
||||||
|
{
|
||||||
|
return normalise(index + head_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void increment_tail()
|
||||||
|
{
|
||||||
|
++contents_size_;
|
||||||
|
tail_ = next_tail();
|
||||||
|
}
|
||||||
|
|
||||||
|
size_type next_tail()
|
||||||
|
{
|
||||||
|
return (tail_ + 1 == array_size_) ? 0 : tail_ + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void increment_head()
|
||||||
|
{
|
||||||
|
// precondition: !empty()
|
||||||
|
++head_;
|
||||||
|
--contents_size_;
|
||||||
|
if (head_ == array_size_) head_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename f_iter>
|
||||||
|
void assign_into(f_iter from, f_iter to)
|
||||||
|
{
|
||||||
|
if (contents_size_) clear();
|
||||||
|
while (from != to)
|
||||||
|
{
|
||||||
|
push_back(*from);
|
||||||
|
++from;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename f_iter>
|
||||||
|
void assign_into_reserving(f_iter from, f_iter to)
|
||||||
|
{
|
||||||
|
if (contents_size_) clear();
|
||||||
|
while (from != to)
|
||||||
|
{
|
||||||
|
if (contents_size_ == array_size_)
|
||||||
|
{
|
||||||
|
reserve(static_cast<size_type>(array_size_ * 1.5));
|
||||||
|
}
|
||||||
|
push_back(*from);
|
||||||
|
++from;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void destroy_all_elements()
|
||||||
|
{
|
||||||
|
for (size_type n = 0; n < contents_size_; ++n)
|
||||||
|
{
|
||||||
|
alloc_.destroy(array_ + index_to_subscript(n));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allocator_type alloc_;
|
||||||
|
value_type *array_;
|
||||||
|
size_type array_size_;
|
||||||
|
size_type head_;
|
||||||
|
size_type tail_;
|
||||||
|
size_type contents_size_;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T,
|
||||||
|
bool consume_policy,
|
||||||
|
typename Alloc>
|
||||||
|
bool operator==(const circular_buffer<T, consume_policy, Alloc> &a,
|
||||||
|
const circular_buffer<T, consume_policy, Alloc> &b)
|
||||||
|
{
|
||||||
|
return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T,
|
||||||
|
bool consume_policy,
|
||||||
|
typename Alloc>
|
||||||
|
bool operator!=(const circular_buffer<T, consume_policy, Alloc> &a,
|
||||||
|
const circular_buffer<T, consume_policy, Alloc> &b)
|
||||||
|
{
|
||||||
|
return a.size() != b.size() || !std::equal(a.begin(), a.end(), b.begin());
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T,
|
||||||
|
bool consume_policy,
|
||||||
|
typename Alloc>
|
||||||
|
bool operator<(const circular_buffer<T, consume_policy, Alloc> &a,
|
||||||
|
const circular_buffer<T, consume_policy, Alloc> &b)
|
||||||
|
{
|
||||||
|
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user