Alexa Auto SDK  4.3
Public Types | Public Member Functions | List of all members
aace::navigation::Navigation Class Referenceabstract

Public Types

enum  ControlDisplay {
  ControlDisplay::SHOW_ROUTE_OVERVIEW,
  ControlDisplay::SHOW_DIRECTIONS_LIST,
  ControlDisplay::ZOOM_IN,
  ControlDisplay::ZOOM_OUT,
  ControlDisplay::CENTER_MAP_ON_CURRENT_LOCATION,
  ControlDisplay::ORIENT_NORTH,
  ControlDisplay::SCROLL_NORTH,
  ControlDisplay::SCROLL_UP,
  ControlDisplay::SCROLL_EAST,
  ControlDisplay::SCROLL_RIGHT,
  ControlDisplay::SCROLL_SOUTH,
  ControlDisplay::SCROLL_DOWN,
  ControlDisplay::SCROLL_WEST,
  ControlDisplay::SCROLL_LEFT,
  ControlDisplay::MUTE_ROUTE_GUIDANCE,
  ControlDisplay::UNMUTE_ROUTE_GUIDANCE
}
 

Public Member Functions

virtual bool cancelNavigation ()=0
 
virtual std::string getNavigationState ()=0
 
virtual void startNavigation (const std::string &payload)=0
 
virtual void announceManeuver (const std::string &payload)=0
 
virtual void announceRoadRegulation (RoadRegulation roadRegulation)=0
 
void navigationEvent (EventName event)
 
void navigationError (ErrorType type, ErrorCode code, const std::string &description)
 
void showAlternativeRoutesSucceeded (const std::string &payload)
 

Detailed Description

Navigation should be extended to handle navigation directives from the Engine.

Deprecated:
This platform interface is deprecated. Use the Alexa Auto Services Bridge (AASB) message broker to publish and subscribe to AASB messages instead.
See also
aace::core::MessageBroker

Member Enumeration Documentation

◆ ControlDisplay

Enumerator
SHOW_ROUTE_OVERVIEW 

A zoomed-out route overview for the active route.

SHOW_DIRECTIONS_LIST 

A list of directions for the active route.

ZOOM_IN 

Zoom in the map view.

ZOOM_OUT 

Zoom out the map view.

CENTER_MAP_ON_CURRENT_LOCATION 

Center the map on the user's current location.

ORIENT_NORTH 

Rotate the map to align the north cardinal direction up.

SCROLL_NORTH 

Scroll the map in the north cardinal direction.

SCROLL_UP 

Scroll the map up, relative to the orientation shown on screen.

SCROLL_EAST 

Scroll the map in the east cardinal direction.

SCROLL_RIGHT 

Scroll the map right, relative to the orientation shown on screen.

SCROLL_SOUTH 

Scroll the map in the south cardinal direction.

SCROLL_DOWN 

Scroll the map down, relative to the orientation shown on screen.

SCROLL_WEST 

Scroll the map in the west cardinal direction.

SCROLL_LEFT 

Scroll the map left, relative to the orientation shown on screen.

MUTE_ROUTE_GUIDANCE 

Mute the route guidance voice.

UNMUTE_ROUTE_GUIDANCE 

Un-mute the route guidance voice.

Member Function Documentation

◆ cancelNavigation()

virtual bool aace::navigation::Navigation::cancelNavigation ( )
pure virtual

Notifies the platform implementation to cancel navigation

Returns
true if the platform implementation successfully handled the call, else false

◆ getNavigationState()

virtual std::string aace::navigation::Navigation::getNavigationState ( )
pure virtual

Retrieve the navigation state from the platform. NOTE: You may return an empty string to default the payload to NOT_NAVIGATING

