{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"title": "PhoneSensorEvent",
	"type": "object",
	"additionalProperties": false,
	"description": "Analytics-v2 .. UDC - OpenXC data",
	"properties": {
		"log_context": {
			"$ref": "/resources/schema/analytics/client/v2/LogContext.json",
			"description": "Required Log Context Reference"
		},
		"event_name": {
			"type": "string",
			"enum": ["PHONE_SENSOR_EVENT"]
		},
		"schema_definition": {
			"type": "string",
			"enum": ["PhoneSensorEvent"]
		},
		"accelerometer_data": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/AccelerometerItems.json",
				"description": "Acceleration force along the X,Y and Z axis (including gravity). Can be positive/negative based on acceleration."
			}
		},
		"linear_accelerometer_data": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/LinearAccelerometerItems.json",
				"description": "Acceleration force along the X,Y and Z axis (including gravity). Can be positive/negative based on acceleration."
			}
		},
		"gyroscope_data": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/GyroscopeItems.json",
				"description": "Rate of rotation around the X,Y and Z axis."
			}
		},
		"gravity_data": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/GravityItems.json",
				"description": "Measures the force of gravity that is applied to a device on all three physical axes (x, y, z)."
			}
		},
		"proximity_distance": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/ProximityItems.json",
				"description": "Measures the proximity of an object in cm relative to the view screen of a device."
			}
		},
		"ambient_temperature": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/AmbientTemperatureItems.json",
				"description": "Ambient air temperature in Celsius."
			}
		},
		"ambient_humidity": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/AmbientHumidityItems.json",
				"description": "Ambient relative humidity in %."
			}
		},
		"ambient_pressure": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/AmbientPressureItems.json",
				"description": "Measures the ambient air pressure in hPa or mbar."
			}
		},
		"ambient_light": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/AmbientLightItems.json",
				"description": "Measures the ambient light level (illumination)"
			}
		},
		"magnatic_data": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/MagnaticItems.json",
				"description": "Measures the ambient geomagnetic field for all three physical axes (X, Y, Z)."
			}
		},
		"rotation_data": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/RotationItems.json",
				"description": "Measures the orientation of a device by providing the three elements of the device's rotation vector. (X, Y, Z)."
			}
		},
		"nonmagnetic_rotation_data": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/RotationItems.json",
				"description": "Measures the orientation of a device by providing the three elements of the device's rotation vector. (X, Y, Z). Does not contain magnetic field"
			}
		},
		"bearing": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/BearingItems.json",
				"description": "Contains the bearing provided from Phone GPS"
			}
		},
		"altitude": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/AltitudeItems.json",
				"description": "Contains the altitude provided from Phone GPS"
			}
		},
		"accuracy": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/AccuracyItems.json",
				"description": "Contains the accuracy of data provided from Phone GPS"
			}
		},
		"heading_phone": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/HeadingItems.json",
				"description": "Heading is where the device is pointing relative to North"
			}
		},
		"phone_speed": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/PhoneSpeedItems.json",
				"description": "Contains the speed of the Phone "
			}
		},
		"step_count": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/StepCountItems.json",
				"description": "Measures the number of steps made by user."
			}
		},
		"phone_gps_sensor": {
			"type": "array",
			"items": {
				"$ref": "/resources/schema/analytics/client/v2/PhoneGpsSensorItems.json",
				"description": "Collect gps location data from the phone sensor. Includes lat,lon and timestamp"
			}
		}
	},
	"required": [
		"log_context",
		"event_name",
		"schema_definition"
	]
}