Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
HORSE-SLAUGHTERER
Nov 11, 2020

H O R S E - S L A U G H T E R E R

I want to cross post a dumb thing i posted on a gbs thread about GPS satellites because theyre cool and i've worked on GPS related poo poo on and off./

A key component of GPS satellites is that they know the UTC time and their own position in space very accurately, and that time is periodically fed to them by ground stations equipped with atomic clocks. A gps receiver determines its position by a process called trilateration, which is where you time how long it takes for a signal to reach you from three known points - this gives you the intersection of three spherical surfaces which is two points in 3D space, and you can easily decide which of those two is where you are because one will be on the earth's surface and the other will be out in space somewhere.

How do you know how long the signals took to reach you? You have the speed - they are radio signals are travelling at (roughly) the speed of light - and can determine the time as the signals are sent out exactly every millisecond relative to the UTC clock, so you can measure how much the signal is delayed compared to the clock. Your hand-held GPS receiver doesn't have an accurate atomic clock, but it's OK because it can figure out the time given a fourth satellite signal (creating a system of 4 simultaneous equations in 4 variables), and can solve for your xyz position in cartesian coordinates centred on earth's core.

The GPS satellites are in medium earth orbit, about 12 thousand miles out - they need to be far out in space so that the radio signal takes long enough to get to earth that you can measure the time taken - but the interesting thing about GPS is that the principle of trilateration is not at all limited to earth's surface. It would work just fine out in space too, or more to the point in the upper atmosphere where an ICBM could track its position, etc. GPS devices are all manufactured with a hard limit on the altitude that they will work at so you can't use them for nukes

Are there any other GPS/GNSS goons in the house??

Adbot
ADBOT LOVES YOU

Tsed
Jan 30, 2008

aaaaag drugs







I've worked a few years on another component of making this whole thing work, which was the Earth orientation aspect.

While GPS gets you a position, determining where that position is on Earth geographically depends on knowing what transform between the GPS reference frame and the Earth surface (or whatever) reference frame is.

The Earth wobbles, tectonic plates drift, and the Earth's rotational speed changes an amount enough affect GPS precision for ground-location significantly, so constant efforts must be made to keep that transform up to date. One way that's done is that we use Very-Long Baseline Interferometry (VLBI) to observe things in space who's position is, effectively, constant. For the purposes of the precision needed, this generally means radio observations of quasars. Every day, networks of radio telescopes simultaneously observe sets of quasars. That data (terabytes per telescope per full day, time-tagged by local atomic clocks) is then sent to correlation centers, which take all of this data (which is, essentially, noise), to extract delay parameters. Delay parameters are basically measuring the time difference of when the signal from the quasar reached the individual telescopes (there will be slight differences due to their geographical locations). Once all of that noise is put through a pile of supercomputing, you get to measure those precise delays, which lets you determine what the hell the Earth is doing at that time.

Phanatic
Mar 13, 2007

Please don't forget that I am an extremely racist idiot who also has terrible opinions about the Culture series.


One thing worth mentioning about the satellites is that since everything is based on very precise timing (a precision of 20-30 nanoseconds), for GPS to work at all there need to be two correction factors applied to the clocks.

The first is due to special relativity: Since the satellites are moving so rapidly relative to an earthbound observer, the observer will see a GPS satellite's clock as ticking slower than his, by roughly 7 microseconds per day. The second is due to general relativity: Since the satellites are at a very high altitude, farther away from the Earth's gravity, spacetime is flatter there, and to an observer on the ground a GPS satellite's clock would tick faster than his by about 45 microseconds per day. So without corrections for this, the satellite clocks would run faster than clocks on the ground by 35 microseconds per day, which means about 10 kilometers in error, per day.

The GR correction is built into the reference clocks on board the satellites, they're just designed at a slower rate here on the ground so that once you put them in orbit they tick at the correct frequency. The SR corrections are done at the receiver level, based on which satellites it's using for its calculation.

HORSE-SLAUGHTERER posted:

GPS devices are all manufactured with a hard limit on the altitude that they will work at so you can't use them for nukes

