wiki:OakLog

OakLog Format Specification

An OakLog file is an ASCII text file. The file consists of data lines. Each line contains data in columns, separated with semicolon. All data on the same line, is viewed as having happened at the exact same time. The data columns are on the format: <name>=<value>

You are free to have any data on the lines. But the columns marked with bold are required on each line.

Value format

  • Time may be specified in two different formats:
    • Preferred: With time zone offset: YYYY-MM-DD HH:MM:SS.FRACTIONS TZOFFSET where TZOFFSET is +NNNN or Z.
    • Legacy: Without time zone offset: YYYY-MM-DD HH:MM:SS.FRACTIONS
      • Will be interpreted as UTC
  • Decimal numbers use a . as decimal point
  • Integer numbers contain digits and minus sign, no spaces or commas are allowed. Can contain special zero-specifiers (see below).
  • Strings contain ASCII characters

Integer format Zero-specifiers

Before parsing the string as an integer:
Replace G with 000000000 (9 zeros)
Replace M with 000000 (6 zeros)
Replace K with 000 (3 zeros)

Coordinate system

OakLog uses the same coordinate system for the values as Androids Sensor Events, see:  SensorEvent - Android Developers. Note however the exceptions for htcgx and htcgz.

Data Column Names

devutc (Date)
Device UTC Date and Time
devtick (Integer)
Device Tick Counter
devtfreq (Integer)
Device Ticks / Second.
src (String)
Source Name - Comma-separated list of names specifying what sensors were used to get this data line (mostly just one name)
gpstime (Date)
GPS UTC Date and Time
lat (Decimal)
Latitude in degrees (positive is North)
lon (Decimal)
Longitude in degrees (positive is East)
alt (Decimal)
Altitude in meters above ellipsoid
altsea (Decimal)
Altitude in meters above sea level
locacc (Decimal)
Accuracy of fix (lat/lon) in meters
heading (Decimal)
Heading - degrees east of true north (ie. North = 0, East = 90)
speed (Decimal)
Speed in Knots
speedms (Decimal)
Speed in meters per second (m/s)
satellites (Integer)
Satellite count
htcgx
Acceleration on the X-axis (Inverted: negative=right / positive=left when looking at screen with phone in upright position). Value is in HTC values (~1000 = 1G)
htcgy
Acceleration on the Y-axis (negative=down / positive=up when looking at screen with phone in upright position). Value is in HTC values (~1000 = 1G)
htcgz
Acceleration on the Z-axis (Inverted: negative=out from screen / positive=into from screen). Value is in HTC values (~1000 = 1G)
ax
Acceleration on the X-axis in m/s2
ay
Acceleration on the Y-axis in m/s2
az
Acceleration on the Z-axis in m/s2
mx
Ambient magnetic field on the X-axis in micro-Tesla (uT)
my
Ambient magnetic field on the Y-axis in micro-Tesla (uT)
mz
Ambient magnetic field on the Z-axis in micro-Tesla (uT)
hr
Heart rate (of e.g. driver or rider) in beats per minute (bpm)

Notes

  • HTC Accelerometer values (htcgx, htcgy, htcgz) and Accelerometer values (gx, gy, gz) are _including_ gravitational force
    • A stationary phone has an acceleration value of 9.82 m/s2