GnssNavigationMessage

class GnssNavigationMessage : Parcelable
kotlin.Any
   ↳ android.location.GnssNavigationMessage

A class containing a GNSS satellite Navigation Message.
Requires API level 24 (Android 7.0, Nougat)

Summary

Nested classes
abstract

Used for receiving GNSS satellite Navigation Messages from the GNSS engine.

Constants
static Int

The Navigation Message was received without any parity error in its navigation words.

static Int

The Navigation Message was received with words that failed parity check, but the receiver was able to correct those words.

static Int

The Navigation Message Status is 'unknown'.

static Int

Beidou D1 message contained in the structure.

static Int

Beidou D2 message contained in the structure.

static Int

Galileo F/NAV message contained in the structure.

static Int

Galileo I/NAV message contained in the structure.

static Int

Glonass L1 CA message contained in the structure.

static Int

GPS CNAV-2 message contained in the structure.

static Int

GPS L1 C/A message contained in the structure.

static Int

GPS L2-CNAV message contained in the structure.

static Int

GPS L5-CNAV message contained in the structure.

static Int

Message type unknown
Requires API level 24 (Android 7.0, Nougat)

Inherited constants
Public methods
Int

Gets the Status of the navigation message contained in the object.

Int

Gets the satellite ID.

String

Returns a string representation of the object.

Int

Gets the type of the navigation message contained in the object.

ByteArray

Gets the data of the reported GPS message.

Int

Gets the Message identifier.

Unit
writeToParcel(parcel: Parcel!, flags: Int)

Flatten this object in to a Parcel.

Int

Gets the sub-message identifier, relevant to the #getType() of the message.

Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Properties
static Parcelable.Creator<GnssNavigationMessage!>!

Requires API level 24 (Android 7.0, Nougat)

Constants

STATUS_PARITY_PASSED

added in API level 24
static val STATUS_PARITY_PASSED: Int

The Navigation Message was received without any parity error in its navigation words.
Requires API level 24 (Android 7.0, Nougat)

Value: 1

STATUS_PARITY_REBUILT

added in API level 24
static val STATUS_PARITY_REBUILT: Int

The Navigation Message was received with words that failed parity check, but the receiver was able to correct those words.
Requires API level 24 (Android 7.0, Nougat)

Value: 2

STATUS_UNKNOWN

added in API level 24
static val STATUS_UNKNOWN: Int

The Navigation Message Status is 'unknown'.
Requires API level 24 (Android 7.0, Nougat)

Value: 0

TYPE_BDS_D1

added in API level 24
static val TYPE_BDS_D1: Int

Beidou D1 message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 1281

TYPE_BDS_D2

added in API level 24
static val TYPE_BDS_D2: Int

Beidou D2 message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 1282

TYPE_GAL_F

added in API level 24
static val TYPE_GAL_F: Int

Galileo F/NAV message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 1538

TYPE_GAL_I

added in API level 24
static val TYPE_GAL_I: Int

Galileo I/NAV message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 1537

TYPE_GLO_L1CA

added in API level 24
static val TYPE_GLO_L1CA: Int

Glonass L1 CA message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 769

TYPE_GPS_CNAV2

added in API level 24
static val TYPE_GPS_CNAV2: Int

GPS CNAV-2 message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 260

TYPE_GPS_L1CA

added in API level 24
static val TYPE_GPS_L1CA: Int

GPS L1 C/A message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 257

TYPE_GPS_L2CNAV

added in API level 24
static val TYPE_GPS_L2CNAV: Int

GPS L2-CNAV message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 258

TYPE_GPS_L5CNAV

added in API level 24
static val TYPE_GPS_L5CNAV: Int

GPS L5-CNAV message contained in the structure.
Requires API level 24 (Android 7.0, Nougat)

Value: 259

TYPE_UNKNOWN

added in API level 24
static val TYPE_UNKNOWN: Int

Message type unknown
Requires API level 24 (Android 7.0, Nougat)

Value: 0

Public methods

getStatus

added in API level 24
fun getStatus(): Int

