Client log format
These files contain all of the data logged by the phones each individual participant carried with them. This records the participants position, as measured by GPS, time since the start of the trial, the target the participant was trying to reach (note: participants do not necessarily share a consistent target, depending on when the network updates happen!), the time since the last network update (the "freshness" of the data), and a summary of how active they were (measured by averaging the energy in accelerometer readings).
The data is stored in ASCII format, in a format suitable for parsing with Python (just the string representation of a dictionary). Each line is one entry, and the data is recorded at 4Hz.
The format is a Python-style dictionary in the form
{"field" : value, "field2" : value, ...} (see below for how to parse it), and each entry has the following fields:
- gps_satellites (integer) Number of satellites GPS unit reported.
- average_distance (float) Distance to the centroid, averaged over the last 10 seconds.
- cumulative_time (float) Time in seconds since the start of the recording.
- target_distance (float) Distance in metres to the rendezvous target.
- target_lon (float) Longitude of rendezvous target.
- target_lat (float) Latitude of rendezvous target.
- lon (float) Longitude of participant.
- lat (float) Latitude of participant.
- gps_hdop (integer) GPS reported dilution of precision. (0--50), 50 being the least precise.
- feedback_state (integer) -2 if not currently playing a vibration, 0 if currently vibrating.
- last_network_time (float) Time in seconds since the start of the trial of when the last update was successfully received from the server. This data is recorded incorrectly in the data files -- there is a large initial offset in the time. This can easily be corrected by subtracting the first "last_network_time" from all subsequent times.
- target_width (float) Angular width of target used for feedback. Fixed to 60.0 for all trials.
- time (float) Timestamp of recording, in seconds since the epoch.
- acc_activity (float) Average energy of the accelerometer over the last 2 seconds. Scale is arbitrary, but usually in range 0 -- 2000.0. Higher indicates more movement.
- target_heading (float )The computed heading to the target (relative to North).
- heading (float) The current direction in which the sensor is facing. This is a tilt-compenstated, filtered heading value, as presented to the user. The raw headings can be extracted from the intertial sensor log files.
- heading_activity (float) Average energy of heading over last 2 seconds. Scale is arbitrary, but values are usually in range 0.0 -- 1.0. Larger values means more variation in the way the device is pointed.
Example
{'gps_satellites': 6.0, 'average_distance': 303.56351441168181, 'cumulative_time': 83.328125,
'target_distance': 302.83507862568359, 'target_lon': -3.9787780000000001, 'lon': -3.9756649999999998,
'gps_hdop': 3.0, 'feedback_state': 0.0, 'last_network_time': 322490.0, 'target_width': 60.0,
'time': 1247663723.84375, 'lat': 51.609575, 'acc_activity': 2552.6574110000001,
'target_heading': -0.34807500000000002, 'heading': 18.460864999999998,
'heading_activity': 0.17074700000000001, 'target_lat': 51.611485999999999}
Parsing
In Python, parsing is trivial:
f = open("trial-1-1_phone-3.log")
for line in f:
data = eval(line)
# print out the time and gps satellite count
print data["cumulative_time"], data["gps_satellites"]