Satellite System Identification Definitions

There are six satellite ID mappings: SYSTEM ID, NMEA, SV ID, GNSS ID, SAT ID, and INDEX. More...

Defines

#define SBAS_SYSTEM_ENABLED
 Define whether systems are enabled or not. GPS is always enabled.
#define MIN_GNSS_ID   1
 GNSS IDs.
#define MIN_GPS_PRN   1
 GPS PRNs.
#define MIN_SBAS_PRN   120
 SBAS PRNs.
#define MIN_GLONASS_FCN   (-7)
 GLONASS FCNs.
#define MIN_GLONASS_OSN   1
 GLONASS OSNs.
#define MIN_QZSS_PRN   193
 QZSS PRNs.
#define MIN_IMES_PRN   173
 IMES PRNs.
#define MIN_BEIDOU_PRN   1
 BEIDOU PRNs.
#define MIN_GALILEO_PRN   1
 GALILEO PRNSs.
#define INVALID_SVID   0
 SVIDs.
#define MIN_SATID   0
 SATIDs are how an AGPS server identifies a satellite within a constellation.
#define IS_GPS_SVID(svId)   (((svId) >= MIN_GPS_SVID) && ((svId) <= MAX_GPS_SVID))
 GNSS-specific validity/check macros.
#define GPS_SVID_TO_GNSSID(svId)   ((svId) - MIN_GPS_SVID + MIN_GNSS_ID)
 GNSS-specific macros.
#define GPS_SATID_TO_GNSSID(satId)   ((satId) - MIN_GPS_SATID + MIN_GNSS_ID)
 SATID TO GNSSID.
#define GPS_PRN_TO_GNSSID(prn)   ((prn) - MIN_GPS_PRN + MIN_GNSS_ID)
 PRN/OSN TO GNSSID.
#define GPS_PRN_TO_GNSSID(prn)   ((prn) - MIN_GPS_PRN + MIN_GNSS_ID)
 PRN/OSN TO GNSSID.
#define GPS_GNSSID_TO_SVID(gnssId)   ((gnssId) - MIN_GNSS_ID + MIN_GPS_SVID)
 GNSSID TO SVID.
#define GPS_GNSSID_TO_SVID(gnssId)   ((gnssId) - MIN_GNSS_ID + MIN_GPS_SVID)
 GNSSID TO SVID.
#define GPS_GNSSID_TO_SATID(gnssId)   ((gnssId) - MIN_GNSS_ID + MIN_GPS_SATID)
 GNSSID TO SATID.
#define GPS_GNSSID_TO_PRN(gnssId)   ((gnssId) - MIN_GNSS_ID + MIN_GPS_PRN)
 GNSSID TO PRN/OSN.
#define GPS_SATID_TO_PRN(satId)   ((satId) - MIN_GPS_SATID + MIN_GPS_PRN)
 SATID TO PRN/OSN.
#define GPS_PRN_TO_SATID(prn)   ((prn) - MIN_GPS_PRN + MIN_GPS_SATID)
 PRN/OSN TO SATID.
#define GPS_SVID_TO_SATID(svId)   ((svId) - MIN_GPS_SVID + MIN_GPS_SATID)
 SVID TO SATID.
#define GPS_SATID_TO_SVID(satId)   ((satId) - MIN_GPS_SATID + MIN_GPS_SVID)
 SATID TO SVID.
#define IS_GLONASS_FCN(fcn)   ((fcn) >= MIN_GLONASS_FCN && (fcn) <= MAX_GLONASS_FCN)
 Macros special to a particular GNSS.
#define SATID_TO_GNSSID(satId)   ((satId) - MIN_SATID + MIN_GNSS_ID)
 GNSS-non-specific macros.
#define PRN2SVID(prn)
 Convert from PRN to SVID. Returns INVALID_SVID if not GPS or SBAS PRN, QZSS, IMES. Note: cannot be a GLONASS FCN,or BEIDOU.
#define SVID2PRN(svId)
 Convert from SVID to PRN. Returns INVALID_PRN if not GPS, SBAS, QZSS, IMES, or BEIDOU.
