摘要 |
Examples include systems and methods for adjusting interrupt timestamps associated with sensor measurement data. One method includes receiving from a sensor an interrupt signal, storing an interrupt timestamp corresponding to the interrupt signal, and determining expected sampling rates associated with the sensor. The method also includes determining a first minimal latency timestamp based on a comparison of one or more previously stored interrupt timestamps and the expected sampling rates, and determining a second minimal latency timestamp based on the interrupt timestamp, one or more previously stored interrupt timestamps, and the expected sampling rates. The method also includes determining an estimated sampling rate of the sensor based on the first and second minimal latency timestamps, and determining an adjusted interrupt timestamp corresponding to the interrupt signal based on the estimated sampling rate and the interrupt timestamp. |
主权项 |
1. A method comprising:
receiving, by a processor from a sensor, an interrupt signal; storing, by the processor, an interrupt timestamp corresponding to the interrupt signal; determining, by the processor, a plurality of expected sampling rates associated with the sensor, wherein a given sampling rate is based on a sampling time period; determining, by the processor, a first minimal latency timestamp based on a comparison of one or more previously stored interrupt timestamps and the plurality of expected sampling rates; determining, by the processor, a second minimal latency timestamp based on the interrupt timestamp, one or more previously stored interrupt timestamps, and the plurality of expected sampling rates, wherein the second minimal latency timestamp indicates an interrupt timestamp among the interrupt timestamp and the one or more previously stored interrupt timestamps whose value results in a smallest latency value; determining, by the processor, an estimated sampling rate of the sensor based on the first minimal latency timestamp and the second minimal latency timestamp; and determining, by the processor, an adjusted interrupt timestamp corresponding to the interrupt signal based on the estimated sampling rate and the interrupt timestamp. |