Wiki source code of get_info.php

Last modified by YellowFox_RD on 2025/01/23 09:45

Hide last authors
YellowFox_RD 1.1 1 (% class="box" %)
Dominic Lippmann 3.1 2 (((
Dominic Lippmann 11.1 3 Table of Contents
Dominic Lippmann 3.1 4 )))
5
YellowFox_RD 1.1 6 {{toc/}}
7
Dominic Lippmann 11.1 8 Here you can do an ETA request, which can also use the shift data of the driver and the current position of the vehicle.
Dominic Lippmann 3.1 9
YellowFox_RD 1.1 10 (% class="box" %)
11 (((
Dominic Lippmann 11.1 12 This function is only available if the company has booked the module "truck routing".
YellowFox_RD 1.1 13 )))
Dominic Lippmann 3.1 14
Dominic Lippmann 11.1 15 = Description =
Dominic Lippmann 3.1 16
YellowFox_RD 1.1 17 (% class="blue mark" %)POST(%%)// **/eta/get_info.php?company=**RTI_COMPANYKEY**&vehicle=**RTI_VEHICLEKEY//
Dominic Lippmann 3.1 18
Dominic Lippmann 11.1 19 = Parameters =
Dominic Lippmann 3.1 20
Dominic Lippmann 11.1 21 == Query parameters ==
Dominic Lippmann 3.1 22
Dominic Lippmann 11.1 23 |=Parameters|=Description|=Type|=Hint|=Mandatory
24 |company|RTI company key|string| |yes
25 |vehicle|RTI vehicle key|string| |yes
YellowFox_RD 1.1 26
Dominic Lippmann 11.1 27 == Body parameters ==
Dominic Lippmann 3.1 28
Dominic Lippmann 11.1 29 |=Parameters|=Description|=Type|=Hint|=Mandatory
30 |target|Target coordinate
YellowFox_RD 1.1 31 Struktur:
32 {{code language="java"}}"target": {
Dominic Lippmann 3.1 33 "coordinates": {
34 "latitude": 0,
35 "longitude": 0
36 }
Dominic Lippmann 11.1 37 }{{/code}}|object| |yes
38 |departure|Start coordinate for routing
YellowFox_RD 1.1 39 {{code language="java"}}"departure": {
Dominic Lippmann 3.1 40 "coordinates": {
41 "latitude": 0,
42 "longitude": 0
43 },
44 "time": "YYYY-MM-DDTHH:ii:ss+HH:ii"
Dominic Lippmann 11.1 45 }{{/code}}|object|If //departure //is not given, the last known position of the vehicle will be used.
46 If //departure //is given, the coordinates are mandatory. Giving a time value is optional. Time is formatted as ISO 8601.|no
47 |options|Routing options
YellowFox_RD 1.1 48 {{code language="java"}}"options": {
Dominic Lippmann 3.1 49 "traffic_incidents": false,
50 "driving_regulation_ec_561": false,
51 "historic_speed": false
Dominic Lippmann 11.1 52 }{{/code}}|object|By default all options are deactivated. You can also use only some of these options. The following options are available:(((
53 * **traffic_incidents**: Indicates if current traffic info (traffic jams, construction work etc.) should be used.
54 * **driving_regulation_ec_561**: Indicates if rules regarding steer and rest times according to EC 561/2006 should be used. Only if this is activated, the data given at //driver_info //will be used. If //driver_info //is not given, the data of the current driver of the vehicle will be used.
55 * **historic_speed**: Indicates if historical traffic info should be used, e.g. that driving during rush hour usually takes longer.
56 )))|no
57 |driver_info|Driver data
YellowFox_RD 1.1 58 {{code language="java"}}"driver_info": {
Dominic Lippmann 3.1 59 "last_time_the_driver_worked": "YYYY-MM-DDTHH:ii:ss+HH:ii",
60 "accumulated_driving_time_since_last_break": 0,
61 "accumulated_driving_time_since_last_daily_rest": 0,
62 "elapsed_time_since_end_of_last_daily_rest": 0
Dominic Lippmann 11.1 63 }{{/code}}|object|If //driver_info //is not given, the data of the current driver of the vehicle will be used.
64 The option //driving_regulation_ec_561 //has to be activated in order to use the driver data.
65 The following infos can be given:(((
66 * **last_time_the_driver_worked**: Time of last work time booking. Everything after that will be assumed as rest time. Is a timestamp in ISO 8601 format.
67 * **accumulated_driving_time_since_last_break**: Steering time since end of last break in seconds. The driver is not allowed to drive longer than 4.5 hours without break. If 4.5 hours have already been exceeded, the request will do the same as if the time is 4.5 hours.
68 * **accumulated_driving_time_since_last_daily_rest**: Steering time since end of last daily rest time in seconds. The driver is not allowed to drive longer than 9 hours before doing his next daily rest time. If 9 hours have already been exceeded, the request will do the same as if the time is 9 hours.
69 * **elapsed_time_since_end_of_last_daily_rest**: Time since end of last daily rest time in seconds. The driver has to do the next daily rest time 13 hours after shift begin at maximum. If 13 hours have already been exceeded, the request will do the same as if the time is 13 hours. This value can not be greater than //accumulated_driving_time_since_last_daily_rest.//
70 )))|no
YellowFox_RD 1.1 71
Dominic Lippmann 11.1 72 = Return value =
Dominic Lippmann 3.1 73
Dominic Lippmann 11.1 74 If an error occured "(% class="error" %)**ERROR:description**(%%)" will be returned. Else the data is formatted as JSON.
75 You can find a detailled description of the structure of the return value as JSON schema [[here>>https://map.yellowfox.de/rti/schema/eta_get_info_schema.json]].
76 **Return value example**
YellowFox_RD 1.1 77 {{code language="java"}}{
78 "etaInfo": {
79 "successful": true,
80 "distance": 27159,
81 "duration": 2392,
82 "arrivalTime": "2024-03-13T13:39:07+01:00",
83 "events": [],
84 "errorInfo": null
85 },
86 "etaCalculationBase": {
87 "startPosition": {
88 "coordinate": {
89 "longitude": 13.35057,
90 "latitude": 50.9218
91 }
92 },
93 "endPosition": {
94 "coordinate": {
95 "longitude": 13.59894,
96 "latitude": 51.03615
97 }
98 },
99 "startTime": "2024-03-13T12:59:15+01:00",
100 "options": {
101 "traffic_incidents": false,
102 "driving_regulation_ec_561": true,
103 "historic_speed": false
104 },
105 "driverInfo": {
106 "lastTimeWorked": "2024-03-13T11:24:00+01:00",
107 "accumulatedDrivingTimeSinceLastBreak": 15480,
108 "accumulatedDrivingTimeSinceLastDailyRest": 15480,
109 "elapsedTimeSinceEndOfLastDailyRest": 15480
110 },
111 "routingProfile": {
112 "speedProfile": "carfast",
113 "optimization": 0,
114 "lowEmissionZoneType": "GREEN",
115 "totalPermittedWeight": 0,
116 "axleLoad": 0,
117 "numberOfAxles": 0,
118 "height": 0,
119 "length": 0,
120 "width": 0,
121 "isDelivery": false,
122 "isEmergency": false,
123 "isMaintenance": false,
124 "hazardousGoodsType": "NONE",
125 "tunnelRestrictionCode": "NONE",
126 "loadType": "PASSENGER",
127 "avoidMotorway": false,
128 "avoidToll": false,
129 "avoidFerry": false,
130 "emissionClass": "EURO_0",
131 "particleReductionClass": ""
132 }
133 },
134 "queryDate": "2024-03-13T12:59:15+01:00",
135 "duration": 0.6310160160064697
136 }{{/code}}
137
Dominic Lippmann 11.1 138 = Example calls =
Dominic Lippmann 3.1 139
Dominic Lippmann 11.1 140 **Request with RTI key**
Dominic Lippmann 3.1 141
Dominic Lippmann 11.1 142 {{code language="java"}}https://map.yellowfox.de/rti/eta/get_info.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY{{/code}}
YellowFox_RD 1.1 143
Dominic Lippmann 11.1 144 **Request with RTI ident**
Dominic Lippmann 3.1 145
Dominic Lippmann 11.1 146 {{code language="java"}}https://map.yellowfox.de/rti/eta/get_info.php?company=COMPANY_RTIKEY={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}{{/code}}
YellowFox_RD 1.1 147