Not all. The limit's based on speed (1000 knots) and altitude (18000 meters), not just altitude. Some manufacturers use OR and some use AND, and the former ones can cause problems for balloonists, and others don't honor either limit and are illegal to export from the US.

Phanatic fucked around with this message at 20:38 on Feb 24, 2021

pumped up for school
Nov 24, 2010



Phanatic posted:

One thing worth mentioning about the satellites is that since everything is based on very precise timing (a precision of 20-30 nanoseconds), for GPS to work at all there need to be two correction factors applied to the clocks.

The first is due to special relativity: Since the satellites are moving so rapidly relative to an earthbound observer, the observer will see a GPS satellite's clock as ticking slower than his, by roughly 7 microseconds per day. The second is due to general relativity: Since the satellites are at a very high altitude, farther away from the Earth's gravity, spacetime is flatter there, and to an observer on the ground a GPS satellite's clock would tick faster than his by about 45 microseconds per day. So without corrections for this, the satellite clocks would run faster than clocks on the ground by 35 microseconds per day, which means about 10 kilometers in error, per day.

The GR correction is built into the reference clocks on board the satellites, they're just designed at a slower rate here on the ground so that once you put them in orbit they tick at the correct frequency. The SR corrections are done at the receiver level, based on which satellites it's using for its calculation.

I didn't think about the clock speeds. Neato. Waiting for the "oops" day when a technician puts the wrong freq. clock on the bird.

I use GPS clocks on the ground for syncing remote instruments. Better than the old method of quartz clocks, and a side-effect of a technology not really known by general public.

Phanatic
Mar 13, 2007

Please don't forget that I am an extremely racist idiot who also has terrible opinions about the Culture series.


Oh, let's talk about selective availability and differential GPS.

Remember that the purpose of GPS, despite its enormous utility to civilian applications, was primarily military. Now you don't want to give this enormously useful tool for your military to the guys you're fighting with, so the idea is that there would be two types of signal sent: A coarse/acquisition code (C/A), which literally anyone could receive and use, but would be only accurate to within about 100 meters with existing receivers, and a precise code (P) useful for military purposes. Of course the P code is publicly known, so before the P code is broadcast it is XORed with an encrypted code called the W code which produces an encrypted bitstream called the Y code, so existing GPS satellites broadcast C/A and P(Y) signals.

But turns out people started building better and better GPS receivers that improved accuracy by a factor of three. So it was decided to start deliberately tinkering with the C/A signal by putting an offset on the clocks; this was called Selective Availability, and the aim was to deny precision any greater than that of the original C/A intent to anyone but the military who had the encryption codes necessary to use the P(Y) signal. But GPS had the potential to completely obsolete a bunch of ground-based (and expensive to maintain) navigation aids, and this led to to people like airlines and coast guards and transportation specialists to figure out a workaround called differential GPS.

The idea here is that you don't know where you are, so you ask the satellites, but the satellites are giving you an answer that's been deliberately hosed with to limit how precisely you can know where you are. But let's say we use some other method, like a really precise ground-based survey with dudes in safety vests and theodolites, to learn the exact location of some position on the ground. Then we put a really good GPS receiver on a permanent rigid mount on that location, and it asks the satellites where it is. And they tell it some bullshit answer like "You're at [where you actually are]+50 meters to the west." But you already know where [where you actually are] is since you've done your highly accurate survey, so when you see GPS tell you you're actually 50 meters to the west, you can just broadcast out at ground level "Hey dudes, wherever GPS tells you you are, add 50 meters to the east to the answer and that's where you are." So using these dGPS ground stations, you can provide a correction factor that can eliminate almost all the error for anyone in radio range who can see the same satellites as the dGPS station.

Then the Gulf War came around in 1991, and there weren't enough military GPS receivers to go around, and a lot of troops wound up using civilian receivers that they'd purchased with their own dough (You go to war with the army you have, etc.). With that fact in mind, the military turned off selective availability for the duration of the war. And then a few years later DGPS was widespread enough that it was pretty much collectively realized that SA was useless and that dicking around with the C/A signal was a losing battle, and SA was turned off permanently in 2000. So in one sense, dGPS was somewhat overtaken by events, but since it was improving as well, it can still provide accuracy far higher than that possible by using even the unadulterated C/A signal. With a dGPS station nearby, you can determine location to within centimeters.

