1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP-1371 treat hitl as nav capable fusion algorithm if positionstate is set by sim

This commit is contained in:
Corvus Corax 2014-06-18 21:29:55 +02:00
parent dfdce20044
commit b40a114a0a

View File

@ -38,6 +38,7 @@
#include <systemsettings.h>
#include <systemalarms.h>
#include <revosettings.h>
#include <positionstate.h>
#include <taskinfo.h>
// 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