diff --git a/flight/libraries/sanitycheck.c b/flight/libraries/sanitycheck.c index 270543f24..665f167d3 100644 --- a/flight/libraries/sanitycheck.c +++ b/flight/libraries/sanitycheck.c @@ -38,6 +38,7 @@ #include #include #include +#include #include // a number of useful macros @@ -79,10 +80,17 @@ int32_t configuration_check() break; default: navCapableFusion = false; + // check for hitl. hitl allows to feed position and velocity state via + // telemetry, this makes nav possible even with an unsuited algorithm + if (PositionStateHandle()) { + if (PositionStateReadOnly()) { + navCapableFusion = true; + } + } } #else const bool navCapableFusion = false; -#endif +#endif /* ifdef REVOLUTION */ // Classify airframe type