Wiki source code of positions/get_pos_data.php
Last modified by YellowFox_RD on 2026/04/15 09:37
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | (% class="box" %) |
| |
4.1 | 2 | ((( |
| |
13.2 | 3 | Table of Contents |
| |
4.1 | 4 | ))) |
| 5 | |||
| |
1.1 | 6 | {{toc/}} |
| 7 | |||
| |
13.2 | 8 | Return the position data of a single vehicle. |
| 9 | If no date is given, it will return the current position. | ||
| |
4.1 | 10 | |
| |
13.2 | 11 | = Description = |
| |
4.1 | 12 | |
| |
13.2 | 13 | (% class="green mark" %)**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// |
| |
4.1 | 14 | |
| |
1.1 | 15 | = Parameter = |
| |
4.1 | 16 | |
| |
13.2 | 17 | |=parameter|=description|=type|=hint|=mandatory |
| 18 | |company|RTI company key|string| |yes | ||
| 19 | |vehicle|RTI vehicle key|string| |yes | ||
| 20 | |start|start of query date range|datestring|Format: ISO 8601 (//YYYY-MM-DDTHH:MM:SS+HH:mm//)|no | ||
| 21 | |end|end of query date range|datestring|Format: ISO 8601 (//YYYY-MM-DDTHH:MM:SS+HH:mm//)|no | ||
| 22 | |query_date|point of time to get the position for|datestring|Format: ISO 8601 (//YYYY-MM-DDTHH:MM:SS+HH:mm//)|no | ||
| 23 | |format|output format|string|json (default)|no | ||
| 24 | |date_type|Which date is the base for date restriction?|string|'insert' (default) = execution date | ||
| 25 | 'gps' = date when the messaged was generated|no | ||
| 26 | |additional_data|additional parameters to gather more data|string[]|((( | ||
| 27 | * 'temp' gathers the value if digital temperature sensors 1-8 and analogue temperature sensors 1-4 | ||
| 28 | * 'trailer' gathers all the trailer informations | ||
| 29 | )))|no | ||
| 30 | |hide_display|hide position messages generated by connected display|int|((( | ||
| 31 | * 0 (default) = display messages are being returned | ||
| 32 | * 1 = display messages are not being returned | ||
| 33 | )))|no | ||
| 34 | |offset|The request returns 5000 data records at max. Use offset to access the next block.|int| |no | ||
| |
1.1 | 35 | |
| |
13.2 | 36 | (% class="box" %) |
| |
1.1 | 37 | ((( |
| |
13.2 | 38 | **Hint for date restriction** |
| 39 | You can use 3 different modes | ||
| 40 | a) Use start and end and get all positions within this timerange (the difference between these dates can not be more than 24 hours) | ||
| 41 | b) Just use query_date to get the most current position message of each vehicle at this point of time | ||
| 42 | c) Use no date parameter to just get the most current message of each vehicle right now | ||
| |
1.1 | 43 | ))) |
| 44 | |||
| |
13.2 | 45 | = Output = |
| |
4.1 | 46 | |
| |
13.2 | 47 | A **string** is being returned. Will return "(% class="error" %)**ERROR:description**(%%)" on error. |
| |
1.1 | 48 | |
| |
13.2 | 49 | == Field descriptions == |
| |
4.1 | 50 | |
| |
13.2 | 51 | |=Field|=Description |
| 52 | |vehicle_sign|vehicle sign | ||
| 53 | |rti_ident|RTI ident | ||
| 54 | |insert_date|When was this message processed by YellowFox? | ||
| 55 | |gps_date|When was this message sent by the vehicle? | ||
| 56 | |lat|latitude | ||
| 57 | |lon|logitude | ||
| 58 | |text_position|text address of GPS position | ||
| 59 | |customer|customer name (if the address belongs to a customer) | ||
| 60 | |direction|direction in degree | ||
| 61 | |satellites|number of satellites used for getting GPS position | ||
| 62 | |speed|speed in km/h | ||
| 63 | |ignition|Is ignition on (1) or off (0)? | ||
| 64 | |reason|Why was this position message sent? | ||
| 65 | |km|odometer | ||
| 66 | |bszX|value of operating hours counter | ||
| 67 | |driver_X|name of driver | ||
| 68 | |driverkey_X|personnel key of driver | ||
| 69 | |eta_time|If navigating to a target: planned arrival | ||
| 70 | |eta_distance|If navigating to a target: remaining distance | ||
| 71 | |eta_duration|If navigating to a target: remaining duration | ||
| 72 | |eta_lat|If navigating to a target: latitude of target | ||
| 73 | |eta_lon|If navigating to a target: longitude of target | ||
| 74 | |eta_desc|If navigating to a target: text address of target | ||
| |
6.1 | 75 | |digital_inputs|((( |
| |
13.2 | 76 | status of telemetry inputs |
| 77 | nr = number of input (1 to 7) | ||
| 78 | name = name of input | ||
| 79 | state = status of input as text | ||
| 80 | value = status of input (1 = on, 0 = off) | ||
| |
6.1 | 81 | |
| |
13.2 | 82 | ident = technical attribute, can be set via object-specific settings |
| |
6.1 | 83 | ))) |
| |
13.2 | 84 | |trailer_info|Optional field. Includes information about connected trailer. |
| 85 | date = date of status | ||
| 86 | type = connected to trailer (TRAILER) or towing vehicle (VEHICLE) | ||
| 87 | name = name of connected trailer / towing vehicle | ||
| 88 | rti_ident = RTI Ident of connected trailer | ||
| 89 | state = connection state (CONNECTED or DISCONNECTED) | ||
| 90 | |digital_temperature_values|Optional field. Includes digital temperature data. | ||
| 91 | nr = number of input | ||
| 92 | value = temperature in °C | ||
| 93 | set_point = target value in °C | ||
| 94 | |analogue_temperature_values|Optional field. Includes analogue temperature data. | ||
| 95 | nr = number of input | ||
| 96 | value = temperature in °C | ||
| |
1.1 | 97 | |
| 98 | == JSON == | ||
| |
4.1 | 99 | |
| |
13.2 | 100 | You can find a JSON schema description for this result set [[here>>https://map.yellowfox.de/rti/schema/get_pos_data_schema.json]]. |
| |
1.1 | 101 | |
| |
4.1 | 102 | {{code language="java"}} |
| |
13.2 | 103 | { |
| |
4.1 | 104 | "_date" => null, |
| |
1.1 | 105 | "_links" => { |
| 106 | "next" => { | ||
| 107 | "href" => null | ||
| 108 | } | ||
| 109 | }, | ||
| |
13.2 | 110 | "has_more" => false, |
| |
4.1 | 111 | "items": [ |
| |
1.1 | 112 | { |
| 113 | "vehicle_sign": "FTL YF 123", | ||
| 114 | "rti_ident": "", | ||
| 115 | "insert_date": "2022-09-22T13:23:35+02:00", | ||
| 116 | "gps_date": "2022-09-22T13:23:23+02:00", | ||
| 117 | "lat": 48.20398, | ||
| 118 | "lon": 16.22613, | ||
| 119 | "text_position": "A-1140 Wien (Penzing) Wientalstraße (B1)", | ||
| 120 | "customer": null, | ||
| 121 | "direction": 155, | ||
| 122 | "satellites": 12, | ||
| 123 | "speed": 0, | ||
| 124 | "ignition": 0, | ||
| 125 | "reason": "AnalogMinuteInterval", | ||
| 126 | "km": 361549, | ||
| 127 | "bsz1": null, | ||
| 128 | "bsz2": null, | ||
| 129 | "driver_1": null, | ||
| 130 | "driverkey_1": null, | ||
| 131 | "driver_2": null, | ||
| 132 | "driverkey_2": null, | ||
| 133 | "eta_time": null, | ||
| 134 | "eta_distance": null, | ||
| 135 | "eta_duration": null, | ||
| 136 | "eta_lat": null, | ||
| 137 | "eta_lon": null, | ||
| 138 | "eta_desc": null, | ||
| 139 | "digital_inputs": [ | ||
| 140 | { | ||
| 141 | "nr": 2, | ||
| 142 | "name": "Sensor 2", | ||
| 143 | "state": "", | ||
| |
7.1 | 144 | "value": 0, |
| 145 | "ident": null | ||
| |
1.1 | 146 | } |
| 147 | ], | ||
| |
13.2 | 148 | "trailer_info": { |
| |
1.1 | 149 | "date": "2022-09-22T13:18:35+02:00", |
| 150 | "type": "TRAILER", | ||
| 151 | "name": "Trailer 123", | ||
| |
7.1 | 152 | "rti_ident": "TR_ID", |
| |
1.1 | 153 | "state":"CONNECTED" |
| 154 | }, | ||
| 155 | "digital_temperature_values": [ | ||
| |
13.2 | 156 | { |
| |
1.1 | 157 | "nr": 1, |
| 158 | "value": 13.2, | ||
| |
7.1 | 159 | "set_point": 13.3 |
| |
1.1 | 160 | } |
| |
7.1 | 161 | ], |
| |
1.1 | 162 | "analogue_temperature_values": [ |
| 163 | { | ||
| 164 | "nr": 1, | ||
| 165 | "value": 21.56 | ||
| 166 | }, | ||
| 167 | { | ||
| 168 | "nr": 2, | ||
| 169 | "value": 11.83 | ||
| 170 | } | ||
| 171 | ] | ||
| 172 | } | ||
| |
4.1 | 173 | ] |
| 174 | } | ||
| 175 | {{/code}} | ||
| |
1.1 | 176 | |
| |
13.2 | 177 | = example calls = |
| |
4.1 | 178 | |
| |
13.2 | 179 | **Query fixed date for a vehicle** |
| |
8.1 | 180 | {{code language="java"}}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{{/code}} |
| |
1.1 | 181 | |
| |
13.2 | 182 | **Query current point of time for a vehicle with RTI ident** |
| |
8.1 | 183 | {{code language="java"}}https://map.yellowfox.de/rti/positions/get_pos_data.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}{{/code}} |