TotalLossBrain
Oct 20, 2010

Hier graben!

The relativistic clock correction that Phanatic mentioned is actually a convenient attack vector when spoofing GPS with the intent of deliberately messing with timing. You can apply updates to the clock correction polynomial in near real-time and a lot of receivers will buy it, causing mad drift. Ground segment typically doesn't update this stuff more than once a day.

About selective availability - this was implemented in two different ways. The first was to deliberately screw with the clock sync aboard the satellites. The second was an imprecise ephemeris library in the nav message, inducing satellite position errors.

quote:

With a dGPS station nearby, you can determine location to within centimeters.

I looked at a spec sheet today for a portable receiver with built-in INS module and diff-GPS capability. It was spec'd at 1cm.

Mercury Ballistic
Nov 14, 2005

not gun related

I believe surveyors use the phase of the gps signal to pull some shenanigans to up the accuracy as well.

TotalLossBrain
Oct 20, 2010

Hier graben!

Some receivers can get a carrier phase match (instead of just PRN phase match). Not quite enough though, so geodetic GPS typically also used a fixed base station.

PittTheElder
Feb 13, 2012

Yes, it's like a lava lamp.



GPS goon checking in. I actually do inertial navigation, but it's integrated with our company's GNSS receiver, so I have a lot of experience with it.

Mercury Ballistic posted:

I believe surveyors use the phase of the gps signal to pull some shenanigans to up the accuracy as well.

Carrier phase smoothing is a big deal for most GNSS receivers. Even in Single Point mode a good receiver will use the carrier phase measurements to smooth that position out.

As for the surveyors, the colloquial name for what they're doing is RTK (Real Time Kinematic). It's an extension of the differential techniques used in the early days of civilian GNSS (which I think was primarily about defeating SA). The short explanation is that by sticking a receiver over a point with a known location (a base station), you can observe the errors due to the atmosphere, broadcast those observations by radio, and then nearby mobile receivers can subtract those observations from their own and create highly accurate (1-2 cm position error) relative positions.

The same technique can be used to solve for azimuth between two receivers mounted on a common frame (e.g. a boat).

Navipedia is an excellent resource for most of these topics if you're interested in reading more, particularly all the math I'm skipping right over: https://gssc.esa.int/navipedia/index.php/RTK_Fundamentals


Personally I think one of the biggest gamechangers coming in the civilian domain is the emergence of enough satellites with different broadcast frequencies to allow quad frequency observations. Combined with space based correction services (which give ~5cm positions in most areas of the world, but with ~20 minute convergence times), this allows you do to something approximating RTK without ever needed to put up local base stations. Getting to 1-2cm positions with 1-2 minute convergence is going to be huge for people working in remote areas (surveyors, autonomous tractors, precise oceanographic etc). Urban areas are trickier because buildings obstruct the signal from those corrections satellites, but I suspect this will be resolved by broadcasting over the internet.

PittTheElder fucked around with this message at 18:21 on Feb 27, 2021

HalloKitty
Sep 30, 2005

Adjust the bass and let the Alpine blast


Phanatic posted:

Not all. The limit's based on speed (1000 knots) and altitude (18000 meters), not just altitude. Some manufacturers use OR and some use AND, and the former ones can cause problems for balloonists, and others don't honor either limit and are illegal to export from the US.

Quite interesting. It looks like the rules were formed under a (now-defunct) committee:
https://en.wikipedia.org/wiki/Coordinating_Committee_for_Multilateral_Export_Controls

The relevant documents today can be found here:
https://mtcr.info/mtcr-annex/

HalloKitty fucked around with this message at 20:28 on Feb 27, 2021

Mooey Cow
Jan 27, 2018



Pillbug

There seems to be some confusion re: gps and relativity. Though the gps clocks may drift, they all drift at the same rate, and as the OP explains you solve four equations in order to get the time too, so it doesn't matter if the satellites are out of sync with the receiver, as long as they are in sync with each other. As it happens the clocks are in fact adjusted to account for relativistic drift anyway, as well as any other drift they may pick up due to clock errors, or variations in the gravitational field, or whatever (keeping them in sync with the ground clocks makes syncing procedures much easier).

