Index: /BDM.kdevelop.filelist
===================================================================
--- /BDM.kdevelop.filelist (revision 62)
+++ /BDM.kdevelop.filelist (revision 68)
@@ -1,4 +1,5 @@
 # KDevelop Custom Project File List
 CMakeLists.txt
+CMake_modules/FindITPP.cmake
 bdm
 bdm/CMakeLists.txt
@@ -23,4 +24,20 @@
 bdm/stat/libFN.h
 simulator_zdenek/CMakeLists.txt
+simulator_zdenek/ekf_example/CMakeLists.txt
+simulator_zdenek/ekf_example/ekf.cpp
+simulator_zdenek/ekf_example/ekf.h
+simulator_zdenek/ekf_example/ekf_obj.cpp
+simulator_zdenek/ekf_example/ekf_obj.h
+simulator_zdenek/ekf_example/fixed.cpp
+simulator_zdenek/ekf_example/fixed.h
+simulator_zdenek/ekf_example/matrix.cpp
+simulator_zdenek/ekf_example/matrix.h
+simulator_zdenek/ekf_example/pmsm_mod.cpp
+simulator_zdenek/ekf_example/pmsm_mod.h
+simulator_zdenek/ekf_example/pwm.cpp
+simulator_zdenek/ekf_example/pwm.h
+simulator_zdenek/ekf_example/regulace.cpp
+simulator_zdenek/ekf_example/regulace.h
+simulator_zdenek/ekf_example/simul.cpp
 simulator_zdenek/regulace.cpp
 simulator_zdenek/regulace.h
@@ -29,4 +46,6 @@
 tests/CMakeLists.txt
 tests/pmsm_sim.cpp
+tests/pmsm_sim2.cpp
+tests/pmsm_sim3.cpp
 tests/pmsm_unkQ.cpp
 tests/pmsm_unkQpf.cpp
@@ -39,2 +58,3 @@
 tests/testResample.cpp
 tests/testSmp.cpp
+tests/testbidiff.cpp
Index: /CMake_modules/FindITPP.cmake
===================================================================
--- /CMake_modules/FindITPP.cmake (revision 35)
+++ /CMake_modules/FindITPP.cmake (revision 68)
@@ -10,4 +10,5 @@
 FIND_PATH(ITPP_INCLUDE_DIR itpp/itbase.h
 	${ITPP_DIR}
+	/usr/pkgs64/include
   )
 
@@ -15,4 +16,5 @@
   NAMES itpp itpp_debug
   PATHS "${ITPP_DIR}\\win32\\lib"
+  /usr/pkgs64/lib
   )
 
Index: /CMakeLists.txt
===================================================================
--- /CMakeLists.txt (revision 62)
+++ /CMakeLists.txt (revision 68)
@@ -34,4 +34,11 @@
 
 ELSE(WIN32)
+	FIND_PACKAGE(ITPP REQUIRED)
+
+	IF(ITPP_FOUND)
+	   INCLUDE_DIRECTORIES(${ITPP_INCLUDE_DIR})
+	   LINK_DIRECTORIES(${NATIVE_ITPP_LIB_PATH})
+	ENDIF(ITPP_FOUND)
+
 	#This is for UNIX makefile which does only one release at a time.
 	SET(CMAKE_BUILD_TYPE Debug)
