aboutsummaryrefslogtreecommitdiff
path: root/src/poser_turveytori.c
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-01 16:04:05 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-01 16:09:58 -0600
commit1724abef15a4090640bd82ba408681438316de7e (patch)
tree129d3eeaabe9d6e011897b33e8d8a2acaaae3ac9 /src/poser_turveytori.c
parent5384af65f9d63d095cb9987d36de57ccee323300 (diff)
downloadlibsurvive-1724abef15a4090640bd82ba408681438316de7e.tar.gz
libsurvive-1724abef15a4090640bd82ba408681438316de7e.tar.bz2
Made calibration on other posers use calibration data
Diffstat (limited to 'src/poser_turveytori.c')
-rw-r--r--src/poser_turveytori.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/poser_turveytori.c b/src/poser_turveytori.c
index 035fca7..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
@@ -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++;
}
}