diff --git a/common/phone/phone_battery_level.avsc b/common/phone/phone_battery_level.avsc index 5973aebf..dec81bc3 100644 --- a/common/phone/phone_battery_level.avsc +++ b/common/phone/phone_battery_level.avsc @@ -6,6 +6,8 @@ "fields": [ {"name": "time", "type": "double", "doc": "device timestamp in UTC (s)"}, {"name": "timeReceived", "type": "double", "doc": "device receiver timestamp in UTC (s)"}, - {"name": "batteryLevel", "type": "float", "doc": "battery level from 0 to 1"} + {"name": "batteryLevel", "type": "float", "doc": "battery level from 0 to 1"}, + {"name": "isPlugged", "type": "boolean", "doc": "whether the phone is connected to a power source"}, + {"name": "status", "type": {"name": "BatteryStatus", "type": "enum", "symbols": ["UNKNOWN", "CHARGING", "DISCHARGING", "NOT_CHARGING", "FULL"]}, "doc": "Android battery states", "default": "UNKNOWN"} ] } diff --git a/common/phone/phone_call.avsc b/common/phone/phone_call.avsc new file mode 100644 index 00000000..c9e3fc60 --- /dev/null +++ b/common/phone/phone_call.avsc @@ -0,0 +1,13 @@ +{ + "namespace": "org.radarcns.phone", + "type": "record", + "name": "PhoneCall", + "doc": "Data from the log of received and made calls.", + "fields": [ + {"name": "time", "type": "double", "doc": "device timestamp in UTC (s)"}, + {"name": "timeReceived", "type": "double", "doc": "device receiver timestamp in UTC (s)"}, + {"name": "duration", "type": "float", "doc": "duration of the call (s)", "default": "NaN"}, + {"name": "target", "type": ["null", "bytes"], "doc": "HMAC SHA-256 one-way source/target of the call. This hash of a given phone number will be the same unless the app is reinstalled. If the number is unknown or anonymous, this contains null.", "default": null}, + {"name": "type", "type": {"name": "PhoneCallType", "type": "enum", "symbols": ["INCOMING", "OUTGOING", "MISSED", "VOICEMAIL", "UNKNOWN"]}, "doc": "direction of phone call", "default": "UNKNOWN"} + ] +} \ No newline at end of file diff --git a/common/phone/phone_relative_location.avsc b/common/phone/phone_relative_location.avsc new file mode 100644 index 00000000..4136d3e2 --- /dev/null +++ b/common/phone/phone_relative_location.avsc @@ -0,0 +1,17 @@ +{ + "namespace": "org.radarcns.phone", + "type": "record", + "name": "PhoneRelativeLocation", + "doc": "Data from the gps and network location providers. The latitude and longitude are stated with an unspecified reference offset and can thus be treated as relative locations. They cannot be used to infer absolute location. This means accurate distances or angles between locations cannot be calculated since those depend on the absolute location.", + "fields": [ + {"name": "time", "type": "double", "doc": "device timestamp in UTC (s)"}, + {"name": "timeReceived", "type": "double", "doc": "device receiver timestamp in UTC (s)"}, + {"name": "provider", "type": {"name": "LocationProvider", "type": "enum", "symbols": ["GPS", "NETWORK", "OTHER"]}, "doc": "Android provider of the location data"}, + {"name": "latitude", "type": "double", "doc": "relative latitude from an initial random reference latitude (degrees with range [-90, 90])", "default": "NaN"}, + {"name": "longitude", "type": "double", "doc": "relative longitude from an initial reference longitude (degrees with range [-180, 180])", "default": "NaN"}, + {"name": "altitude", "type": "float", "doc": "height above the WGS 84 reference ellipsoid (m)", "default": "NaN"}, + {"name": "accuracy", "type": "float", "doc": "The estimated horizontal accuracy of this location, radial (m). We define horizontal accuracy as the radius of 68% confidence. In other words, if you draw a circle centered at this location's latitude and longitude, and with a radius equal to the accuracy, then there is a 68% probability that the true location is inside the circle.", "default": "NaN"}, + {"name": "speed", "type": "float", "doc": "speed over ground (m/s)", "default": "NaN"}, + {"name": "bearing", "type": "float", "doc": "the horizontal direction of travel of this device (degrees with range (0, 360])", "default": "NaN"} + ] +} \ No newline at end of file diff --git a/common/phone/phone_sms.avsc b/common/phone/phone_sms.avsc new file mode 100644 index 00000000..ac5b7fb6 --- /dev/null +++ b/common/phone/phone_sms.avsc @@ -0,0 +1,13 @@ +{ + "namespace": "org.radarcns.phone", + "type": "record", + "name": "PhoneSms", + "doc": "Data from log sent and received text messages.", + "fields": [ + {"name": "time", "type": "double", "doc": "device timestamp in UTC (s)"}, + {"name": "timeReceived", "type": "double", "doc": "device receiver timestamp in UTC (s)"}, + {"name": "target", "type": ["null", "bytes"], "doc": "HMAC SHA-256 one-way source/target of the SMS. This hash of a given phone number will be the same unless the app is reinstalled. If the number is unknown or anonymous, this contains null.", "default": null}, + {"name": "type", "type": {"name": "PhoneSmsType", "type": "enum", "symbols": ["INCOMING", "OUTGOING", "OTHER", "UNKNOWN"]}, "doc": "direction of the SMS", "default": "UNKNOWN"}, + {"name": "length", "type": "int", "doc": "number of characters in the message (-1 if unknown)", "default": -1} + ] +} \ No newline at end of file diff --git a/common/phone/phone_user_interaction.avsc b/common/phone/phone_user_interaction.avsc new file mode 100644 index 00000000..29f8c10d --- /dev/null +++ b/common/phone/phone_user_interaction.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "org.radarcns.phone", + "type": "record", + "name": "PhoneUserInteraction", + "doc": "Logs change of user interaction state: when the phone is unlocked or set to standby.", + "fields": [ + {"name": "time", "type": "double", "doc": "device timestamp in UTC (s)"}, + {"name": "timeReceived", "type": "double", "doc": "device receiver timestamp in UTC (s)"}, + {"name": "lockState", "type": {"name": "PhoneLockState", "type": "enum", "symbols": ["STANDBY", "UNLOCKED"]}, "doc": "what lock state the phone has"} + ] +} \ No newline at end of file