1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto3"; 18 19package android.car.cluster.navigation; 20 21option java_package = "android.car.cluster.navigation"; 22option java_outer_classname = "NavigationState"; 23 24// A reference to an image. This consists of a 'content://' style URI plus 25// attributes describing the image. 26// 27// Sizing: The aspect ratio of the image is given in aspect_ratio. 28// When requesting the image using this URI a 'w' and 'h' parameter 29// must be added to the URI parameter list to request an image size. 30// There is no guarantee that the specific size requested will actually 31// be returned, however. 32// Margins: The referenced image does not have internal margins. 33// Format: Content URI must reference a file with MIME type 34// 'image/png', 'image/jpeg' or 'image/bmp'. 35// Color: Images can be either "tintable" or not. A "tintable" image is such 36// that 37// all its content is defined in its alpha channel, while its color 38// (all other channels) can be altered without losing information 39// (e.g. icons). A non "tintable" images contains information in all its 40// channels (e.g. photos). 41// Caching: Given the same image reference and the same requested size, 42// it is assumed that the exact same image will always be returned. 43// This means that it should be safe to cache an image once requested 44// the first time, using this image reference plus requested size as 45// key, for as long as needed. 46message ImageReference { 47 // A URI defining the location that the image can be retrieved from. 48 // 49 // When requesting the image from this URI, a desired image size must be 50 // specified by editing the parameter list to add the following two 51 // parameters: 52 // w: width desired maximum width (must be greater than 0) 53 // h: height desired maximum height (must be greater than 0) 54 // 55 // For example, if the `content_uri` is 56 // `content://some.package.name/some/path`, then the request must be: 57 // `content://some.package.name/some/path?w=<width>&h=<height>` (with <width> 58 // and <height> replaced with the requested values). 59 // 60 // Note that the resulting image is not guaranteed to match the requested 61 // size. 62 string content_uri = 1; 63 64 // The aspect ratio of the image, being width divided by height. 65 double aspect_ratio = 2; 66 67 // Indicates whether this image is "tintable" or not. 68 // An image is "tintable" when all its content is defined in its 69 // alpha-channel, designed to be colorized 70 // (e.g. using android.graphics.PorterDuff.Mode#SRC_ATOP image composition). 71 bool is_tintable = 3; 72} 73 74// Distance along the planned route between relevant points in the navigation 75message Distance { 76 // Possible units used to display this distance. 77 enum Unit { 78 // Display unit is unknown, no distance information should be displayed. 79 UNKNOWN = 0; 80 METERS = 1; 81 KILOMETERS = 2; 82 MILES = 3; 83 FEET = 4; 84 YARDS = 5; 85 } 86 87 // The distance in meters. 88 int32 meters = 1; 89 90 // The distance measured in the unit indicated at `display_units`, already 91 // internationalized and ready for display, or empty if no distance value was 92 // provided. If empty, the distance shouldn’t be displayed to the driver. 93 // 94 // This distance is for display only (it might be a rounded representation of 95 // the actual distance) and must match the distance displayed anywhere else 96 // in the vehicle. 97 // 98 // For example, a distance of 1200 meters in ES_es locale could be 99 // represented with `display_value` of "1,2" and `display_units` of 100 // KILOMETERS. 101 string display_value = 2; 102 103 // The distance unit that should be used to display the distance value 104 // (adjusted to the current user's locale and/or location). This matches the 105 // unit used in `display_value`. 106 Unit display_units = 3; 107} 108 109// Information about a maneuver that the driver will be required to perform. 110message Maneuver { 111 // Next ID: 57 112 enum Type { 113 // Maneuver type is unknown, no maneuver information should be displayed. 114 UNKNOWN = 0; 115 116 // Starting point of the navigation (e.g. "Start driving on Main St.") 117 DEPART = 1; 118 119 // No turn, but the street name changes (e.g. "Continue on Main St.") 120 NAME_CHANGE = 2; 121 122 // No turn, from 0 (included) to 10 (excluded) degrees. Used when we just 123 // wish to say "Keep left". Note that this is used in contrast to STRAIGHT 124 // for disambiguating cases where there is more than one option to go into 125 // the same general direction. 126 KEEP_LEFT = 3; 127 // No turn, from 0 (included) to 10 (excluded) degrees. Used when we just 128 // wish to say "Keep right". Note that this is used in contrast to STRAIGHT 129 // for disambiguating cases where there is more than one option to go into 130 // the same general direction. 131 KEEP_RIGHT = 4; 132 133 // Slight left turn at an intersection, from 10 (included) to 45 (excluded) 134 // degrees. 135 TURN_SLIGHT_LEFT = 5; 136 // Slight right turn at an intersection, from 10 (included) to 45 (excluded) 137 // degrees. 138 TURN_SLIGHT_RIGHT = 6; 139 140 // Regular left turn at an intersection, from 45 (included) to 135 141 // (excluded) degrees. 142 TURN_NORMAL_LEFT = 7; 143 // Regular right turn at an intersection, from 45 (included) to 135 144 // (excluded) degrees. 145 TURN_NORMAL_RIGHT = 8; 146 147 // Sharp left turn at an intersection, from 135 (included) to 175 (excluded) 148 // degrees. 149 TURN_SHARP_LEFT = 9; 150 // Sharp right turn at an intersection, from 135 (included) to 175 151 // (excluded) degrees. 152 TURN_SHARP_RIGHT = 10; 153 154 // A left turn onto the opposite side of the same street, from 175 155 // (included) to 180 (included) degrees. 156 U_TURN_LEFT = 11; 157 // A right turn onto the opposite side of the same street, from 175 158 // (included) to 180 (included) degrees. 159 U_TURN_RIGHT = 12; 160 161 // A slight left turn to enter a turnpike or freeway. See TURN_SLIGHT_LEFT 162 // for the definition of slight. 163 ON_RAMP_SLIGHT_LEFT = 13; 164 // A slight right turn to enter a turnpike or freeway. See TURN_SLIGHT_RIGHT 165 // for the definition of slight. 166 ON_RAMP_SLIGHT_RIGHT = 14; 167 // A normal left turn to enter a turnpike or freeway. See TURN_NORMAL_LEFT 168 // for the definition of normal. 169 ON_RAMP_NORMAL_LEFT = 15; 170 // A normal right turn to enter a turnpike or freeway. See TURN_NORMAL_RIGHT 171 // for the definition of normal. 172 ON_RAMP_NORMAL_RIGHT = 16; 173 // A sharp left turn to enter a turnpike or freeway. See TURN_SHARP_LEFT 174 // for the definition of sharp. 175 ON_RAMP_SHARP_LEFT = 17; 176 // A sharp right turn to enter a turnpike or freeway. See TURN_SHARP_RIGHT 177 // for the definition of sharp. 178 ON_RAMP_SHARP_RIGHT = 18; 179 // A left u-turn to enter a turnpike or freeway. See U_TURN_LEFT for the 180 // definition of u-turn. 181 ON_RAMP_U_TURN_LEFT = 19; 182 // A right u-turn to enter a turnpike or freeway. See U_TURN_RIGHT for the 183 // definition of u-turn. 184 ON_RAMP_U_TURN_RIGHT = 20; 185 186 // A slight left turn to exit a turnpike or freeway. See TURN_SLIGHT_LEFT 187 // for the definition of slight. 188 OFF_RAMP_SLIGHT_LEFT = 21; 189 // A slight right turn to exit a turnpike or freeway. See TURN_SLIGHT_RIGHT 190 // for the definition of slight. 191 OFF_RAMP_SLIGHT_RIGHT = 22; 192 // A left turn to exit a turnpike or freeway. See TURN_NORMAL_LEFT 193 // for the definition of normal. 194 OFF_RAMP_NORMAL_LEFT = 23; 195 // A right turn to exit a turnpike or freeway. See TURN_NORMAL_RIGHT 196 // for the definition of normal. 197 OFF_RAMP_NORMAL_RIGHT = 24; 198 199 // Road diverges (e.g. "Keep left at the fork"). 200 FORK_LEFT = 25; 201 // Road diverges (e.g. "Keep right at the fork"). 202 FORK_RIGHT = 26; 203 204 // Current road joins another (e.g. "Merge right onto Main St."). 205 MERGE_LEFT = 27; 206 // Current road joins another (e.g. "Merge left onto Main St."). 207 MERGE_RIGHT = 28; 208 // Current road joins another (e.g. "Merge onto Main St."). 209 MERGE_SIDE_UNSPECIFIED = 54; 210 211 // Roundabout entrance on which the current road ends (e.g. "Enter the 212 // roundabout"). 213 ROUNDABOUT_ENTER = 29; 214 215 // Used when leaving a roundabout when the step starts in it (e.g. "Exit 216 // the roundabout"). 217 ROUNDABOUT_EXIT = 30; 218 219 // Entrance and exit (e.g. "At the roundabout, take Nth exit") on a 220 // clockwise roundabout (as seen from above, typical for left-hand drive 221 // countries). 222 ROUNDABOUT_ENTER_AND_EXIT_CW = 55; 223 // Entrance and sharp right turn exit (e.g. "At the roundabout, take Nth 224 // exit") on a clockwise roundabout (as seen from above, typical for 225 // left-hand drive countries). See TURN_SHARP_RIGHT for the definition of 226 // sharp. 227 ROUNDABOUT_ENTER_AND_EXIT_CW_SHARP_RIGHT = 31; 228 // Entrance and regular right turn exit (e.g. "At the roundabout, take Nth 229 // exit") on a clockwise roundabout (as seen from above, typical for 230 // left-hand drive countries). See TURN_NORMAL_RIGHT for the definition of 231 // normal. 232 ROUNDABOUT_ENTER_AND_EXIT_CW_NORMAL_RIGHT = 32; 233 // Entrance and slight right turn exit (e.g. "At the roundabout, take Nth 234 // exit") on a clockwise roundabout (as seen from above, typical for 235 // left-hand drive countries). See TURN_SLIGHT_RIGHT for the definition of 236 // slight. 237 ROUNDABOUT_ENTER_AND_EXIT_CW_SLIGHT_RIGHT = 33; 238 // Entrance and straight exit (e.g. "At the roundabout, take Nth exit") on a 239 // clockwise roundabout (as seen from above, typical for left-hand drive 240 // countries). 241 ROUNDABOUT_ENTER_AND_EXIT_CW_STRAIGHT = 34; 242 // Entrance and sharp left turn exit (e.g. "At the roundabout, take Nth 243 // exit") on a clockwise roundabout (as seen from above, typical for 244 // left-hand drive countries). See TURN_SHARP_LEFT for the definition of 245 // sharp. 246 ROUNDABOUT_ENTER_AND_EXIT_CW_SHARP_LEFT = 35; 247 // Entrance and regular left turn exit (e.g. "At the roundabout, take Nth 248 // exit") on a clockwise roundabout (as seen from above, typical for 249 // left-hand drive countries). See TURN_NORMAL_LEFT for the definition of 250 // normal. 251 ROUNDABOUT_ENTER_AND_EXIT_CW_NORMAL_LEFT = 36; 252 // Entrance and slight left turn exit (e.g. "At the roundabout, take Nth 253 // exit") on a clockwise roundabout (as seen from above, typical for 254 // left-hand drive countries). See TURN_SLIGHT_LEFT for the definition of 255 // slight. 256 ROUNDABOUT_ENTER_AND_EXIT_CW_SLIGHT_LEFT = 37; 257 // Entrance and u-turn exit (e.g. "At the roundabout, take Nth exit") on a 258 // clockwise roundabout (as seen from above, typical for left-hand drive 259 // countries). 260 ROUNDABOUT_ENTER_AND_EXIT_CW_U_TURN = 38; 261 262 // Entrance and exit (e.g. "At the roundabout, take Nth exit") on a 263 // counter-clockwise roundabout (as seen from above, typical for right-hand 264 // drive countries). 265 ROUNDABOUT_ENTER_AND_EXIT_CCW = 56; 266 // Entrance and sharp right turn exit (e.g. "At the roundabout, take Nth 267 // exit") on a counter-clockwise roundabout (as seen from above, typical for 268 // right-hand drive countries). See TURN_SHARP_RIGHT for the definition of 269 // sharp. 270 ROUNDABOUT_ENTER_AND_EXIT_CCW_SHARP_RIGHT = 39; 271 // Entrance and regular right turn exit (e.g. "At the roundabout, take Nth 272 // exit") on a counter-clockwise roundabout (as seen from above, typical for 273 // right-hand drive countries). See TURN_NORMAL_RIGHT for the definition of 274 // normal. 275 ROUNDABOUT_ENTER_AND_EXIT_CCW_NORMAL_RIGHT = 40; 276 // Entrance and slight right turn exit (e.g. "At the roundabout, take Nth 277 // exit") on a counter-clockwise roundabout (as seen from above, typical for 278 // right-hand drive countries). See TURN_SLIGHT_RIGHT for the definition of 279 // slight. 280 ROUNDABOUT_ENTER_AND_EXIT_CCW_SLIGHT_RIGHT = 41; 281 // Entrance and straight exit (e.g. "At the roundabout, take Nth exit") on a 282 // counter-clockwise roundabout (as seen from above, typical for right-hand 283 // drive countries). 284 ROUNDABOUT_ENTER_AND_EXIT_CCW_STRAIGHT = 42; 285 // Entrance and sharp left turn exit (e.g. "At the roundabout, take Nth 286 // exit") on a counter-clockwise roundabout (as seen from above, typical for 287 // right-hand drive countries). See TURN_SHARP_LEFT for the definition of 288 // sharp. 289 ROUNDABOUT_ENTER_AND_EXIT_CCW_SHARP_LEFT = 43; 290 // Entrance and regular left turn exit (e.g. "At the roundabout, take Nth 291 // exit") on a counter-clockwise roundabout (as seen from above, typical for 292 // right-hand drive countries). See TURN_NORMAL_LEFT for the definition of 293 // normal. 294 ROUNDABOUT_ENTER_AND_EXIT_CCW_NORMAL_LEFT = 44; 295 // Entrance and slight left turn exit (e.g. "At the roundabout, take Nth 296 // exit") on a counter-clockwise roundabout (as seen from above, typical for 297 // right-hand drive countries). See TURN_SLIGHT_LEFT for the definition of 298 // slight. 299 ROUNDABOUT_ENTER_AND_EXIT_CCW_SLIGHT_LEFT = 45; 300 // Entrance and u-turn exit (e.g. "At the roundabout, take Nth exit") on a 301 // counter-clockwise roundabout (as seen from above, typical for right-hand 302 // drive countries). 303 ROUNDABOUT_ENTER_AND_EXIT_CCW_U_TURN = 46; 304 305 // Driver should steer straight. 306 STRAIGHT = 47; 307 308 // Drive towards a boat ferry for vehicles (e.g. "Take the ferry"). 309 FERRY_BOAT = 48; 310 311 // Drive towards a train ferry for vehicles (e.g. "Take the train"). 312 FERRY_TRAIN = 49; 313 314 // Arrival to a destination where the direction is unknown. 315 DESTINATION = 50; 316 317 // Arrival to a destination located straight ahead. 318 DESTINATION_STRAIGHT = 51; 319 // Arrival to a destination located on the left side of the road. 320 DESTINATION_LEFT = 52; 321 // Arrival to a destination located on the right side of the road. 322 DESTINATION_RIGHT = 53; 323 } 324 325 // Extended set of maneuver types. 326 // Added in Android T. 327 // Next ID: 11 328 enum TypeV2 { 329 // Maneuver type is unknown, no maneuver information should be displayed. 330 UNKNOWN_V2 = 0; 331 332 // Roundabout entrance on which the current road ends (e.g. "Enter the 333 // roundabout") for a clockwise roundabout (as seen from above, typical for 334 // left-hand drive countries). 335 ROUNDABOUT_ENTER_CW = 1; 336 337 // Used when leaving a roundabout when the step starts in it (e.g. "Exit the 338 // roundabout") for a clockwise roundabout (as seen from above, typical for 339 // left-hand drive countries). 340 ROUNDABOUT_EXIT_CW = 2; 341 342 // Roundabout entrance on which the current road ends (e.g. "Enter the 343 // roundabout") for a counter-clockwise roundabout (as seen from above, 344 // typical for right-hand drive countries). 345 ROUNDABOUT_ENTER_CCW = 3; 346 347 // Used when leaving a roundabout when the step starts in it (e.g. "Exit the 348 // roundabout") for a counter-clockwise roundabout (as seen from above, 349 // typical for right-hand drive countries). 350 ROUNDABOUT_EXIT_CCW = 4; 351 352 // Entrance and exit (e.g. "At the roundabout, take Nth exit") on a 353 // clockwise roundabout (as seen from above, typical for left-hand drive 354 // countries). 355 ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 5; 356 357 // Entrance and exit (e.g. "At the roundabout, take Nth exit") on a 358 // counter-clockwise roundabout (as seen from above, typical for right-hand 359 // drive countries). 360 ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 6; 361 362 // Drive towards a boat ferry for vehicles (e.g. "Take the ferry").Used when 363 // the ferry entrance is to the left. 364 FERRY_BOAT_LEFT = 7; 365 366 // Drive towards a boat ferry for vehicles (e.g. "Take the ferry"). Used 367 // when the ferry entrance is to the right. 368 FERRY_BOAT_RIGHT = 8; 369 370 // Drive towards a train ferry for vehicles (e.g. "Take the train"). Used 371 // when the ferry entrance is to the left. 372 FERRY_TRAIN_LEFT = 9; 373 374 // Drive towards a train ferry for vehicles (e.g. "Take the train"). Used 375 // when the ferry entrance is to the right. 376 FERRY_TRAIN_RIGHT = 10; 377 } 378 379 // The type of the maneuver. 380 Type type = 1; 381 382 // The most accurate representation of the type of a maneuver. If this field 383 // is populated, then this field should be used for the type of the maneuver. 384 // For example, if Maneuver#type_v2=ROUNDABOUT_ENTER_CW and 385 // Maneuver#type=ROUNDABOUT_ENTER, the value to be used for the type should be 386 // ROUNDABOUT_ENTER_CW. If this field is UNKNOWN_V2 then the value to be used 387 // for the type can be found in Maneuver#type. 388 // Added in Android T. 389 TypeV2 type_v2 = 4; 390 391 // The roundabout exit number, starting from 1 to designate the first exit 392 // after joining the roundabout, and increasing in circulation order. 393 // Only relevant if type is ROUNDABOUT_EXIT or any variation of 394 // ROUNDABOUT_ENTER_AND_EXIT. 395 // 396 // For example, if the driver is joining a counter-clockwise roundabout 397 // with 4 exits, then the exit to the right would be exit #1, the one 398 // straight ahead would be exit #2, the one to the left would be exit #3 399 // and the one used by the driver to join the roundabout would be exit #4. 400 int32 roundabout_exit_number = 2; 401 402 // A reference to an image representing this maneuver, 403 // or not present if image representation is not available. 404 ImageReference icon = 3; 405 406 // Angle describing the turn needed to perform to exit a roundabout, used for 407 // ROUNDABOUT_ENTER_AND_EXIT_*_WITH_ANGLE maneuver types. It can take a value 408 // from 0 (excluded) to 360 (included) where the entry point is at 0 409 // incrementing in a clockwise/counter-clockwise fashion depending on the 410 // rotational driving direction in the roundabout. For example, in a 411 // counter-clockwise roundabout, if you exit by making a right turn the angle 412 // is 90 degrees, if you exit driving straight the angle is 180 degrees, if 413 // you exit by making a left turn the angle is 270 degrees and if you make a U 414 // turn the angle is 360 degrees. In a clockwise roundabout the values are 415 // mirrored i.e. if you exit by making a left turn the angle is 90 degrees, if 416 // you exit driving straight the angle is 180 degrees, if you exit by making a 417 // right turn the angle is 270 degrees and if you make a U turn the angle is 418 // 360 degrees. 419 // 180 180 420 // | | 421 // | | 422 // / \ / \ 423 // 270 <----| |----> 90 90 <----| |----> 270 424 // \ / \ / 425 // | | 426 // | | 427 // 0, 360 0, 360 428 // Counter-clockwise roundabout Clockwise roundabout 429 // 430 // The values can be more granular depending on the layout of the roundabout. 431 // Added in Android T. 432 int32 roundabout_exit_angle_degrees = 5; 433} 434 435// Configuration of a single lane of a road at a particular point in the 436// navigation. It describes all possible directions the driver could go 437// from this lane, and indicates which directions the driver could take 438// to stay on the navigation route. 439message Lane { 440 // One of the possible directions a driver can go when using a particular 441 // lane at a particular step in the navigation. This defines the icon(s) 442 // that must be combined to display a lane configuration to the user. 443 message LaneDirection { 444 enum Shape { 445 // The shape is unknown, in which case no lane information should be 446 // shown. 447 UNKNOWN = 0; 448 449 // No turn. 450 STRAIGHT = 1; 451 452 // Slight left turn, from 10 (included) to 45 (excluded) degrees. 453 SLIGHT_LEFT = 2; 454 455 // Slight right turn, from 10 (included) to 45 (excluded) degrees. 456 SLIGHT_RIGHT = 3; 457 458 // Regular left turn, from 45 (included) to 135 (excluded) degrees. 459 NORMAL_LEFT = 4; 460 461 // Regular right turn, from 45 (included) to 135 (excluded) degrees. 462 NORMAL_RIGHT = 5; 463 464 // Sharp left turn, from 135 (included) to 175 (excluded) degrees. 465 SHARP_LEFT = 6; 466 467 // Sharp right turn, from 135 (included) to 175 (excluded) degrees. 468 SHARP_RIGHT = 7; 469 470 // A left turn onto the opposite side of the same street, from 175 471 // (included) to 180 (included) degrees 472 U_TURN_LEFT = 8; 473 474 // A right turn onto the opposite side of the same street, from 175 475 // (included) to 180 (included) degrees 476 U_TURN_RIGHT = 9; 477 } 478 479 // The shape of this lane direction. 480 Shape shape = 1; 481 482 // True if this is a valid direction the driver can take in order to stay 483 // in the navigation route, or false if it will take the drive off the 484 // navigation route. 485 bool is_highlighted = 2; 486 } 487 488 // The possible directions a driver can take from this lane. 489 repeated LaneDirection lane_directions = 1; 490} 491 492// An instruction to a user to perform an action during their drive composed of 493// a sequence of graphic elements (e.g. text, images) to be displayed 494// one after another. 495// 496// Each sequence will have a plain text representation in `alternate_text` 497// and in the case of the absence of a rich representation, 498// the sequence of elements in `elements` may be left empty. 499// The textual representation may also be used as a fallback for when the 500// elements fail to render. 501message Cue { 502 // One item in the sequence that makes up a Cue, 503 // a sequence of graphic elements that can be displayed one after another. 504 // 505 // A CueElement can contain text, a graphic element, or both. 506 // The text of a CueElement with an image reference should be representative 507 // of the image. 508 // 509 // The image should be rendered if possible instead of the 510 // text. Otherwise, `CueElement.text` should be used as a fallback. 511 // 512 // If rendering fails and the text is empty, then no elements in the sequence 513 // should be rendered and `Cue.alternate_text` must be used instead. 514 // 515 // New graphic elements might be added in the future. If such elements are 516 // unknown to the OEM rendering service, they will be delivered as text. 517 message CueElement { 518 // The textual representation of this element. 519 // 520 // If image is provided, then this is used as a fallback in the case of 521 // render failures, otherwise this is the string to be used when rendering 522 // this element. 523 string text = 1; 524 525 // An image representing this element. This representation should be used 526 // over the textual representation whenever possible. 527 // 528 // In case of failure to render, `text` should be shown instead. If 529 // rendering fails and text is empty, then no elements should be shown and 530 // instead the `alternate_text` should be shown. 531 ImageReference image = 2; 532 } 533 534 // The sequence of graphic elements. 535 // 536 // If no rich cue representation is available, 537 // the list may be empty and `alternate_text` should be used as a fallback. 538 // Spacing between the elements is provided, and rendering services should 539 // not attempt to add their own spacing between the CueElement objects. 540 repeated CueElement elements = 1; 541 542 // The plain-text string representing the content of this Cue. 543 string alternate_text = 2; 544} 545 546// An action that the driver should take in order to remain on the current 547// navigation route. 548// 549// For example: turning onto a street, taking a highway exit and merging onto 550// a different highway, continuing straight through a roundabout, etc. 551message Step { 552 // The distance from the current position to the point where 553 // this navigation step should be executed. 554 Distance distance = 1; 555 556 // The maneuver to be performed on this step, 557 // or not present if this step doesn't involve a maneuver. 558 Maneuver maneuver = 2; 559 560 // The configuration of road lanes at the point where the driver should 561 // execute this step, or an empty list if lane configuration metadata 562 // is not available. Lane configurations are listed from left to right. 563 repeated Lane lanes = 3; 564 565 // An image representing the lane configuration at this point in the 566 // navigation, or not present if the lanes configuration image was not 567 // provided. The image, if provided, is expected to contain: 568 // - A representation of all lanes, one next to the other in a single row. 569 // - For each lane, a set of arrows, representing each possible driving 570 // direction (e.g. straight, left turn, etc.) within such lane. 571 // - Each of such driving directions that would keep the driver within 572 // the navigation route should be highlighted. 573 // Lane configuration images are expected to be displayed in a canvas 574 // with fixed height and variable width. 575 ImageReference lanes_image = 4; 576 577 // Auxiliary instructions on how to complete this navigation step, 578 // described as a Cue object containing a sequence of texts 579 // (e.g. "onto ", "Wallaby way") and images (e.g. road badge of a highway). 580 // Separators, such as spaces, should be provided in the sequence. 581 // If space is not enough to display the complete content of this Cue 582 // instance, the beginning of these instructions must be displayed, 583 // cutting as much from the end as needed to fit. 584 Cue cue = 5; 585 586 // Indicates whether this step is about to be executed. 587 bool is_imminent = 6; 588 589 // The name of the road on which the driver will be after completing the 590 // maneuver in the step. This is a subset of the field Cue. The field Cue 591 // contains more information and is preferred to be used. 592 // Added in Android T. 593 Road road = 8; 594 595 // The time when the action being taken in the current step is estimated to be 596 // finished. At this time the next step is estimated to start (if there is 597 // one). This value is not set if it cannot be predicted, was not provided or 598 // is unknown. 599 // Added in Android T. 600 Timestamp estimated_time_at_end_of_step = 9; 601} 602 603// An object representing a latitude/longitude pair. This is expressed as a pair 604// of doubles representing degrees latitude and degrees longitude. Unless 605// specified otherwise, this must conform to the WGS84 standard 606// (http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf) Values must be 607// within normalized ranges. 608// 609// Copied from: 610// https://github.com/googleapis/googleapis/blob/master/google/type/latlng.proto 611message LatLng { 612 // The latitude in degrees. It must be in the range [-90.0, +90.0]. 613 double latitude = 1; 614 // The longitude in degrees. It must be in the range [-180.0, +180.0]. 615 double longitude = 2; 616} 617 618// A Timestamp represents a point in time independent of any time zone 619// or calendar, represented as seconds and fractions of seconds at 620// nanosecond resolution in UTC Epoch time. It is encoded using the 621// Proleptic Gregorian Calendar which extends the Gregorian calendar 622// backwards to year one. It is encoded assuming all minutes are 60 623// seconds long, i.e. leap seconds are "smeared" so that no leap second 624// table is needed for interpretation. Range is from 625// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. 626// By restricting to that range, we ensure that we can convert to 627// and from RFC 3339 date strings. 628// See 629// [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). 630// 631// This is a subset of 632// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/timestamp.proto 633message Timestamp { 634 // Reserved fields 635 reserved 2; 636 637 // Represents seconds of UTC time since Unix epoch 638 // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 639 // 9999-12-31T23:59:59Z inclusive. 640 int64 seconds = 1; 641} 642 643// Final or intermediate stop in a navigation route. 644message Destination { 645 // Congestion level on the way to a destination, 646 // compared to ideal driving conditions. 647 enum Traffic { 648 // Traffic information is not available 649 UNKNOWN = 0; 650 651 // High amount of traffic 652 HIGH = 1; 653 654 // Intermediate amount of traffic 655 MEDIUM = 2; 656 657 // Traffic level close to free flow 658 LOW = 3; 659 } 660 661 // The name of the destination (formatted for the current user's locale), 662 // or empty if destination name is unknown. 663 string title = 1; 664 665 // The address of the destination (formatted for the current user's locale), 666 // or empty if there is no address associated with this destination 667 string address = 2; 668 669 // The travel distance along the route from the current position to this 670 // destination, or not set if distance was not provided or is unknown. 671 Distance distance = 3; 672 673 // The estimated time at arrival at this destination, 674 // or not set if it was not provided or is unknown. 675 Timestamp estimated_time_at_arrival = 4; 676 677 // The timezone at destination (for example, ‘Europe/Paris’) 678 string zone_id = 5; 679 680 // The geo-location of this destination, 681 // or not set if not provided or unknown. 682 LatLng location = 6; 683 684 // The congestion level on the route to this destination, 685 // compared to to ideal driving conditions. 686 Traffic traffic = 7; 687 688 // The estimated duration between now and arrival, formatted for desired 689 // rounding (formatted for the current user's locale). For example, a 690 // duration of seven minutes and 15 seconds could be set here as "7 min". 691 string formatted_duration_until_arrival = 8; 692 693 // The estimated time at arrival at this destination, value is localized e.g., 694 // “3:45 pm PST”. The purpose of using a string is so the HU can display a 695 // value that matches what the navigation app might be presenting on different 696 // screens (for consistency among car screens). If HUs do not want to display 697 // the pre-formatted string, the field "Destination#estimated_time_at_arrival" 698 // which is a Timestamp can be used. This value is not set if it was not 699 // provided or is unknown. 700 // Added in Android T. 701 string formatted_estimated_time_at_arrival = 9; 702} 703 704// The description for a road. 705message Road { 706 // Name of the road, for example "Main St" or "101-S". 707 string name = 1; 708} 709 710// Authorization information for the data included in a NavigationStateProto message, used to 711// communicate how data may be used by receiver. 712message DataAuthorization { 713 // Identifier for this authorization. 714 string id = 1; 715} 716 717// Navigation state data to be displayed on the instrument cluster of a car. 718// This is composed of: 719// - a list of destinations 720// - the immediate step or steps in order to drive towards those destinations 721message NavigationStateProto { 722 // The navigation steps, in order of execution. 723 // It is up to the third-party navigation app to decide how many steps in 724 // advance will be provided (and need not be truncated by an upcoming 725 // destination). 726 repeated Step steps = 1; 727 728 // The destinations and intermediate stops in the navigation, 729 // sorted in the order in which the driver will arrive to them. 730 repeated Destination destinations = 2; 731 732 // The current road being driven, may not be set if the road 733 // being driven is unknown. This indicates where the driver is at the moment. 734 Road current_road = 3; 735 736 enum ServiceStatus { 737 // Service status is not known or an unknown value is specified. 738 SERVICE_STATUS_UNSPECIFIED = 0; 739 740 // Default service status, 741 // indicating that navigation state data is valid and up-to-date. 742 NORMAL = 1; 743 744 // New navigation information is being fetched, and an updated navigation 745 // state will be provided soon. OEM rendering services can use this signal 746 // to display a progress indicator to the user. 747 REROUTING = 2; 748 } 749 750 // Current status of the navigation. 751 ServiceStatus service_status = 4; 752 753 // List of authorization IDs associated with the data in this message. 754 repeated DataAuthorization data_authorizations = 5; 755} 756