{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Crash",
    "type": "object",
    "additionalProperties": false,
    "description": "Crash",
    "properties": {
        "log_context": {
            "$ref": "/resources/schema/analytics/client/v4/LogContext.json",
            "description": "Required Log Context Reference"
        },
        "event_name": {
            "type": "string",
            "enum": [
                "CRASH"
            ]
        },
        "schema_definition": {
            "type": "string",
            "enum": [
                "Crash"
            ]
        },
        "braking_decel_item": {
            "$ref": "/resources/schema/analytics/client/v4/type/BrakingDecelItem.json",
            "description": "braking deceleration item"
        },
        "start_speed": {
            "$ref": "/resources/schema/analytics/client/v4/type/VehicleSpeedItem.json",
            "description": "speed of vehicle when crash starts"
        },
        "end_speed": {
            "$ref": "/resources/schema/analytics/client/v4/type/VehicleSpeedItem.json",
            "description": "speed of vehicle when crash ends"
        },
        "level": {
            "type": "string",
            "enum": [
                "LOW",
                "MEDIUM",
                "HIGH"
            ],
            "description": "The crash level"
        },
        "severity": {
            "type": "number",
            "description": "Severity is a numerical value which describes how strong the crash was."
        },
        "confidence": {
            "type": "number",
            "description": "confidence is a numerical value between 0 - 100 which describes the confidence for the crash detection"
        },
        "delta_g_force": {
            "type": "number",
            "description": "delta G-Fore converted from deceleration, 1.0 means -9.8m/s^2"
        },
        "duration": {
            "type": "integer",
            "description": "crash duration in ms"
        },
        "probe_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/ProbeListItemType.json"
            },
            "description": "List of latitude and longitude at periodic intervals when this event happens"
        },
        "accelerometer_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/AccelerometerItem.json"
            },
            "description": "list of acceleration force value from sensor at periodic intervals when this event happens"
        },
        "linear_acceleration_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/LinearAccelerationItem.json"
            },
            "description": "List of acceleration force value from sensor at periodic intervals when this event happens"
        },
        "gyroscope_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/GyroscopeItem.json"
            },
            "description": "list of rotation status from gyroscope at periodic intervals when this event happens"
        },
        "gravity_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/GravityItem.json"
            },
            "description": "list of force of gravity from sensor at periodic intervals when this event happens"
        },
        "ambient_magnetic_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/AmbientMagneticItem.json"
            },
            "description": "List of ambient magnetic field value from device sensor at periodic intervals when this event happens"
        },
        "rotation_vector_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/RotationVectorItem.json"
            },
            "description": "Required list of rotation vector value from device at periodic intervals when this event happens"
        },
        "rotation_matrix_list": {
            "type": "array",
            "items": {
                "$ref": "/resources/schema/analytics/client/v4/type/RotationMatrixItem.json"
            },
            "description": "Required list of rotation matrix values from device(where applicable) at periodic intervals when this event happens"
        }
    },
    "required": [
        "log_context",
        "event_name",
        "schema_definition",
        "start_speed",
        "end_speed",
        "delta_g_force"
    ]
}