Gets the Status of the navigation message contained in the object.
Requires API level 24 (Android 7.0, Nougat)

getSvid

added in API level 24
fun getSvid(): Int

Gets the satellite ID.

Range varies by constellation. See definition at GnssStatus#getSvid(int)
Requires API level 24 (Android 7.0, Nougat)

toString

added in API level 24
fun toString(): String

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode()) 
Requires API level 24 (Android 7.0, Nougat)
Return
String: a string representation of the object.

getData

added in API level 24
fun getData(): ByteArray

Gets the data of the reported GPS message.

The bytes (or words) specified using big endian format (MSB first).

  • For GPS L1 C/A, Beidou D1 & Beidou D2, each subframe contains 10 30-bit words. Each word (30 bits) should be fit into the last 30 bits in a 4-byte word (skip B31 and B32), with MSB first, for a total of 40 bytes, covering a time period of 6, 6, and 0.6 seconds, respectively.
  • For Glonass L1 C/A, each string contains 85 data bits, including the checksum. These bits should be fit into 11 bytes, with MSB first (skip B86-B88), covering a time period of 2 seconds.
  • For Galileo F/NAV, each word consists of 238-bit (sync & tail symbols excluded). Each word should be fit into 30-bytes, with MSB first (skip B239, B240), covering a time period of 10 seconds.
  • For Galileo I/NAV, each page contains 2 page parts, even and odd, with a total of 2x114 = 228 bits, (sync & tail excluded) that should be fit into 29 bytes, with MSB first (skip B229-B232).

Requires API level 24 (Android 7.0, Nougat)
Return
ByteArray: This value will never be null.

getMessageId

added in API level 24
fun getMessageId(): Int

Gets the Message identifier.

This provides an index to help with complete Navigation Message assembly. Similar identifiers within the data bits themselves often supplement this information, in ways even more specific to each message type; see the relevant satellite constellation ICDs for details.

  • For GPS L1 C/A subframe 4 and 5, this value corresponds to the 'frame id' of the navigation message, in the range of 1-25 (Subframe 1, 2, 3 does not contain a 'frame id' and this value can be set to -1.)
  • For Glonass L1 C/A, this refers to the frame ID, in the range of 1-5.
  • For BeiDou D1, this refers to the frame number in the range of 1-24
  • For Beidou D2, this refers to the frame number, in the range of 1-120
  • For Galileo F/NAV nominal frame structure, this refers to the subframe number, in the range of 1-12
  • For Galileo I/NAV nominal frame structure, this refers to the subframe number in the range of 1-24

Requires API level 24 (Android 7.0, Nougat)

writeToParcel

added in API level 24
fun writeToParcel(parcel: Parcel!, flags: Int): Unit

Flatten this object in to a Parcel. Requires API level 24 (Android 7.0, Nougat)

Parameters
dest Parcel!: The Parcel in which the object should be written.
flags Parcel!: Additional flags about how the object should be written. May be 0 or #PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

getSubmessageId

added in API level 24
fun getSubmessageId(): Int

Gets the sub-message identifier, relevant to the #getType() of the message.

  • For GPS L1 C/A, BeiDou D1 & BeiDou D2, the submessage id corresponds to the subframe number of the navigation message, in the range of 1-5.
  • For Glonass L1 C/A, this refers to the String number, in the range from 1-15
  • For Galileo F/NAV, this refers to the page type in the range 1-6
  • For Galileo I/NAV, this refers to the word type in the range 1-10+
  • For Galileo in particular, the type information embedded within the data bits may be even more useful in interpretation, than the nominal page and word types provided in this field.

Requires API level 24 (Android 7.0, Nougat)

describeContents

added in API level 24
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of #writeToParcel(Parcel, int), the return value of this method must include the #CONTENTS_FILE_DESCRIPTOR bit. Requires API level 24 (Android 7.0, Nougat)

Return
Int: a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

Properties

CREATOR

added in API level 24
static val CREATOR: Parcelable.Creator<GnssNavigationMessage!>!

Requires API level 24 (Android 7.0, Nougat)