#define PRN2GNSSID(prn)
 Convert from PRN to GNSS ID (1-based index within the system)
#define FCN2SVID(fcn)
 GLONASS SYSTEM FCN and OSN macros. Note: cannot be a GPS or SBAS PRN.

Detailed Description

There are six satellite ID mappings: SYSTEM ID, NMEA, SV ID, GNSS ID, SAT ID, and INDEX.

SYSTEM ID: These are the unique IDs given to satellites within a given system.
  • GPS the satellite's PRN [1..32].
  • SBAS the satellite's PRN [120..138].
  • GLONASS measurements use the Frequency Channel Number (FCN) The range of valid FCSs is [-7..6]. -8 indicates the FCN is unknown. The FCM is not unique. Every FCN maps to at most two OSNs. When a specific GLONASS SV must be referenced, use the Orbital Slot Number (OSN). The OSN is used for LTO, NMEA, ALM, and CBEE. OSN 0 indicates the OSN is unknown.
NMEA: Specified by the NMEA organization. The NMEA identification
of a satellite includes the "talker", or two-letter prefix in the GSV or GGA NMEA sentence. See NMEA messages supported by GLL for details. NMEA identification is output in string format so no explicit conversions are needed.
SV ID: Unique internal mapping by the GLL. SV IDs are greater than or equal to 0
and less than 256 and are contiguous, meaning they can be used for arrays and channels.
  • 0 is reserved to indicate invalid.
  • 255 for unassigned.
  • GPS PRNs come first, followed by SBAS, GLONASS, QZSS, IMES and BEIDOU.
GNSS ID: One-based index per constellation.
SAT ID: Unique internal mapping by AGPS servers.
Currently, these are GNSS ID minus one.
INDEX: Used to index into C or C++ arrays.
These are zero-based offsets per GNSS constellation. They are equal to GNSS ID minus one, and so are identical to SAT ID.
Summary Table:
//   System   Id Name  # Ids   SYSTEM ID   SV ID     GNSS ID  SAT ID  NMEA ID
//   GPS      PRN      32      [  1..32]   [ 1..32]  [1..32]  [0..31] [ 1..32]
//   SBAS     PRN      19      [120..138]  [33..51]  [1..19]  [0..18] [33..51]
//   GLONASS  FCN      14      [ -7....6]  [52..65]    map[]    map[]
//   GLONASS  OSN      24      [   1..24]    map'[]  [1..24]  [0..23] [65..88]
//   QZSS     PRN       5      [193..197]  [66..70]  [1...5]  [0...4] [ 1...5]
//   IMES     PRN      10      [173..182]  [71..80]  [1..10]  [0...9] [ 1..10]
//   Ref: IS-QZSS section 5.1.1.11
//   BEIDOU   PRN      37      [   1..37]  [81..117] [1..37]  [0..36] [ 1..37]??
//   GALILEO  PRN      36      [   1..36]  [118..153] [1..36] [0..35] [ 1..36]
/// 

Define Documentation

#define GPS_SVID_TO_GNSSID (   svId)    ((svId) - MIN_GPS_SVID + MIN_GNSS_ID)

GNSS-specific macros.

Note: We prefer these to the GNSS-non-specific macros below all these. With all of the GNSS and all of the ID systems, making a macro for each combination would be too much. Instead, GNSSID was chosen to be the central ID system, and conversions for each GNSS from/to GNSS to each of the other ID systems are supplied. SVID TO GNSSID

#define IS_GPS_SVID (   svId)    (((svId) >= MIN_GPS_SVID) && ((svId) <= MAX_GPS_SVID))

GNSS-specific validity/check macros.

#define MIN_SATID   0

SATIDs are how an AGPS server identifies a satellite within a constellation.

They are currently all zero-based, but this may change.

#define SATID_TO_GNSSID (   satId)    ((satId) - MIN_SATID + MIN_GNSS_ID)

GNSS-non-specific macros.

Note: we are moving away from these to the GNSS-specific ones above. GNSSIDs are 1-based for each constellation

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines