PTV Navigator Remote Interface Documentation
|
Variables | |
final int | EVENT_GPS_INFO = 1 |
Get GPS information. | |
final int | EVENT_NAVIGATION_INFO = 2 |
Get navigation information. | |
final int | EVENT_SPEEDLIMIT = 3 |
Get speed limit and velocity information. | |
final int | EVENT_DESTINATION_REACHED = 4 |
Get a message when the destination was reached. | |
final int | EVENT_NAVIGATION_STOPPED = 5 |
Get a message when the navigation was stopped by the user. | |
final int | EVENT_REROUTE = 6 |
Get a message when a rerouting occured. | |
final int | EVENT_LOCATION_CONTEXT = 17 |
Get location contextual information like the speed limit and road information at the current position. |
final int EVENT_GPS_INFO = 1 [private, inherited] |
Get GPS information.
The PTV Navigator will send this message frequently with the appropriate fields filled in when a client before registered itself at the service for getting GPS information.
This is done by setting the "EventType" value of the attached bundle to EVENT_GPS_INFO.
To get information when the PTV Navigator is not the foreground application, be sure to set the "GPS active in the background" option in the PTV Navigator settings, otherwise no information will be sent.
Sending a message with this bundle key will register the listening to this event.
Messages sent from the PTV Navigator with the "what" field set to "MSG_RI_EVENT_DATA" and this bundle key will hold the following information:
Compatibility mode (MSG_RI_SET_COMPATIBILITY_MODE) set to true:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_GPS_INFO | int | |
MercPosX | The mercator x position | int | |
MercPosY | The mercator y position | int | |
GeoPosX | The geodecimal x position | int | |
GeoPosY | The geodecimal y position | int | |
Course | The course in degree | int | |
Velocity | The speed in km/h | int |
Compatibility mode (MSG_RI_SET_COMPATIBILITY_MODE) set to false:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_GPS_INFO | int | |
Latitude | The latitude of the current position | double | |
Longitude | The longitude of the current position | double | |
Altitude | The altitude of the current position | double | |
Course | The current course, 0 is north, 90 is east and so on | double | |
Speed | The current speed | double | |
Accuracy | The accuracy of the GPS signal in [m] | double | |
Time | The UTC time of the GPS fix, in milliseconds since epoch (January 1, 1970) | long | |
ProviderType | The provider type: REALTIME (real GPS) or SOFT_DR (programmatically calculated) | int | |
Provider | The name of the location provider | int |
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
final int EVENT_NAVIGATION_INFO = 2 [private, inherited] |
Get navigation information.
The PTV Navigator will send this message frequently with the appropriate fields filled in when a client before registered itself at the service for getting navigation information.
To get navigation information, the PTV Navigator has to be in an active navigation situation.
Also, when the PTV Navigator is not the foreground application, be sure to set the "GPS active in the background" option in the PTV Navigator settings, otherwise no information will be sent.
See Register for event listening for more details.
Sending a message with this bundle key will register the listening to this event.
Messages sent from the PTV Navigator with the "what" field set to "MSG_RI_EVENT_DATA" and this bundle key will hold the following information:
Compatibility mode (MSG_RI_SET_COMPATIBILITY_MODE) set to true:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_NAVIGATION_INFO | int | |
DestinationName | The last target name | String | |
DestinationMercPosX | The mercator x position of the last target | int | |
DestinationMercPosY | The mercator x position of the last target | int | |
NextDestinationName | The next targets name | String | |
NextDestinationMercPosX | The mercator x position of the next target | int | |
NextDestinationMercPosY | The mercator x position of the next target | int | |
TimeToDestination | The time to the last destination with delays caused by traffic events | long | |
DistToDestination | The distance to the last destination | long | |
TimeToNextDestination | The time to the next destination with delays caused by traffic events | long | |
DistToNextDestination | The distance to the next destination | long | |
RoadType | The road type of the current segment [0..14] | int | |
TrafficDelayOnRoute | The current traffic delay on the route from the current position | int |
Compatibility mode (MSG_RI_SET_COMPATIBILITY_MODE) set to false:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_NAVIGATION_INFO | int | |
DestinationName | The last target name | String | |
DestinationLongitude | The longitude of the last target | double | |
DestinationLatitude | The latitude of the last target | double | |
NextDestinationName | The next targets name | String | |
NextDestinationLongitude | The longitude of the next target | double | |
NextDestinationLatitude | The latitude of the next target | double | |
TimeToDestination | The time to the last destination with delays caused by traffic events in [s] | long | |
DistToDestination | The distance to the last destination in [m] | long | |
TimeToNextDestination | The time to the next destination with delays caused by traffic events in [s] | long | |
DistToNextDestination | The distance to the next destination in [m] | long | |
TrafficDelayOnRoute | The current traffic delay on the route from the current position in [s] | int | |
TrafficLength | The length of the traffic delay on the route from the current position in [m] | double |
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
final int EVENT_SPEEDLIMIT = 3 [private, inherited] |
Get speed limit and velocity information.
Get information about the current velocity and the road type of the speedlimit, if available.
In cases where the next speedlimit is 0, the road type can be used to determine if we are on a highway or in a town.
Sending a message with this bundle key will register the listening to this event.
Messages sent from the PTV Navigator with the "what" field set to "MSG_RI_EVENT_DATA" and this bundle key will hold the following information:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_SPEEDLIMIT | int | |
CurrentVelocity | The current velocity | int | |
SpeedLimitCar | The current speedlimit for cars | int | |
SpeedLimitTruck | The current speedlimit for trucks (not set yet) | int | |
SpeedLimitCarIsImplicit | Not available anymore, always set to false. Flag whether the current speedlimit for cars is implicit or explicit | boolean | |
SpeedLimitTruckIsImplicit | Not available anymore, always set to false. Flag whether the current speedlimit for trucks is implicit or explicit | boolean | |
NextSpeedLimitCar | Not available anymore, always set to 0. The next changing speedlimit for cars from the current position, or -1 if the limit is not changing anymore | int | |
NextSpeedLimitTruck | Not available anymore, always set to 0. The next changing speedlimit for trucks from the current position, or -1 if the limit is not changing anymore | int | |
DistToNextSpeedLimitCar | Not available anymore, always set to 0. The distance to the next speedlimit for cars, or 0, if the limit is not changing anymore | long | |
DistToNextSpeedLimitTruck | Not available anymore, always set to 0. The distance to the next speedlimit for trucks, or 0, if the limit is not changing anymore | long | |
RoadTypeOfNextSpeedLimitCar | Not available anymore, always set to 0. The road type of the segment of the next speedlimit for cars, or 0, if the limit is not changing anymore | int | |
RoadTypeOfNextSpeedLimitTruck | Not available anymore, always set to 0. The road type of the segment of the next speedlimit for trucks, or 0, if the limit is not changing anymore | int |
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
final int EVENT_DESTINATION_REACHED = 4 [private, inherited] |
Get a message when the destination was reached.
Sending a message with this bundle key will register the listening to this event.
Messages sent from the PTV Navigator with the "what" field set to "MSG_RI_EVENT_DATA" and this bundle key will hold the following information:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_DESTINATION_REACHED | int |
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
final int EVENT_NAVIGATION_STOPPED = 5 [private, inherited] |
Get a message when the navigation was stopped by the user.
Sending a message with this bundle key will register the listening to this event.
Messages sent from the PTV Navigator with the "what" field set to "MSG_RI_EVENT_DATA" and this bundle key will hold the following information:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_NAVIGATION_STOPPED | int |
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
final int EVENT_REROUTE = 6 [private, inherited] |
Get a message when a rerouting occured.
Sending a message with this bundle key will register the listening to this event.
Messages sent from the PTV Navigator with the "what" field set to "MSG_RI_EVENT_DATA" and this bundle key will hold the following information:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_REROUTE | int | |
RerouteType | Not used anymore. Set to 0. Type of Rerouting (REROUTE_TO_ROUTE(1), REROUTE_TO_TARGET(2), ENQUIRE_REROUTE(3), AUTOMATIC_REROUTE(4), ENQUIRED_REROUTE_ACCEPTED(5) | int | |
TimeDiff | Not used anymore. Set to 0. Time difference to old route (only included with types ENQUIRE_REROUTE(3), AUTOMATIC_REROUTE(4), ENQUIRED_REROUTE_ACCEPTED(5)) | int | |
DistDiff | Not used anymore. Set to 0. Distance difference to old route (only included with types ENQUIRE_REROUTE(3), AUTOMATIC_REROUTE(4), ENQUIRED_REROUTE_ACCEPTED(5)) | int |
Key | Value | Type |
---|---|---|
REROUTE_TO_ROUTE | 1 | A local rerouting has happened |
REROUTE_TO_TARGET | 2 | The complete route was recalculated |
ENQUIRE_REROUTE | 3 | A better route is available. Waiting for user interaction. |
AUTOMATIC_REROUTE | 4 | A better route was automatically taken. |
ENQUIRED_REROUTE_ACCEPTED | 5 | A better route was accepted. |
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
final int EVENT_LOCATION_CONTEXT = 17 [private, inherited] |
Get location contextual information like the speed limit and road information at the current position.
Sending a message with this bundle key will register the listening to this event.
Messages sent from the PTV Navigator with the "what" field set to "MSG_RI_EVENT_DATA" and this bundle key will hold the following information:
Key | Value | Type | Info |
---|---|---|---|
EventType | EVENT_LOCATION_CONTEXT | int | |
CurrentVelocity | The current velocity in [km/h] | long | |
SpeedLimit | The current speedlimit in [km/h] | long | |
Speed | The current speed or -1 if not available | int | |
StreetName | The current street name | string | |
City | The current city name | string | |
Country | The current country | string | |
CountryCode | The current country code | string | |
IsTunnel | Returns true if the current location is in a tunnel | boolean | |
IsUnderpass | Returns true if the current location is an underpass | boolean | |
FunctionalRoadClass | The functional road class of the current segment | int | |
RoadType | The road type of the current segment, see RoadType for more details | int | |
IsLeftHandDriving | Returns true if the driving side on the given road is left | boolean |
Road Types:
RoadType | Info | Id |
---|---|---|
Boundary | A road is a boundary of an area like a Country | 0 |
MainRoad | A main road relative to a service road | 1 |
NoSpecial | Normal road | 2 |
Parallel | A road is parallel to one part of a controlled access road | 3 |
Pedestrian | A pedestrian road | 4 |
PedestrianZone | A pedestrian zone | 5 |
Ramp | A road connecting two roads at different grade or entrance and exits between controlled access and non-controlled access network | 6 |
Roundabout | A road is located within the closed loop of a roundabout | 7 |
RoundaboutInterior | A road is inside a roundabout | 8 |
ServiceAccess | Indicates that a road is an entry, a part, or an exit of a service facility like motorway rest area, parking facility or golf course | 9 |
ServiceRoad | A road for local urban access in parallel to a main road of a usually higher class | 10 |
SlipRoad | A road is a slip road of crossing at grade | 11 |
SpecialTrafficFigure | A road is a part of constructions with comparable exit behavior as the exit behavior of a roundabout. However, it can be a closed circular or elongated or even rectangular construction of roads which is not recognized as a roundabout | 12 |
Square | A road is a part of a square. A square is a paved area where a car can travel but there are no legally defined traffic paths | 13 |
Functional Road Class:
Functional road class. The value is in the range 0..7 with 0 representing the most important functional road class. The higher the value the less important the road class.
RI_ERROR_NONE if everything is ok.
RI_ERROR_RI_DISABLED if the Remote Interface service is disabled and/or not licensed.
RI_ERROR_NOT_INITIALIZED if the Remote Interface service is not initialized yet.
RI_ERROR_NO_LICENSE if the navigator has no valid license.
© PTV Group 2023 | Generated on Fri May 10 2024 10:16:00 for PTV Navigator Remote Interface Documentation by 1.7.3 |