Index: /M.kdevelop
===================================================================
--- /BDM.kdevelop (revision 62)
+++  (revision )
@@ -1,234 +1,0 @@
-<?xml version = '1.0'?>
-<kdevelop>
-  <general>
-    <projectmanagement>KDevCustomProject</projectmanagement>
-    <projectdirectory>/home/smidl/work/mixpp</projectdirectory>
-    <absoluteprojectpath>true</absoluteprojectpath>
-    <author/>
-    <email/>
-    <version>$VERSION$</version>
-    <primarylanguage>C++</primarylanguage>
-    <ignoreparts>
-      <part>kdevsnippet</part>
-      <part>kdevfilter</part>
-    </ignoreparts>
-    <secondaryLanguages>
-      <language>C</language>
-    </secondaryLanguages>
-    <projectname>BDM</projectname>
-    <description/>
-    <defaultencoding/>
-    <versioncontrol>kdevsubversion</versioncontrol>
-  </general>
-  <kdevcustomproject>
-    <filelistdirectory>/home/smidl/work/mixpp</filelistdirectory>
-    <run>
-      <mainprogram>/home/smidl/work/mixpp/tests/pmsm_sim3</mainprogram>
-      <directoryradio>custom</directoryradio>
-      <customdirectory>/home/smidl/work/mixpp</customdirectory>
-      <programargs/>
-      <terminal>false</terminal>
-      <autocompile>true</autocompile>
-      <envvars/>
-      <globaldebugarguments/>
-      <globalcwd>/home/smidl/work/mixpp</globalcwd>
-      <useglobalprogram>false</useglobalprogram>
-      <autoinstall>false</autoinstall>
-      <autokdesu>false</autokdesu>
-    </run>
-    <build>
-      <buildtool>make</buildtool>
-      <builddir>/home/smidl/work/mixpp</builddir>
-    </build>
-    <make>
-      <abortonerror>true</abortonerror>
-      <numberofjobs>0</numberofjobs>
-      <dontact>false</dontact>
-      <makebin/>
-      <selectedenvironment>default</selectedenvironment>
-      <environments>
-        <default/>
-      </environments>
-      <prio>0</prio>
-      <defaulttarget/>
-      <makeoptions/>
-    </make>
-    <filetypes>
-      <filetype>*.java</filetype>
-      <filetype>*.h</filetype>
-      <filetype>*.H</filetype>
-      <filetype>*.hh</filetype>
-      <filetype>*.hxx</filetype>
-      <filetype>*.hpp</filetype>
-      <filetype>*.c</filetype>
-      <filetype>*.C</filetype>
-      <filetype>*.cc</filetype>
-      <filetype>*.cpp</filetype>
-      <filetype>*.c++</filetype>
-      <filetype>*.cxx</filetype>
-      <filetype>Makefile</filetype>
-      <filetype>CMakeLists.txt</filetype>
-    </filetypes>
-    <blacklist/>
-    <other>
-      <prio>0</prio>
-      <otherbin/>
-      <defaulttarget/>
-      <otheroptions/>
-      <selectedenvironment>default</selectedenvironment>
-      <environments>
-        <default/>
-      </environments>
-    </other>
-  </kdevcustomproject>
-  <kdevfilecreate>
-    <filetypes/>
-    <useglobaltypes>
-      <type ext="ui" />
-      <type ext="cpp" />
-      <type ext="h" />
-    </useglobaltypes>
-  </kdevfilecreate>
-  <kdevdoctreeview>
-    <projectdoc>
-      <userdocDir>html/</userdocDir>
-      <apidocDir>html/</apidocDir>
-    </projectdoc>
-    <ignoreqt_xml/>
-    <ignoredoxygen/>
-    <ignorekdocs/>
-    <ignoretocs/>
-    <ignoredevhelp/>
-  </kdevdoctreeview>
-  <cppsupportpart>
-    <filetemplates>
-      <interfacesuffix>.h</interfacesuffix>
-      <implementationsuffix>.cpp</implementationsuffix>
-    </filetemplates>
-  </cppsupportpart>
-  <kdevcppsupport>
-    <codecompletion>
-      <includeGlobalFunctions>true</includeGlobalFunctions>
-      <includeTypes>true</includeTypes>
-      <includeEnums>true</includeEnums>
-      <includeTypedefs>false</includeTypedefs>
-      <automaticCodeCompletion>true</automaticCodeCompletion>
-      <automaticArgumentsHint>true</automaticArgumentsHint>
-      <automaticHeaderCompletion>true</automaticHeaderCompletion>
-      <codeCompletionDelay>250</codeCompletionDelay>
-      <argumentsHintDelay>400</argumentsHintDelay>
-      <headerCompletionDelay>250</headerCompletionDelay>
-      <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
-      <completionBoxItemOrder>0</completionBoxItemOrder>
-      <howEvaluationContextMenu>true</howEvaluationContextMenu>
-      <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
-      <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
-      <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
-      <processPrimaryTypes>true</processPrimaryTypes>
-      <processFunctionArguments>false</processFunctionArguments>
-      <preProcessAllHeaders>false</preProcessAllHeaders>
-      <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
-      <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
-      <alwaysParseInBackground>true</alwaysParseInBackground>
-      <usePermanentCaching>true</usePermanentCaching>
-      <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
-      <includePaths>.;</includePaths>
-    </codecompletion>
-    <references/>
-    <qt>
-      <used>false</used>
-      <version>3</version>
-      <includestyle>3</includestyle>
-      <root>/usr/share/qt3</root>
-      <designerintegration>EmbeddedKDevDesigner</designerintegration>
-      <qmake>/usr/bin/qmake-qt3</qmake>
-      <designer></designer>
-      <designerpluginpaths/>
-    </qt>
-    <creategettersetter>
-      <prefixGet/>
-      <prefixSet>set</prefixSet>
-      <prefixVariable>m_,_</prefixVariable>
-      <parameterName>theValue</parameterName>
-      <inlineGet>true</inlineGet>
-      <inlineSet>true</inlineSet>
-    </creategettersetter>
-    <splitheadersource>
-      <enabled>false</enabled>
-      <synchronize>true</synchronize>
-      <orientation>Vertical</orientation>
-    </splitheadersource>
-  </kdevcppsupport>
-  <kdevfileview>
-    <groups>
-      <group pattern="CMakeLists.txt;*.cmake;" name="CMake" />
-      <group pattern="*.h;*.hxx" name="Header" />
-      <group pattern="*.cpp;*.c;*.C;*.cxx" name="Sources" />
-      <group pattern="*.ui" name="Qt Designer files" />
-      <hidenonprojectfiles>true</hidenonprojectfiles>
-      <hidenonlocation>false</hidenonlocation>
-    </groups>
-    <tree>
-      <hidepatterns>*.o,*.lo,CVS,*~,cmake*,Makefile</hidepatterns>
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-      <showvcsfields>false</showvcsfields>
-    </tree>
-  </kdevfileview>
-  <kdevdebugger>
-    <general>
-      <projectmanagement>KDevCustomProject</projectmanagement>
-      <projectdirectory>/home/smidl/work/mixpp</projectdirectory>
-      <absoluteprojectpath>true</absoluteprojectpath>
-      <gdbpath/>
-      <dbgshell/>
-      <configGdbScript/>
-      <runShellScript/>
-      <runGdbScript/>
-      <breakonloadinglibs>true</breakonloadinglibs>
-      <separatetty>false</separatetty>
-      <floatingtoolbar>false</floatingtoolbar>
-      <raiseGDBOnStart>false</raiseGDBOnStart>
-    </general>
-    <display>
-      <staticmembers>false</staticmembers>
-      <demanglenames>true</demanglenames>
-      <outputradix>10</outputradix>
-    </display>
-  </kdevdebugger>
-  <ctagspart>
-    <customArguments/>
-    <customTagfilePath>/home/smidl/work/mixpp/tags</customTagfilePath>
-    <activeTagsFiles/>
-  </ctagspart>
-  <kdevdocumentation>
-    <projectdoc>
-      <docsystem/>
-      <docurl/>
-      <usermanualurl/>
-    </projectdoc>
-  </kdevdocumentation>
-  <dist>
-    <custom>false</custom>
-    <bzip>false</bzip>
-    <archname/>
-    <appname>BDM</appname>
-    <version>$VERSION$</version>
-    <release/>
-    <vendor/>
-    <licence/>
-    <summary/>
-    <group/>
-    <packager/>
-    <description/>
-    <changelog/>
-    <devpackage>false</devpackage>
-    <docspackage>false</docspackage>
-    <appicon>false</appicon>
-    <arch>0</arch>
-    <genHTML>false</genHTML>
-    <useRPM>false</useRPM>
-    <ftpkde>false</ftpkde>
-    <appskde>false</appskde>
-    <url/>
-  </dist>
-</kdevelop>
