summaryrefslogtreecommitdiffhomepage
path: root/proto-ft
diff options
context:
space:
mode:
Diffstat (limited to 'proto-ft')
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index 429ff72b..2c4a0bd1 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -41,12 +41,15 @@ freetrack::~freetrack()
void freetrack::pose(const double* headpose)
{
const float yaw = -degrees_to_rads(headpose[Yaw]);
- const float pitch = -degrees_to_rads(headpose[Pitch]);
const float roll = degrees_to_rads(headpose[Roll]);
const float tx = float(headpose[TX] * 10);
const float ty = float(headpose[TY] * 10);
const float tz = float(headpose[TZ] * 10);
+ // HACK: Falcon BMS makes a "bump" if pitch is over the value -sh 20170615
+ const bool is_crossing_90 = std::fabs(headpose[Pitch] - 90) < 1e-4;
+ const float pitch = -degrees_to_rads(is_crossing_90 ? 89.86 : headpose[Pitch]);
+
FTHeap* ft = pMemData;
FTData* data = &ft->data;