Server log format

The server log data is stored in files named trial-i-server.log for trial i. There are only server logs for the rendezvous conndition, as the server is not used in the "free walking" condition.

These files contain regular logs of the current status of the server. This includes information about all connected client devices (position, reported signal strength, battery life remaining, GPS quality, heading, current activity level) and the current location of the rendezvous target (the centroid).

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 roughly 1Hz.

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:

Example

{'study_started': True, 'device_info': [{'study_started': '0', 'timestamp': '1247663679', 'lon': '-3.975549167773',
 'battery_life': '100', 'ready_message_sent': '1', 'signal_strength': '7', 'gps_sat_lock': '5', 'lat': '51.612834027632', 
 'acc_activity': '0', 'heading': '12.242169592282', 'heading_activity': '2.5439356693455E-07', 'device_id': 
 '356962010467828'}, {'study_started': '0', 'timestamp': '1247663704', 'lon': '-3.982692055315', 'battery_life': '100', 
 'ready_message_sent': '1', 'signal_strength': '7', 'gps_sat_lock': '4', 'lat': '51.612067921972', 'acc_activity': 
 '891.27061720672', 'heading': '-78.860344708373', 'heading_activity': '0.20414750780859', 'device_id': '352255010375339'},
 {'study_started': '0', 'timestamp': '1247663627', 'lon': '-3.975645308166', 'battery_life': '100', 'ready_message_sent': 
 '1', 'signal_strength': '6', 'gps_sat_lock': '5', 'lat': '51.608882045601', 'acc_activity': '468.71211845863', 'heading':
 '11.095872935231', 'heading_activity': '0.73063362929467', 'device_id': '352255017948849'}, {'study_started': '0', 
 'timestamp': '1247663697', 'lon': '-3.978666312564', 'battery_life': '100', 'ready_message_sent': '0', 'signal_strength': 
 '7', 'gps_sat_lock': '3', 'lat': '51.614521387921', 'acc_activity': '3468.2349350457', 'heading': '-13.59896255152', 
 'heading_activity': '0.48977079717097', 'device_id': '356996016341140'}, {'study_started': '0', 'timestamp': '1247663705',
 'lon': '-3.982420481755', 'battery_life': '100', 'ready_message_sent': '1', 'signal_strength': '6', 'gps_sat_lock': '7',
 'lat': '51.607710088343', 'acc_activity': '817.76538840597', 'heading': '5.4958042989687', 'heading_activity': 
 '0.079197662888855', 'device_id': '352255010850372'}], 'centroid': [51.611203094293799, -3.9789946651146004], 'time':
 1297.3589999675751}

Parsing

In Python, parsing is trivial:
f = open("trial-1-server.log")
for line in f:
    data = eval(line)
    
    # print out the time
    print data["time"]
    
    # print out the number of connected devices
    print len(data["device_info"))
    
    # print out the battery life of all connected devices
    print [device["battery_life"] for device in data["device_info"]]