There is however a relativistic effect the user is supposed to account for, which relates to the eccentricity of the satellites' orbits. They move at different speeds and are at different gravitational potentials at different points in their orbits. Technically the satellites could account for this effect themselves since it is not observer dependent, but it seems due to limited computing power when the system was first launched, they don't. It's a periodic correction, rather than constant as the other relativistic effects, so a little more complicated to calculate.

Sadly in the popular literature you only hear about the constant effects, which are strictly speaking irrelevant to navigation.

Bloody
Mar 3, 2013



gps is really cool

Farmer Crack-Ass
Jan 2, 2001

~this is me posting irl~


Why does it take older receivers a while to get a fix? I remember my old Garmin would sometimes take like a minute or more to show my location. Is it actually taking that long to solve some math or is there other stuff happening?

Bloody
Mar 3, 2013



I am not the expert but basically: yes. It's attempting to correlate received signals at various offsets with whatever the radio is picking up. More and faster circuits means more correlators running and acquiring locks. Also why warm starts are faster than cold starts - ephemeris data and previous location can give it a better idea of where to start searching

BoldFace
Feb 28, 2011


Farmer Crack-rear end posted:

Why does it take older receivers a while to get a fix? I remember my old Garmin would sometimes take like a minute or more to show my location. Is it actually taking that long to solve some math or is there other stuff happening?

Because these satellites are transferring data to the receivers at the rate of 50 bits per second. You may have to wait more than 30 seconds to receive the parameters needed to calculate the satellite location and apply clock correction. If you have an internet connection, then the receiver can just download this information from online which is much faster. Even if there is no internet connection, modern receivers can still try to predict the satellite location from old data which they have received, which also speeds up the time to get a fix.

pointsofdata
Apr 25, 2011



Phanatic posted:

Dgps stuff.

That differential GPS stuff is really cool, thanks!

Would the multiple different GPS systems being created have made the intentional errors pointless anyway? I.e. could you use two at once, and somehow cancel out their errors?

TotalLossBrain
Oct 20, 2010

Hier graben!

There are indeed plenty of multi-constellation, multi-band receivers out there. Some of them use the different constellations simultaneously, some of them do a priority system instead.
But you're right - having multiple available makes the end result more accurate.

Farmer Crack-rear end posted:

Why does it take older receivers a while to get a fix? I remember my old Garmin would sometimes take like a minute or more to show my location. Is it actually taking that long to solve some math or is there other stuff happening?

As other posters mentioned, the receivers need to download data carried on the GPS signal. Each satellite sends its own very precise ephemeris (a description of where in space the satellite will be at a given time) and also a lower-precision ephemeris catalog of the entire constellation of satellites.
The receiver must have some way of determining where each received satellite was at the time the signal was sent. Ephemeris information makes this possible and this is updated by the ground segment periodically.
Most receivers will store the lower precision ephemeris information for the entire constellation even if you turn the receiver off. Now when you turn it back on, it will not have to re-download the entire thing before being able to make a fix. This is called a warm start.
If too much time has passed and the ephemeris info is out of date, it must be downloaded again - cold start. This process takes about 20 minutes if the entire catalog is downloaded.
Really old receivers may not have had much storage capability, if any at all.

Phanatic
Mar 13, 2007

Please don't forget that I am an extremely racist idiot who also has terrible opinions about the Culture series.


Bloody posted:

Also why warm starts are faster than cold starts - ephemeris data and previous location can give it a better idea of where to start searching

Once we disassembled a Chinook, loaded it onto a C-17, put it back together in India and started it up.

Iíve never seen a GPS system take longer to lock on and figure out where it is.

Bloody
Mar 3, 2013



Once while debugging a GPS system it locked onto noise from my oscilloscope and refused to report it's location because it thought it saw half of the GPS constellation at once and that it was buried deep in the earth

Turned out there was an open circuit and another short circuit in the antenna and analog front end

I learned a lot about rf that month

TotalLossBrain
Oct 20, 2010

Hier graben!

Phanatic posted:

Once we disassembled a Chinook, loaded it onto a C-17, put it back together in India and started it up.