Returns
the current NavigationState JSON payload
)
"state": "{{STRING}}", //NAVIGATING or NOT_NAVIGATING
"waypoints": [
{
"type": "{{STRING}}", //Type of the waypoint - SOURCE, DESTINATION or INTERIM
"estimatedTimeOfArrival": {
"ideal": {{STRING}}, //Expected clock time ETA based on the ideal conditions. ISO 8601 UTC format
"predicted": {{STRING}} //predicted clock time ETA based on traffic conditions. ISO 8601 UTC format
},
"address": {
"addressLine1": "{{STRING}}", //Address line 1
"addressLine2": "{{STRING}}", //Address line 2
"addressLine3": "{{STRING}}", //Address line 3
"city": "{{STRING}}", //City
"districtOrCounty": "{{STRING}}", //district or county
"stateOrRegion": "{{STRING}}", //state or region
"countryCode": "{{STRING}}", //3 letter country code
"postalCode": "{{STRING}}", //postal code
},
"name": "{{STRING}}", // name of the waypoint such as home/starbucks etc.
"coordinate": [{{LATITUDE_DOUBLE}},{{LONGITUDE_DOUBLE}}],
},
{
"type": "{{STRING}}", //Type of the waypoint - SOURCE, DESTINATION or INTERIM
"estimatedTimeOfArrival": {
"ideal": {{STRING}}, //Expected clock time ETA based on the ideal conditions. ISO 8601 UTC format
"predicted": {{STRING}} //predicted clock time ETA based on traffic conditions. ISO 8601 UTC format
},
"address": {
"addressLine1": "{{STRING}}", //Address line 1
"addressLine2": "{{STRING}}", //Address line 2
"addressLine3": "{{STRING}}", //Address line 3
"city": "{{STRING}}", //city
"districtOrCounty": "{{STRING}}", //district or county
"stateOrRegion": "{{STRING}}", // state or region
"countryCode": "{{STRING}}", //3 letter country code
"postalCode": "{{STRING}}", // postal code
},
"name": "{{STRING}}", // name of the waypoint such as home/starbucks etc.
"coordinate": [{{LATITUDE_DOUBLE}},{{LONGITUDE_DOUBLE}}],
"pointOfInterest": {
"id": "{{STRING}}", //POI lookup Id vended from Alexa
"hoursOfOperation": [
{
"dayOfWeek": "{{STRING}}",
"hours": [
{
"open": "{{STRING}}", // ISO-8601 time with timezone format
"close": "{{STRING}}" // ISO-8601 time with timezone format
}
],
"type": "{{STRING}}" // Can be: OPEN_DURING_HOURS, OPEN_24_HOURS, etc.
}
],
"phoneNumber": "{{STRING}}"
}
},
...
],
"shapes": [
[
{{LATITUDE_DOUBLE}},
{{LONGITUDE_DOUBLE}}
],
[
{{LATITUDE_DOUBLE}},
{{LONGITUDE_DOUBLE}}
],
...
]
  • state (required) : current navigation state
  • waypoints (required) : list of waypoints, which can be empty
  • shapes (required) : list of route shapes, which can be empty or limited to 100 entries

◆ startNavigation()

virtual void aace::navigation::Navigation::startNavigation ( const std::string &  payload)
pure virtual

Notifies the platform implementation to start the navigation

Parameters
[in]payloadJSON data containing the destination information
)
"transportationMode":"{{STRING}}",
"waypoints":[
{
"type":"{{STRING}}",
"estimatedTimeOfArrival":{
"ideal":"{{STRING}}", //ISO-8601 time format
"predicted":"{{STRING}}" //ISO-8601 time format
},
"address": {
"addressLine1": "{{STRING}}", //Address line 1
"addressLine2": "{{STRING}}", //Address line 2
"addressLine3": "{{STRING}}", //Address line 3
"city": "{{STRING}}", //city
"districtOrCounty": "{{STRING}}", //district or county
"stateOrRegion": "{{STRING}}", // state or region
"countryCode": "{{STRING}}", //3 letter country code
"postalCode": "{{STRING}}", // postal code
},
"coordinate":[
"{{LATITUDE_DOUBLE}}",
"{{LONGITUDE_DOUBLE}}"
],
"name":"{{STRING}}"
},
{
"type":"{{STRING}}",
"estimatedTimeOfArrival":{
"ideal":"{{STRING}}",
"predicted":"{{STRING}}"
},
"address":"{{STRING}}",
"coordinate":[
"{{LATITUDE_DOUBLE}}",
"{{LONGITUDE_DOUBLE}}"
],
"name":"{{STRING}}"
"poiOfInterest":{
"id":"{{STRING}}",
"hoursOfOperation":[
{
"dayOfWeek":"{{STRING}}",
"hours":[
{
"open":"{{STRING}}",
"close":"{{STRING}}"
}
],
"type":"{{STRING}}"
}
],
"phoneNumber":"{{STRING}}"
}
}
]
  • transportationMode (optional) : Indicates the means by which to navigate to the destination (Values: BIKING, DRIVING, TRANSIT, WALKING)
  • waypoints (required) : list of waypoints, which can be empty
  • waypoints.type (required) : String from Enum Type of the waypoint - SOURCE, DESTINATION or INTERIM
  • estimatedTimeOfArrival (optional) : Arrival time at the destination
  • estimatedTimeOfArrival.ideal (optional) : Expected arrival time to the destination without considering any other signals such as traffic, diversions etc
  • estimatedTimeOfArrival.predicted (required) : Predicted arrival time to the destination based on traffic etc. In the case of actual and current matching, only current ETA will be populated
  • address (optional) : Waypoint address
  • address.addressLine1 (optional) : address line 1
  • address.addressLine2 (optional) : address line 2
  • address.addressLine3 (optional) : address line 3
  • address.city (optional) : city of destination address
  • address.stateOrRegion (optional) : city of destination address
  • address.countryCode (optional) : 3 letter country code in ISO 3166-1 alpha-3 format
  • address.districtOrCounty (optional) : district or county
  • address.postalCode (optional) : postal code
  • coordinate (required) : Contains the geolocation information of the destination
  • coordinate.latitudeInDegrees (required) : Latitude coordinate in degrees
  • coordinate.longitudeInDegrees (required) : Longitude coordinate in degrees
  • name (optional) : waypoint name
  • pointOfInterest (optional) : POI information related to the waypoint
  • pointOfInterest.id (optional) : Lookup Id for the POIs vended by Alexa
  • metadata.hoursOfOperation (optional) : Hours of operation for the business
  • hoursOfOperation.dayOfWeek (required) : Day of the week (Values: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY)
  • hoursOfOperation.hours (required): List of opening (open) and closing (close) hours for the day. Hours are in ISO-8601 time with timezone format
  • hoursOfOperation.type (required) : Indicates whether the location is open on this day or not (Values: OPEN_DURING_HOURS, OPEN_24_HOURS, CLOSED, UNKNOWN, HOLIDAY)
  • metadata.phoneNumber (optional) : The phone number of the location in E.164 format

◆ announceManeuver()

virtual void aace::navigation::Navigation::announceManeuver ( const std::string &  payload)
pure virtual

Notifies the platform implementation to give details about a maneuver to next waypoint on the route or a completely different waypoint off route.

Parameters
[in]payloadJSON data containing the maneuver information
)
"maneuverType": "{{STRING}}", // requested maneuver type
"queryTarget" : {
"name": "{{STRING}}" // name of the requested location
"address": { // address of requested location
"addressLine1": "{{STRING}}", //Address line 1
"addressLine2": "{{STRING}}", //Address line 2
"addressLine3": "{{STRING}}", //Address line 3
"city": "{{STRING}}", //city
"districtOrCounty": "{{STRING}}", //district or county
"stateOrRegion": "{{STRING}}", // state or region
"countryCode": "{{STRING}}", //3 letter country code
"postalCode": "{{STRING}}", // postal code
},
"coordinate": [{{LATITUDE_DOUBLE}},{{LONGITUDE_DOUBLE}}]
}
  • maneuverType (required) : Can take values : TURN, EXIT, ENTER, MERGE, LANE
  • queryTarget (optional) : Contains information about the targeted location on the route. If the location is a POI / user place / street address, Alexa will resolve and provide all 3 fields in the directive. If Alexa is not able to resolve the target, then at least one of the three fields will be present if a target was specified.
  • queryTarget.name (optional) : name of the requested location
  • queryTarget.coordinate (optional) : The geographic coordinates (lat, long) of the location as an ordered double list. (The order of the lat/long double list → [Latitude double , Longitude double])
  • queryTarget.address (optional) : Address of the requested location
  • queryTarget.address.addressLine1 (optional) : address line 1
  • queryTarget.address.addressLine2 (optional) : address line 2
  • queryTarget.address.addressLine3 (optional) : address line 3
  • queryTarget.address.city (optional) : city of destination address
  • queryTarget.address.stateOrRegion (optional) : city of destination address
  • queryTarget.address.countryCode (optional) : 3 letter country code in ISO 3166-1 alpha-3 format
  • queryTarget.address.districtOrCounty (optional) : district or county
  • queryTarget.address.postalCode (optional) : postal code

◆ announceRoadRegulation()

virtual void aace::navigation::Navigation::announceRoadRegulation ( RoadRegulation  roadRegulation)
pure virtual

Notifies the platform implementation to give details about road regulations about the road segments that the user is on

Parameters
[in]roadRegulationType of road regulation requested.(Values: SPEED_LIMIT, CARPOOL_RULES)

◆ navigationEvent()

void aace::navigation::Navigation::navigationEvent ( EventName  event)

Notifies the Engine of successful handling of a Navigation directive.

