transform_data

transform_data.stride_measurement module

transform_data.stride_measurement.main()[source]

Main execution function for the IMU + GPS gait analysis pipeline.

This function performs the following steps:

  • Parses command-line arguments.

  • Loads and resamples sensor data from Excel.

  • Detects stationary periods.

  • Estimates orientation and position using Madgwick filter.

  • Fuses GPS and IMU data using a Kalman Filter.

  • Computes stride-level metrics and filters invalid steps.

  • Evaluates trajectory quality and segment-level metrics.

  • Optionally exports data to Excel and generates plots/maps.

Dependencies include several processors from the msGeom package, including:

  • DataPreprocessor

  • IMUProcessor

  • KalmanProcessor

  • DetectPeaks

  • ResultsProcessor

  • StrideProcessor

  • PlotProcessor

transform_data.stride_measurement.parse_args()[source]

Parse command-line arguments for the IMU data processing pipeline.

Returns:

Parsed command-line arguments.

Return type:

argparse.Namespace

Command-line Arguments:

  • -f, --file_path (str, required): Path to the input Excel file.

  • -v, --verbose (int, optional): Verbosity level (default: 3).

  • -c, --config (str, optional): Path to the YAML configuration file (default: .config.yaml).

  • -om, --output_mode (str, optional): How to handle output plots. Options: “screen”, “save”, “both” (default: screen).

  • -o, --output_dir (str, optional): Directory where output plots will be saved.

  • -e, --export_excel (str, optional): Whether to export results to Excel. Options: “yes”, “no” (default: yes).

  • -m, --map_html (str, optional): Whether to generate an interactive HTML map. Options: “yes”, “no” (default: no).