diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index ef9727cedc..ebc4ffb5cf 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -40,8 +40,10 @@ */ #include "ekf.h" +#ifdef __PX4_POSIX #include #include +#endif #include #include @@ -79,6 +81,7 @@ void Ekf::resetPosition() _state.pos(2) = baro_newest.hgt; } +#ifdef __PX4_POSIX void Ekf::printCovToFile(char const *filename) { std::ofstream myfile; @@ -94,6 +97,7 @@ void Ekf::printCovToFile(char const *filename) myfile << "\n\n\n\n\n\n\n\n\n\n"; } } +#endif // This checks if the diagonal of the covariance matrix is non-negative // and that the matrix is symmetric