Iíve never seen a GPS system take longer to lock on and figure out where it is.

So a standard L1 C/A receiver takes ~20 minutes to download the entire catalog in fragments from various sats in sight. But that's with the C/A transmit rate of 1.023 Mb/s
A Chinook presumably has a P(Y) receiver that gets the data at 10.23 Mb/s, which should make the cold start faster? Are there other factors?

TotalLossBrain fucked around with this message at 04:43 on Mar 11, 2021

PittTheElder
Feb 13, 2012

Yes, it's like a lava lamp.



Yeah you have to acquire signals before data decode comes into play, and that search algorithm depends on position (and velocity). Recievers generally store their last position at least, to speed acquisition along on the next start up (user provided positions or a source like INS can often be used to speed it up significantly).

That breaks down if you ship the thing across continents, with the advice usually being to either tell it approximately where it is, that it's moved, or even just to factory reset the thing, and then it will start with a full wide search rather than a narrow search. Alternatively you wait like 20 minutes.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran

I work with aviation GPS units and some of the stuff they're doing is pretty interesting.

For the modern precision approach stuff, it's possible to set the receivers up so that they can get heading information from the GPS. There are two antennas mounted, and you set the position and cable delay in the receivers and they use that to get a rough idea of where the aircraft is pointing.

Setting the cable delay wrong sometimes leads to hilariously wrong estimates of heading.

My question for the experts: If I have two antennas placed next to each other, one with a 1m long cable and the other with a 100m long cable, will the receiver think the antennas are 99+m apart?

TotalLossBrain
Oct 20, 2010

Hier graben!

babyeatingpsychopath posted:


My question for the experts: If I have two antennas placed next to each other, one with a 1m long cable and the other with a 100m long cable, will the receiver think the antennas are 99+m apart?

I'm not sure how it works with dual antenna aviation receivers like that. I work mostly with industrial GPS timing applications, like substation receiver clocks providing high-precision timing to electric grid control devices.
In those receivers, the cable length parameter just introduces an internal time shift proportional to signal travel time down the cable. AFAIK, position is not affected by this - the receiver will always calculate the position of the antenna unless you configure a fixed position

PittTheElder
Feb 13, 2012

Yes, it's like a lava lamp.



E: ignore this

PittTheElder fucked around with this message at 20:18 on Mar 23, 2021

TotalLossBrain
Oct 20, 2010

Hier graben!

PittTheElder posted:

Yeah we have hundred meter long cable runs in the office building up to the roof antennas, and I don't think it introduces any shift in position at all. I'm very confused as to why that parameter needs to exist.

For precise timing purposes. Some grid applications require up to 500ns precision or will soon. Each foot of antenna cable not accounted for introduces a ~1ns error. This may not be a huge deal to a local application but when you need to sync multiple sites together it becomes important.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran

TotalLossBrain posted:

AFAIK, position is not affected by this - the receiver will always calculate the position of the antenna

This is what the Principles of Operation on the receivers indicated, too. The only thing that matters is antenna position; that's where the signal is received and that's where the information stops.

So how does this work, internally? Here's my thought process.

Antenna A is at position Ap. Antenna B is at position Bp. The offset between these positions is known.
A gets a signal As at the same time B gets a signal Bs. These signals are clearly different but related; instantaneous decoding would verify the offset of the antennas.
Receiver gets As after some (short) delay. It calculates Ap. Some time later, it gets Bs and calculates Bp.

If Ap is continually updated by As at the same rate Bp is updated by Bs, then the receiver knows Bp later, which means that it's at a certain location after Ap is. Doesn't this mean that the receiver thinks Bp is in a different spot relative to Ap?

human garbage bag
Jan 8, 2020



Does GPS require more than 64 bits of floating point precision to get down to millimeter accuracy?

Adbot
ADBOT LOVES YOU

PittTheElder
Feb 13, 2012

Yes, it's like a lava lamp.



Nope.

E: assuming you're doing dynamic positioning, probably the two most important factors for getting to mm level positions are "can you see the sky" and "did you survey your base station correctly"

PittTheElder fucked around with this message at 23:29 on Mar 29, 2021

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply