diff options
author | Charles Lohr <lohr85@gmail.com> | 2018-04-04 04:06:31 +0000 |
---|---|---|
committer | Charles Lohr <lohr85@gmail.com> | 2018-04-04 04:06:31 +0000 |
commit | 22301a092b4009c4f2ca2bc8be4511d75e3082b6 (patch) | |
tree | 4c71fccc306b9472362e3454e1d5eb3a27adf1ea /src/poser_charlesrefine.c | |
parent | 34c6afbd52b7a6109d563ce17d082072b16ee032 (diff) | |
download | libsurvive-22301a092b4009c4f2ca2bc8be4511d75e3082b6.tar.gz libsurvive-22301a092b4009c4f2ca2bc8be4511d75e3082b6.tar.bz2 |
Tweak to paraemters to fix performance of gyro
Diffstat (limited to 'src/poser_charlesrefine.c')
-rw-r--r-- | src/poser_charlesrefine.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/poser_charlesrefine.c b/src/poser_charlesrefine.c index 9aa44d9..c1cc6de 100644 --- a/src/poser_charlesrefine.c +++ b/src/poser_charlesrefine.c @@ -42,9 +42,9 @@ int PoserCharlesRefine(SurviveObject *so, PoserData *pd) { //TODO: Actually do Madgwick's algorithm LinmathQuat applymotion; const SurvivePose * object_pose = &so->OutPose; - imuData->gyro[0] *= -0.001; - imuData->gyro[1] *= -0.001; - imuData->gyro[2] *= 0.001; + imuData->gyro[0] *= -0.0005; + imuData->gyro[1] *= -0.0005; + imuData->gyro[2] *= 0.0005; quatfromeuler( applymotion, imuData->gyro ); //printf( "%f %f %f\n", imuData->gyro [0], imuData->gyro [1], imuData->gyro [2] ); SurvivePose object_pose_out; @@ -156,8 +156,8 @@ int PoserCharlesRefine(SurviveObject *so, PoserData *pd) { #define MIN_HIT_QUALITY 0.5 //Determines which hits to cull. #define HIT_QUALITY_BASELINE 0.0001 //Determines which hits to cull. Actually SQRT(baseline) if 0.0001, it is really 1cm -#define CORRECT_LATERAL_POSITION_COEFFICIENT 0.1 //Explodes if you exceed 1.0 -#define CORRECT_TELESCOPTION_COEFFICIENT 0.5 //Converges even as high as 10.0 and doesn't explode. +#define CORRECT_LATERAL_POSITION_COEFFICIENT 0.8 //Explodes if you exceed 1.0 +#define CORRECT_TELESCOPTION_COEFFICIENT 8.0 //Converges even as high as 10.0 and doesn't explode. #define CORRECT_ROTATION_COEFFICIENT 1.0 //This starts to fall apart above 5.0, but for good reason. It is amplified by the number of points seen. #define ROTATIONAL_CORRECTION_MAXFORCE 0.10 |