# US 2014/0156227 A1 · Time stamping a sensor sample

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0156227 A1
- Document ID: US20140156227A1
- Status: Published application
- Kind: A1
- Application number: 13/689,902
- Filed: 2012-11-30
- Published: 2014-06-05
- Earliest claimed: 2012-11-30
- Assignees: Research In Motion Limited
- Applicants: Research In Motion Limited
- Inventors: Christopher James GRANT; Robert George OLIVER; Nathan Daniel Pozniak BUCHANAN
- Web page: https://patentgrep.com/patent/US20140156227A1

## CPC

- G01D 9/005: {Solid-state data loggers}
- G01D 21/00: Measuring or testing not otherwise provided for
- G06F 17/00: Digital computing or data processing equipment or methods, specially adapted for specific functions (information retrieval, database structures or file system structures therefor G06F16/00)
- G01D: MEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and devices for determining a timestamp that represents a time a sensor sample was generated are described. In one aspect, a method includes: obtaining a sampling rate estimate for the sensor; determining an expected sample time based on the sampling rate estimate; detecting a sensor sample and assigning a reporting time to the detected sensor sample, the reporting time representing the time when the sensor sample was detected; and determining the timestamp for the sensor sample based on the expected sample time and the reporting time.

## Claims

### Claim 1

A processor implemented method of associating a sensor sample with a timestamp, the method comprising:
obtaining a sampling rate estimate for the sensor;
determining an expected sample time based on the sampling rate estimate;
detecting a sensor sample and assigning a reporting time to the detected sensor sample, the reporting time representing the time when the sensor sample was detected; and
determining the timestamp for the sensor sample based on the expected sample time and the reporting time.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
detecting a skipped sensor sample by:
when the reporting time for the sensor sample indicates a later time than the expected sample time, quantifying the lateness of the sensor sample by determining the difference between the reporting time for the sensor sample and the expected sample time; and
comparing the quantified lateness to one or more predetermined thresholds.

### Claim 3 (depends on 2)

The method of claim 2, wherein comparing the quantified lateness to one or more predetermined thresholds comprises comparing the quantified lateness to a first threshold,
and wherein detecting a skipped sensor sample further comprises:
when the quantified lateness is less than the first threshold, determining that a sensor sample was not skipped.

### Claim 4 (depends on 3)

The method of claim 3, wherein comparing the quantified lateness to one or more predetermined thresholds comprises:
comparing the quantified lateness to a second threshold, and when the quantified lateness is greater than the second threshold, determining that a sensor sample was skipped; and
when the quantified lateness is greater than the first threshold and less than the second threshold, performing an analysis on one or more subsequent sensor samples to determine whether a sensor sample was skipped.

### Claim 5 (depends on 4)

The method of claim 4, wherein performing an analysis on one or more subsequent sensor samples to determine whether a sensor sample was skipped comprises:
determining whether at least a predetermined number of successive subsequent sensor samples are late and, if so, determining that a sensor sample was skipped.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining whether a predetermined number of successive subsequent sensor samples are late comprises:
using a counter to count the number of subsequent consecutive sensor samples having a quantified lateness exceeding a predetermined threshold;
if the counter exceeds a predetermined limit, determining that a sensor sample was skipped.

### Claim 7 (depends on 2)

The method of claim 2, further comprising:
when a skipped sensor sample is detected, updating an expected sample time to reflect the skipped sensor sample.

### Claim 8 (depends on 2)

The method of claim 2, wherein, when a skipped sensor sample is detected, the timestamp is determined with regard for the skipped sensor sample.

### Claim 9 (depends on 1)

The method of claim 1, wherein determining a timestamp for the sample based on the expected sample time and the reporting time comprises:
determining the timestamp for the sample as a weighted average of the expected sample time and the reporting time.

### Claim 10 (depends on 9)

The method of claim 9, wherein determining the timestamp for the sensor sample as a weighted average of the expected sample time and the reporting time comprises:
selecting a first weight set if the sensor sample is early;
selecting a second weight set if the sensor sample is late, wherein the first weight set has a stronger preference for the reporting time than the second weight set; and
determining the timestamp as a weighted average of the expected sample time and the reporting time using the selected weight set.

### Claim 11 (depends on 1)

The method of claim 1, wherein the sensor is a gyroscope, the method further comprising:
determining an orientation based on the sensor sample and the timestamp.

### Claim 12 (depends on 1)

The method of claim 1, further comprising:
updating the sampling rate estimate based on the reporting time for the detected sensor sample.

### Claim 13 (depends on 4)

The method of claim 4, further comprising:
when the quantified lateness is greater than the second threshold, detecting whether a plurality of successive sensor samples were skipped.

### Claim 14 (depends on 13)

The method of claim 13, wherein detecting whether a plurality of successive sensor samples were skipped comprises:
adjusting the expected sample time to account for the skipped sensor sample; and
when the reporting time indicates a later time than the adjusted expected sample time, re-quantifying lateness of the sensor sample by determining the difference between the reporting time and the adjusted expected sample time; and
comparing the re-quantified lateness to the second threshold, and when the re-quantified lateness is greater than the second threshold, determining that a second sensor sample was skipped.

### Claim 15 (depends on 1)

The method of claim 1, further comprising:
classifying a sensor sample as either: on time, late, or very late, by comparing the difference between the expected sample time and the reporting time to one or more predetermined thresholds;
if the sensor sample was late, monitoring whether subsequent sensor samples are either late or very late; and
if at least a predetermined number of successive subsequent sensor samples are late or very late, determining that a sensor sample was skipped.

### Claim 16 (depends on 15)

The method of claim 15, further comprising:
if the sensor sample was very late, determining that a sensor sample has been skipped.

### Claim 17

An electronic device comprising:
a sensor; and
a processor coupled to the sensor, the processor being configured to:
obtain a sampling rate estimate for the sensor;
determine an expected sample time based on the sampling rate estimate;
detect a sensor sample and assign a reporting time to the detected sensor sample, the reporting time representing the time when the sensor sample was detected; and
determine a timestamp for the sensor sample based on the expected sample time and the reporting time.

### Claim 18 (depends on 17)

The electronic device of claim 17, wherein the processor is further configured to:
detect a skipped sensor sample by:
when the reporting time for the sensor sample indicates a later time than the expected sample time, quantifying the lateness of the sensor sample by determining the difference between the reporting time for the sensor sample and the expected sample time; and
comparing the quantified lateness to one or more predetermined thresholds.

### Claim 19 (depends on 17)

The electronic device of claim 17, wherein the sensor is a gyroscope and wherein the processor is further configured to determine an orientation based on the sensor sample and the timestamp.

### Claim 20

A computer readable storage medium comprising computer-executable instructions for associating a sensor sample with a timestamp, the computer-executable instructions comprising:
instructions for obtaining a sampling rate estimate for the sensor;
instructions for determining an expected sample time based on the sampling rate estimate;
instructions for detecting a sensor sample and assigning a reporting time to the detected sensor sample, the reporting time representing the time when the sensor sample was detected; and
instructions for determining a timestamp for the sensor sample based on the expected sample time and the reporting time.
