diff options
author | cnlohr <charles@cnlohr.com> | 2018-04-27 21:42:05 -0400 |
---|---|---|
committer | cnlohr <charles@cnlohr.com> | 2018-04-27 21:42:05 -0400 |
commit | 86bbd12c3889db3290e22ff61934ca1a218ce114 (patch) | |
tree | 6d7c895a86f7cd88d0b7b3e0a461ccd5c2efa8b7 /src/poser_sba.c | |
parent | 76e1d700bf2b3eac225e3965bb562e16e3615fd5 (diff) | |
download | libsurvive-86bbd12c3889db3290e22ff61934ca1a218ce114.tar.gz libsurvive-86bbd12c3889db3290e22ff61934ca1a218ce114.tar.bz2 |
New config system
Diffstat (limited to 'src/poser_sba.c')
-rw-r--r-- | src/poser_sba.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/poser_sba.c b/src/poser_sba.c index ed19c1d..21dd74f 100644 --- a/src/poser_sba.c +++ b/src/poser_sba.c @@ -20,6 +20,14 @@ #include "survive_kalman.h" #include "survive_reproject.h" + +STATIC_CONFIG_ITEM( SBA_USE_IMU, "sba-use-imu", 'i', "[TODO: I don't know what this does]", 1 ); +STATIC_CONFIG_ITEM( SBA_REQUIRED_MEAS, "sba-required-meas", 'i', "[TODO: I don't know what this does]", 8 ); +STATIC_CONFIG_ITEM( SBA_TIME_WINDOW, "sba-time-window", 'i', "[TODO: I don't know what this does]", (int)SurviveSensorActivations_default_tolerance ); +STATIC_CONFIG_ITEM( SBA_SENSOR_VARIANCE_PER_SEC, "sba-sensor-variance-per-sec", 'f', "[TODO: I don't know what this does]", 10.0 ); +STATIC_CONFIG_ITEM( SBA_SENSOR_VARIANCE, "sba-sensor-variance", 'f', "[TODO: I don't know what this does]", 1.0 ); +STATIC_CONFIG_ITEM( SBA_USE_JACOBIAN_FUNCTION, "sba-use-jacobian-function", 'i', "Poser to be used to seed optimizer", 1); + typedef struct { PoserData *pdfs; SurviveObject *so; @@ -343,14 +351,13 @@ int PoserSBA(SurviveObject *so, PoserData *pd) { SBAData *d = so->PoserData; general_optimizer_data_init(&d->opt, so); - d->useIMU = survive_configi(ctx, "sba-use-imu", SC_GET, 1); - d->required_meas = survive_configi(ctx, "sba-required-meas", SC_GET, 8); - - d->sensor_time_window = - survive_configi(ctx, "sba-time-window", SC_GET, SurviveSensorActivations_default_tolerance * 2); - d->sensor_variance_per_second = survive_configf(ctx, "sba-sensor-variance-per-sec", SC_GET, 10.0); - d->sensor_variance = survive_configf(ctx, "sba-sensor-variance", SC_GET, 1.0); - d->use_jacobian_function = survive_configi(ctx, "sba-use-jacobian-function", SC_GET, 1.0); + + survive_attach_config( ctx, "sba-use-imu", &d->useIMU, 'i' ); + survive_attach_config( ctx, "sba-required-meas", &d->required_meas, 'i' ); + survive_attach_config( ctx, "sba-time-window", &d->sensor_time_window, 'i' ); + survive_attach_config( ctx, "sba-sensor-variance-per-sec", &d->sensor_variance_per_second, 'f' ); + survive_attach_config( ctx, "sba-sensor-variance", &d->sensor_variance, 'f' ); + survive_attach_config( ctx, "sba-use-jacobian-function", &d->use_jacobian_function, 'i' ); SV_INFO("Initializing SBA:"); SV_INFO("\tsba-required-meas: %d", d->required_meas); |