For the analysis of sprint events, the sensor node was fixed at the shank close to the ankle (figure 2 a), and the data of the
triaxial accelerometer (resolution of 16 bit and ±16g range) and the gyroscope (resolution of 16 bit and ±1000 deg/s range) are
analyzed. An algorithm for the automatic detection of stance duration was developed in R [12] based on a previous recorded data
set and subsequently implemented on the MPU. Stance durations (tS) during the phase of maximal velocity are extracted onboard
from the acceleration along the longitudinal axis of the shank (Ax) and angular velocity around the z-axis (Gz) in sagittal
direction of the shank. The acceleration and the angular velocity vectors are represented in the unit- embedded coordinate system
(figure 2, b) and processed without filtering the raw data. The developed algorithm for parameter extraction is based on a peak
detection method to identify landing and takeoff from the Ax acceleration and works as follows: The initial ground contact is
searched around the point where the vertical acceleration exceeds a critical threshold (usually 5g) and simultaneously the angular
velocity Gz yields a continuous slope. Time of the first ground contact is set as the minimum at the beginning of the large peak in
Ax. After a individually scalable dead time (usually 90ms) starting at initial ground contact, a global minimum in Ax within a
definable time window (usually 150ms) is set as takeoff. Stance duration is determined by the first (landing) and last (takeoff)
ground contact of the feet.To avoid sensor drift, a reset of the analog and digital signal paths of the gyroscope and accelerometer
is done periodically after each step. Additionally, the used sensors include enhanced bias and sensitivity temperature stability to
reduce the occurrence and extent of drift. Because of nearly stable conditions for the duration of sprints (up to 60 seconds during
long sprint) reliable measurements are possible over this period of time.这是关于IMU的一篇论文中的一段,请问这段用伪代码怎么写啊 急!求帮忙 其中加粗部分怎么理解