Skip to content

Commit f14dfdb

Browse files
AkseiAKuederle
authored andcommitted
Update _piece_wise_linear_dedrifted_integration.py
1 parent 1e0b49d commit f14dfdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gaitmap_mad/gaitmap_mad/trajectory_reconstruction/position_methods/_piece_wise_linear_dedrifted_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ def estimate(self, data: SingleSensorData, *, sampling_rate_hz: float, **_) -> S
181181
# shift zupts to fit to the padded acc data!
182182
zupts_padded = self.zupts_ + 1
183183

184-
velocity = cumtrapz(acc_data_padded, axis=0, initial=0) / self.sampling_rate_hz
184+
velocity = cumulative_trapezoid(acc_data_padded, axis=0, initial=0) / self.sampling_rate_hz
185185
drift_model = self._estimate_piece_wise_linear_drift_model(velocity, zupts_padded)
186186
velocity -= drift_model
187187

188-
position = cumtrapz(velocity, axis=0, initial=0) / self.sampling_rate_hz
188+
position = cumulative_trapezoid(velocity, axis=0, initial=0) / self.sampling_rate_hz
189189

190190
if self.level_assumption is True:
191191
position[:, -1] -= self._estimate_piece_wise_linear_drift_model(position[:, -1], zupts_padded)

0 commit comments

Comments
 (0)