gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] PRN numbers


From: Eric S. Raymond
Subject: Re: [gpsd-dev] PRN numbers
Date: Tue, 7 Apr 2015 12:43:33 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Sanjeev Gupta <address@hidden>:
> I am confused on what GPSD expects as PRN, and what it outputs.
> 
> PRNs are NOT standardised accross systems.  For GLONASS, as it uses FDMA,
> not CDMA, there is no PRN number at all, just a pseudo PRN :-)
> 
> In a recent commit, Eric says:
> + * According to IS-GPS-200 Revision H paragraph 6.3.6, and earlier
> revisions
> + * at least back to E, the upper bound of U.S. GPS PRNs is actually 64.
> However,
> + * NMEA0183 only allocates 1-32 for U.S. GPS IDs; it uses 33-64 for IDs ub
> the
> + * SBAS range.
> 
> I see an issue here.  Within the GPSD ecosystem ( and only for this, ignore
> everything else), do we follow IS-GPS-200 (which is not canonical for
> GLONASS, BeiDou, etc), or NMEA?

We must follow NMEA pseudo-PRNs.  The reason for this is that NMEA
defines a way of mapping the (constellation, id) pair to a
constellation-independent ID pair, which is what we need for
multi-constellation skyviews to make sense.  Also, as you note, not
all constellations actually have true PRNs.
 
> We seem to be mixing up the two.
> 
> And this is _detection_ .  It may be quite possible that we output, while
> pretending to be a NMEA talker, the NMEA PRNs.
> 
> Example:  IS-GPS-200 is quite clear that the range 1-64 is reserved for
> them.  1-32 is for our current constellation, 33 and 37 are currently in
> use by supplementary systems, and the rest will be used eventually.

Actually that's only two of nine allocated NMEA IDs in that range.

|====================================================
|System     |Satellite       |PRN            |NMEA-ID
|EGNOS      |AOR-E           |120            |33
|EGNOS      |Artemis         |124            |37
|EGNOS      |IOR-W           |126            |39
|MSAS       |MTSAT-1         |129            |42
|EGNOS      |IOR-E           |131            |44
|WAAS       |AMR             |133            |46
|WAAS       |PanAm           |135            |48
|MSAS       |MTSAT-2         |137            |50 
|WAAS       |Anik            |138            |51
|====================================================


> NMEA 0183 (I believe because the field is limited to 6 bits) needs PRNs to
> be 1-64.  Hence its mapping of GLONASS into that area.  How they plan to
> handle the other 182 national GNSS systems soon to be announced is left as
> an exercise for the reader.

No, NMEA numeric fields are not bit-width limited.  The ISGPS satellite-ID 
field 
(SVID) may be, but that's not the same thing.
 
> My patches earlier were trying to update documentation on one issue I saw,
> but I see from Eric's following mails that the issue may be deeper, and
> requires some design understanding.

It is, and it does.

The issue here is this: when we see something that purports to be a SVID in
an NMEA or binary packet how do we map it to a unique pseudo-PRN so we 
won't have number collisions in multi-constellation skyviews?

Here is what I think I know.  I may be wrong - the documentation in this
are is very poor and practice is not always consistent with standards.
I've tried my best to describe all the gory details in NMEA.txt.

1. You never have to mess with a satellite ID that a binary protocol
hands you.  Those are guaranteed unique by each driver.  The rest of these
rules describe NMEA0183 satellite IDs.

2. Any number above 64 never has to be messed with.  You can treat it as 
a real, unique PRN even though (as with GLONASS) the system may not have
real PRNs.

|====================================================
| 65 - 88   | GLONASS
| 89 - 96   | GLONASS (future extensions?)
| 97 - 192  | not used (SBAS PRNs 120-151 fall here)
| 193 - 195 | QZSS
| 196 - 200 | QZSS (future extensions?)
| 201 - 235 | Beidou
|====================================================

3. Range 120-151 is SBAS (only up to 138 is now used). Everything else
is regular GPS.

4. Numbers 1-32 can be either true PRNs (for US GPS) or
constellation-specific satellite numbers that have to have a
constellation offset added to map them to constellation-independent
IDs in the 65+ range.  GPSD tries to deduce the constellation from
the talker ID and add the offset.

5. If an NMEA0183 sentence has a GN talker ID, expect the skyviews to
be GLONASS-only and in the range 1-32; you must add 64 to get a
globally-unique ID.

6. If the sentence has a GL talker ID, the device emits a
multi-constellation skyview with GLONASS IDs aleady in the 65-96 range

7. According to NMEA, 33-64 are supposed to designate SBAS birds and
be PRN - 87.  However, some NMEA devices helpfully pass through PRN
in this case.  GPSD emits the 120-151 PRN.

8. Sometime in the future, the meaning of IDs 33-64 may become
ambiguous.  One way is if Galileo ever gets off the ground - I think
they are supposed to be interoperable with US GPS.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]