Return the position data of a single vehicle or vehicle group.

If no date is given, it will return the current position.

Description

GET positions/get_pos_data.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&start=YYYY-MM-DDTHH:MM:SS+HH:MM&end=YYYY-MM-DDTHH:MM:SS+HH:MM

Parameter

parameter

description

type

hint

mandatory

companyRTI company keystring
yes
vehicleRTI vehicle keystringeither vehicle or group parameter(yes)
groupRTI group keystringeither vehicle or group parameter(yes)
startstart of query date rangedatestring

Format: ISO 8601

no

endend of query date rangedatestring

Format: ISO 8601

no
query_datepoint of time to get the position fordatestringFormat: ISO 8601no
formatoutput formatstringjson (default)no
date_typeWhich date is the base for date restriction?string

'insert' (default) = execution date

'gps' = date when the messaged was generated

no
additional_dataadditional parameters to gather more datastring[]
  • 'temp' gathers the value if digital temperature sensors 1-8 and analogue temperature sensors 1-4
  • 'trailer' gathers all the trailer informations
no
hide_displayhide position messages generated by connected displayint
  • 0 (default) = display messages are being returned
  • 1 = display messages are not being returned
no
offsetThe request returns 5000 data records at max. Use offset to access the next block.int
no

Hint for date restriction

You can use 3 different modes

a) Use start and end and get all positions within this timerange (the difference  between these dates can not be more than 24 hours)
b) Just use query_date to get the most current position message of each vehicle at this point of time
c) Use no date parameter to just get the most current message of each vehicle right now


Output

A string is being returned. Will return "ERROR:description" on error.


Field descriptions

FieldDescription
vehicle_signvehicle sign
rti_identRTI ident
insert_dateWhen was this message processed by YellowFox?
gps_dateWhen was this message sent by the vehicle?
latlatitude
lonlogitude
text_positiontext address of GPS position
customercustomer name (if the address belongs to a customer)
directiondirection in degree
satellitesnumber of satellites used for getting GPS position
speedspeed in km/h
ignitionIs ignition on (1) or off (0)?
reasonWhy was this position message sent?
kmodometer
bszXvalue of operating hours counter
driver_Xname of driver
driverkey_Xpersonnel key of driver
eta_timeIf navigating to a target: planned arrival
eta_distanceIf navigating to a target: remaining distance
eta_durationIf navigating to a target: remaining duration
eta_latIf navigating to a target: latitude of target
eta_lonIf navigating to a target: longitude of target
eta_descIf navigating to a target: text address of target
digital_inputs

status of telemetry inputs

nr = number of input (1 to 7)

name = name of input

state = status of input as text

value =  status of input (1 = on, 0 = off)

trailer_info

Optional field. Includes information about connected trailer.

date = date of status

type = connected to trailer (TRAILER) or towing vehicle (VEHICLE)

name = name of connected trailer / towing vehicle

state = connection state (CONNECTED or DISCONNECTED)

digital_temperature_values

Optional field. Includes digital temperature data.

nr = number of input

value = temperature in °C

set_point = target value in °C

analogue_temperature_values

Optional field. Includes analogue temperature data.

nr = number of input

value = temperature in °C


JSON

You can find a JSON schema description for this result set here.

{     
	"_date" => null,
    "_links" => {
            "next" => {
               "href" => null
            }
         },
    "has_more" => false,     
	"items": [
        {
            "vehicle_sign": "FTL YF 123",
            "rti_ident": "",
            "insert_date": "2022-09-22T13:23:35+02:00",
            "gps_date": "2022-09-22T13:23:23+02:00",
            "lat": 48.20398,
            "lon": 16.22613,
            "text_position": "A-1140 Wien (Penzing) Wientalstraße (B1)",
            "customer": null,
            "direction": 155,
            "satellites": 12,
            "speed": 0,
            "ignition": 0,
            "reason": "AnalogMinuteInterval",
            "km": 361549,
            "bsz1": null,
            "bsz2": null,
            "driver_1": null,
            "driverkey_1": null,
            "driver_2": null,
            "driverkey_2": null,
            "eta_time": null,
            "eta_distance": null,
            "eta_duration": null,
            "eta_lat": null,
            "eta_lon": null,
            "eta_desc": null,
            "digital_inputs": [
                {
                    "nr": 2,
                    "name": "Sensor 2",
                    "state": "",
                    "value": 0
                }
            ],
		  	"trailer_info": {
                "date": "2022-09-22T13:18:35+02:00",
                "type": "TRAILER",
                "name": "Trailer 123",
                "state":"CONNECTED"
            },
            "digital_temperature_values": [
				{
                    "nr": 1,
                    "value": 13.2,
					"set_point": 13.3
                }
			],
            "analogue_temperature_values": [
                {
                    "nr": 1,
                    "value": 21.56
                },
                {
                    "nr": 2,
                    "value": 11.83
                }
            ]
        }
	]
}


example calls

Query date range for a group
https://map.yellowfox.de/rti/positions/get_pos_data.php?company=COMPANY_RTIKEY&group=GROUP_RTIKEY&start=2022-09-22T13:23:00%2B00:00:00&end=2022-09-22T14:23:00%2B00:00:00&additional_data[]=temp
Query fixed date for a vehicle
https://map.yellowfox.de/rti/positions/get_pos_data.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&query_date=2022-09-22T13:23:00%2B00:00:00
Query current point of time for a vehicle with RTI ident
https://map.yellowfox.de/rti/positions/get_pos_data.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}
  • No labels