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