Parameters
[in]eventEventName describing which operation was successful.
  • EventName values based on directive:
  • startNavigation(): NAVIGATION_STARTED
  • showPreviousWaypoints(): PREVIOUS_WAYPOINTS_SHOWN
  • navigateToPreviousWaypoint(): PREVIOUS_NAVIGATION_STARTED
  • controlDisplay(): ROUTE_OVERVIEW_SHOWN, DIRECTIONS_LIST_SHOWN, ZOOMED_IN, ZOOMED_OUT, MAP_CENTERED, ORIENTED_NORTH, SCROLLED_NORTH, SCROLLED_UP, SCROLLED_EAST, SCROLLED_RIGHT, SCROLLED_SOUTH, SCROLLED_DOWN, SCROLLED_WEST, SCROLLED_LEFT, ROUTE_GUIDANCE_MUTED, ROUTE_GUIDANCE_UNMUTED
  • announceManeuver(): TURN_GUIDANCE_ANNOUNCED, EXIT_GUIDANCE_ANNOUNCED, ENTER_GUIDANCE_ANNOUNCED, MERGE_GUIDANCE_ANNOUNCED, LANE_GUIDANCE_ANNOUNCED
  • announceRoadRegulation(): SPEED_LIMIT_REGULATION_ANNOUNCED, CARPOOL_RULES_REGULATION_ANNOUNCED

◆ navigationError()

void aace::navigation::Navigation::navigationError ( ErrorType  type,
ErrorCode  code,
const std::string &  description 
)

Notifies the Engine of error in handling a Navigation directive.

Parameters
typeErrorType describing which operation failed.
  • ErrorType values based on directive:
  • startNavigation(): NAVIGATION_START_FAILED
  • showPreviousWaypoints(): SHOW_PREVIOUS_WAYPOINTS_FAILED
  • navigateToPreviousWaypoint(): PREVIOUS_NAVIGATION_START_FAILED
  • controlDisplay(): ROUTE_OVERVIEW_FAILED, DIRECTIONS_LIST_FAILED, ZOOM_IN_FAILED, ZOOM_OUT_FAILED, CENTER_FAILED, ORIENT_NORTH_FAILED, SCROLL_NORTH_FAILED, SCROLL_UP_FAILED, SCROLL_EAST_FAILED, SCROLL_RIGHT_FAILED, SCROLL_SOUTH_FAILED, SCROLL_DOWN_FAILED, SCROLL_WEST_FAILED, SCROLL_LEFT_FAILED, MUTED_ROUTE_GUIDANCE_FAILED, UNMUTED_ROUTE_GUIDANCE_FAILED
  • showAlternativeRoutes(): DEFAULT_ALTERNATE_ROUTES_FAILED, SHORTER_TIME_ROUTES_FAILED, SHORTER_DISTANCE_ROUTES_FAILED,
  • announceManeuver(): TURN_GUIDANCE_FAILED, EXIT_GUIDANCE_FAILED, ENTER_GUIDANCE_FAILED, MERGE_GUIDANCE_FAILED, LANE_GUIDANCE_FAILED,
  • announceRoadRegulation(): SPEED_LIMIT_REGULATION_FAILED, CARPOOL_RULES_REGULATION_FAILED
codeErrorCode describing the type of failure. (Values: INTERNAL_SERVICE_ERROR, ROUTE_NOT_FOUND, NO_PREVIOUS_WAYPOINTS, NOT_SUPPORTED, NOT_ALLOWED, NOT_NAVIGATING)
descriptionString providing additional information.

◆ showAlternativeRoutesSucceeded()

void aace::navigation::Navigation::showAlternativeRoutesSucceeded ( const std::string &  payload)

Notifies AVS of successful showing of alternative routes to the user

Parameters
[in]payloadJSON data containing the alternative route information
)
"inquiryType": "{{STRING}}" // DEFAULT, SHORTER_TIME, SHORTER_DISTANCE
"alternateRoute":
{
"labels": ["{{STRING}}"],
"savings": [
{
"type": "{{STRING}}", // DISTANCE, TIME
"amount": {{FLOAT}},
"unit": "{{STRING}}" // MINUTE, HOUR, YARD, FOOT, MILE, METER, KILOMETER
}
]
}
  • inquiryType (required) : alternate route preference
  • alternateRoute (required) : The best route found that matches inquiryType.
  • labels (required) : Unique names within a route used to distinguish between alternative routes. The label might contain the direction of the route when passing by the detail.
  • savings (optional) : List of savings achieved by the route. Savings can be in: Time and/or Distance
  • savings.type (required) : The type of savings
  • savings.amount (required) : The amount of savings achieved by the route. Alexa will use prescribed unit to convert the amount of savings to improve the driver's experience, if needed.
  • savings.unit (required) : Measurement unit of the savings

Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0