aboutsummaryrefslogtreecommitdiff
path: root/src/poser_turveytori.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/poser_turveytori.c')
-rw-r--r--src/poser_turveytori.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/poser_turveytori.c b/src/poser_turveytori.c
index 2d3f802..4628207 100644
--- a/src/poser_turveytori.c
+++ b/src/poser_turveytori.c
@@ -13,6 +13,8 @@
#include <stdlib.h>
#else
#include <malloc.h> //for alloca
+#include <survive_reproject.h>
+
#endif
@@ -1443,7 +1445,7 @@ static Point SolveForLighthouse(FLT posOut[3], FLT quatOut[4], TrackedObject *ob
lighthousePose.Pos[1] = refinedEstimateGd.y;
lighthousePose.Pos[2] = refinedEstimateGd.z;
- SurvivePose assumedObj = {};
+ SurvivePose assumedObj = {0};
FLT negZ[3] = {0, 0, 1};
quatfrom2vectors(assumedObj.Rot, toriData->down, negZ);
@@ -1786,8 +1788,12 @@ int PoserTurveyTori( SurviveObject * so, PoserData * poserData )
to->sensor[sensorCount].point.x = point[0];
to->sensor[sensorCount].point.y = point[1];
to->sensor[sensorCount].point.z = point[2];
- to->sensor[sensorCount].theta = fs->angles[i][0][0] + LINMATHPI / 2; // lighthouse 0, angle 0 (horizontal)
- to->sensor[sensorCount].phi = fs->angles[i][0][1] + LINMATHPI / 2; // lighthouse 0, angle 1 (vertical)
+
+ FLT out[2];
+ survive_apply_bsd_calibration(ctx, 0, fs->angles[i][0], out);
+
+ to->sensor[sensorCount].theta = out[0] + LINMATHPI / 2; // lighthouse 0, angle 0 (horizontal)
+ to->sensor[sensorCount].phi = out[1] + LINMATHPI / 2; // lighthouse 0, angle 1 (vertical)
sensorCount++;
}
@@ -1822,8 +1828,12 @@ int PoserTurveyTori( SurviveObject * so, PoserData * poserData )
to->sensor[sensorCount].point.x = point[0];
to->sensor[sensorCount].point.y = point[1];
to->sensor[sensorCount].point.z = point[2];
- to->sensor[sensorCount].theta = fs->angles[i][lh][0] + LINMATHPI / 2; // lighthouse 0, angle 0 (horizontal)
- to->sensor[sensorCount].phi = fs->angles[i][lh][1] + LINMATHPI / 2; // lighthosue 0, angle 1 (vertical)
+
+ FLT out[2];
+ survive_apply_bsd_calibration(ctx, lh, fs->angles[i][lh], out);
+
+ to->sensor[sensorCount].theta = out[0] + LINMATHPI / 2; // lighthouse 0, angle 0 (horizontal)
+ to->sensor[sensorCount].phi = out[1] + LINMATHPI / 2; // lighthosue 0, angle 1 (vertical)
sensorCount++;
}
}