{
  "$id": "https://schema.nfh.global/VehiclePosition/v2.0",
  "x-iri": "https://schema.nfh.global/VehiclePosition/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "VehiclePosition",
  "type": "object",
  "description": "The current real-time geographic position, bearing, and speed of a vehicle operating a transport service.",
  "properties": {
    "tripDescriptor": {
      "description": "Identifies the trip this vehicle is operating",
      "$ref": "https://schema.nfh.global/TripDescriptor/v2.0/schema.json"
    },
    "vehicleDescriptor": {
      "description": "Identifies the reporting vehicle",
      "$ref": "https://schema.nfh.global/VehicleDescriptor/v2.0/schema.json"
    },
    "latitude": {
      "description": "Current latitude in WGS-84 decimal degrees",
      "type": "number"
    },
    "longitude": {
      "description": "Current longitude in WGS-84 decimal degrees",
      "type": "number"
    },
    "bearing": {
      "description": "Current bearing in degrees (0=north, 90=east)",
      "type": "number"
    },
    "speed": {
      "description": "Current speed in metres per second",
      "type": "number"
    },
    "currentStopSequence": {
      "description": "Stop sequence index of the stop the vehicle is at or approaching",
      "type": "number"
    },
    "currentStatus": {
      "description": "Vehicle status relative to the stop (INCOMING_AT, STOPPED_AT, IN_TRANSIT_TO)",
      "type": "string"
    },
    "timestamp": {
      "description": "Timestamp of this position report",
      "type": "string",
      "format": "date-time"
    },
    "id": {
      "description": "Unique identifier for the tracking record",
      "type": "string"
    },
    "url": {
      "description": "URL endpoint for real-time tracking information",
      "type": "string",
      "format": "uri"
    },
    "status": {
      "description": "Current tracking status",
      "$ref": "https://schema.nfh.global/State/v2.0/schema.json"
    },
    "validity": {
      "description": "Validity period for this tracking record",
      "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
    }
  },
  "additionalProperties": false,
  "x-tags": [
    "mobility",
    "geosparql",
    "schema-org",
    "ride-hailing"
  ]
}
