Functions to sync optical and passive data with active_wire system. More...
Functions | |
bool | IsOdd (const vector< double > i) |
int | sync_opti_active (vector< vector< double > > &active_wire_data, vector< vector< double > > &optical_data, int num_opti_markers) |
Sync optical data with active_wire system. | |
int | filter_sync_passive_active (vector< vector< double > > active_wire_data, vector< vector< double > > &passive_wire_data) |
Filter and sync passive wire data with active wire data. | |
double | adj_labview_tmstamp (double tmstamp) |
Change from Labview epoch to UTC epoch. |
Functions to sync optical and passive data with active_wire system.
double adj_labview_tmstamp | ( | double | tmstamp | ) |
Change from Labview epoch to UTC epoch.
Labview uses a different epoch for timestamps unlike UTC/Unix timestamps. This functions adjusts the Labview timestamps by adding the UTC value of the epoch 1/1/1904, 0:0:0 to Labview value.
[in,out] | tmpstamp | Number of seconds elapsed since epoch |
Referenced by load_passive_data().
int filter_sync_passive_active | ( | vector< vector< double > > | active_wire_data, |
vector< vector< double > > & | passive_wire_data | ||
) |
Filter and sync passive wire data with active wire data.
Change the timestamps from Labview format to UTC time, filter out the noise and discard all data taken before active_wire system has begun, and downsample from 1Khz to approx 100 Hz (synchronizing with active data)
[in] | active_wire_data | Active wire data needed to synchronize passive data |
[in,out] | passive_wire_data | Passive wire data to remove spurious noise. |
References extract_data_point(), and gsl_low_pass_filter_data().
Referenced by load_all_measures().
bool IsOdd | ( | const vector< double > | i | ) |
int sync_opti_active | ( | vector< vector< double > > & | active_wire_data, |
vector< vector< double > > & | optical_data, | ||
int | num_opti_markers | ||
) |
Sync optical data with active_wire system.
Active wire system has relatively low levels of measurement noise. Hence it is quite suitable for syncing optical data. This function would ideally perform best when used with readings of active wire 1,3 or 4. Function to be run before assigning optical data vector to tibia or femur structures
References first_local_extrema_vec(), IsOdd(), and opti_first_extrema().
Referenced by load_all_measures().