GPS
ciechanow.ski
ciechanow.ski
(see the excellent example in OP)
Fun tidbit, the resulting error is known for the system in closed form as Geometric Dilution of Precision, and is a 3x3 (edit: or 4+x4+ if you are estimating bias or quantities like time, thx brandmeyer) matrix that depends on all the locations of the visible sats, and your position relative to them.
GDOP is a general relationship for any estimator based only on the equations used to derive something from sensor remote sensor measurements. It's possible to derive GDOP for any sensing system using the Fisher Information Matrix (which is the inverse of GDOP). Some minor caveats apply, but in general this is a useful trick.
FIM is worth learning if you want to get into sensing & estimation. https://en.wikipedia.org/wiki/Fisher_information
Another fun thing: FIM can be derived a number of ways, and appears if you simply ask (mathematically) "What is the most likely position of the gps sensor given sat locations" as the hessian matrix of the system that you use while answering that question using e.g., convex minimization.
All of sensing & estimation is just mostly convex optimization.
Also, it's easier to understand variables vs uknowns of GPS if you consider that direct measurement is of velocity and/or acceleration, and position is the resultant derivative, after taking into account the probabilities of various solutions.
(Velocity and acceleration can be measured directly without making as many assumptions about various starting conditions.)
(Postgraduate level stats/maths, mostly applied, tiny bit pure.)
Most of that was distilled from literature or basic math (and probably contains errors -- thanks grad school).
Bishop https://www.sciencedirect.com/science/article/pii/S000510980... was always a good reference for me,
as was
B. Grocholsky, “Information-theoretic control of multiple sensor platforms,” Ph.D. dissertation, University of Sydney. School of Aerospace, Mechanical and Mecha- tronic Engineering, 2006
And here's a tutorial that might help:
https://www.sciencedirect.com/science/article/abs/pii/S00222...
Look there in equation 6: That's the FIM being left multiplied when solving these types of problems. (under standard gauss-newton step, which is also common)
Another tidbit: If you apply matrix inversion lemma to eq 6, you can get the (Extended)Kalman Filter update steps. Somewhat related: https://robotics.stackexchange.com/questions/1180/informatio...
Often, GDOP is broken into components HDOP, VDOP, etc for the values corresponding to some earth-fixed coordinate frame. That starts to look more like statistics about the covariance matrix.
Here's a derivation: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigat...
Here, it ends up being (usually) the sqrt(trace(covariance))
One thing that I thought was a little confusing was right at the beginning, when we were estimating the position of the figurine and there was an area of uncertainty shown by the yellow circle.
It isn't clear how you're estimating position, and why we have an area of uncertainty. At first I figured it was going to explain it using triangulation (measurement of angles) but there's no reason triangulation wouldn't be exactly as accurate as the tape measure method on a 2D surface, so wouldn't explain the area of uncertainty.
The description merely says:
> Just by using these three reference points we can relate the figurine’s position in the environment to an approximate placement on the map as show with the yellow shape on the right.
I worry that having this ambiguity so early on might put some people off from reading the rest, because they figure they don't understand that and so won't understand the rest of it.
More generally, the assumptions about what things were uncertain and what could be taken as exact were poorly motivated. The author should wither justify them with real-world constraints ("satellites can host atomic clocks but destroyers can't" -- not obvious!) or explicitly announce the assumptions as unjustified, but he shouldn't make it seem like the assumptions could have been reasoned to by the reader.
I also was disappointed the author used circles/spheres and guesses for the timing offset rather than the much more edifying choice of hyperbolas. Just as you can think of a sphere as points reachable by the end of a rope of fixed length tied to a post, you can think about a hyperbola as the points reachable by tying separate ropes to two posts and spooling out equal amounts of rope.
The concept is just not explained at all. I spent too long making sure I didn’t miss some sentence somewhere explaining what was happening in that diagram. It felt like the article was wasting my time, and that maybe the author himself didn’t really understand what was happening.
If your take is then ‘well, he didn’t rigorously define how he derived the error bounds on crude position estimation, therefore all this stuff building into the level of precision GPS is capable of rests on a flimsy foundation of lies’, perhaps you are not the target audience for this kind of didactic presentation.
or more correctly, he used an example and a diagram without every explaining how we should think about it. I think running into a nonsensical, unexplained diagram is a good heuristic for whether or not an article is worth reading — even if, in this case, it turns out the rest of the article is well-written.
My thought was, "If the simple parts are this unclear, I don't want to spend time getting to the more complex portions".
At least that's my interpretation.
Intuitively you would be able to eyeball the angles between the landmarks, and eyeball the relative distances. I don’t think I’d draw a circle though. I’d probably have way less confidence for the landmark farther away and balloon out my estimate.
You probably know exactly where you are on the map if you are within a meter of a monument. As you move farther away from the monuments your estimation of the distance from each one becomes less precise. At least when I am estimating a distance things end up rough really quickly. At 10m I might be off by 1m. By 50m I am off by 10m, and so on. Now translate that into an exact position on the map. It not possible, there is always some level of uncertainty.
I didn't realize it at first, but all of the examples are interactive. You can move the figure around, I found that pretty helpful and fun as well. In the very first example: place the figure somewhere, and then try and point to where it is on the map. I found myself circling areas naturally, even though the scale is relatively small. Especially when viewing it from an angle. The second example is quite exaggerated as far as the circles go but it is representative of the idea.
They are aimed at the practitioner who actually needs to solve problems. TFA is entertaining and pretty, but insufficient to actually get work done.
I know not by what tools Web 3.0 content will be found, but Web 4.0 will be searched using hn comment breadcrumbs.Edit: Thanks! It worked.
Maybe internet searches can be improved by changing the search from "how gps works" to "excellent, clear, and precise explanation of gps"?
I think we need web search to move towards something more reputation-based. (Based on sites like HN, Reddit, StackOverflow, etc. that don't allow to easily fake high reputation. Or some kind of trust network starting from all your social accounts' subscriptions/follows and spreading your trust far outwards.)
I work on the Android location team at Google, and I sent this article out to my team. GPS/GNSS is critical for accurate location/context, and there's still plenty of innovations happening in this field.
One of our directors is Frank Van Diggelen - none other than the professor who taught the Stanford GPS MOOC referenced by the article :) I'm sure he is going to appreciate seeing the course called out there!
Each satellite adds another constraint, which helps, and with more satellites to choose from, you can drop the weakest or worst measurements.
[0] https://developer.android.com/reference/android/location/Gns...()
> The current Android platform supports GPS, SBAS, GLONASS, QZSS, BEIDOU, GALILEO, and IRNSS[0].
But it depends (and varies wildly) on the hardware of said Android. I buy 3 to 5 cheap (sub 100 euro/US$) Androids per year and it always surprises me which device supports which GNSS is supported and how accurate or not they are.
PS I use them to Wigle (https://wigle.net) mainly, and the WiFi reception is exactly as diverse as the GNSS.
It seems to me that your software could prevent this error.
This occurs because in "urban canyons", meaning streets with tall high-rises or sky scrapers, there is little or no line of sight to GNSS satellites (GNSS being the generic term for all satellite positioning systems, not just the American GPS). Consequently, what your phone picks up are signals reflected off of buildings, which exaggerates the distance between you and the satellites, and causes the positioning solution to be pushed away- onto the other side of the street or another city block.
One way Google/Android is tackling this is by using Google's trove of 3D building data, the same that is rendered in Google Earth when you use it in 3D. Your phone uses the building data to correct for reflections. Read on here (and note the authour!): https://android-developers.googleblog.com/2020/12/improving-...
And, the device can use various filters and smoothers to minimize sudden jumps, and normally does, but there are edge-cases (for example, an app may be requesting pure "unfiltered" GNSS location returned directly from the GNSS chipset, hence the jumps). But rest assured, we are working on this issue.
Anyway, thanks for the feedback. We're always doing our best to improve location accuracy and reliability for billions of users in all scenarios and environments, and it's no trivial feat!
Amazing to think that ideas people had back when Selective Availability was on for the foreseeable future are just now becoming available to consumers. Congrats on getting it done!
At this point the iPhone hadn’t come out yet, but building data was just starting to show up the maps we used for navigation.
My manager worked at Qualcomm back in the day and played a huge role in creating the first GNSS smartphone chipsets.
Likewise, I've learned a lot from him and other veterans in my org.
Wouldn't it be easier to query Google Maps & Waze telemetry for impossible position jumps? Then you could make geofences where Google Play Services ignores position jumps and falls back to Wifi-based location and integrating the accelerometer.
Ideally, clients will be using our Fused Location Provider API [0] which fuses any (or all) of GNSS, WiFi, accel, gyro, mag... with smoothing + filtering to provide the best location possible at any time while automatically managing power compromises; in effect, using WiFi + accel, as you described, along with more signals and filtering. However, some clients still choose to use pure GPS/GNSS, for various reasons.
Part of providing the best location experience possible (while simultaneously minimizing power drain...) is providing high accuracy at every percentile. Some techniques that may improve the average or median percentile error may cause higher errors at the 90% percentile. For example, let's say we check for "impossible" GNSS position jumps, and just ignore those. What if 10% of the time, the position it's jumping to is actually closer to the true position - since suddenly we might have better line of sight - and previously we were stuck at a worse estimate? What might help in one situation might hurt more in another. It's hard to build robust systems to handle every possible scenario and condition (on all sorts of different kinds of hardware from tons of vendors, since anyone can launch an Android device). It's even harder because, as you can image, smartphone grade sensors are magnitudes worse than those you find in survey or military grade hardware.
Also, WiFi-based localization can only be as good as the estimate of WiFi access point location, which isn't always great (and it's usually worse so since WiFi signal strength localization isn't that great), so GNSS is generally higher accuracy under good conditions (and hence rectifying GNSS error wherever we can is one of our goals), and the error of accel/gyro based dead-reckoning grows quadratically/cubically (due to double integration errors), so it doesn't get you very far.
[0] https://developers.google.com/location-context/fused-locatio...
Here are some fun GPS projects I've found in the past, maybe others can add to this list.
GPS/Galileo/Beidou/Glonass status and error monitoring, open-source community-ran project: https://galmon.eu/
DIY GPS receiver using minimal signal frontend, FPGA Forth CPU for real-time processing and RPi running position solvers: http://www.aholme.co.uk/GPS/Main.htm
Not sure what's the best starting point to learn, but there's lots of videos on YT to help you get started.
it provides you with an in-browser, graphical, node based interface where you can just connect boxes together and it will output js-code ready to implement in your website.
(disclosure: i know the dev plus am a huge fan!)
> As that angle increases, the signal from a satellite travels more sideways and its larger portion gets affected by the atmosphere. To account for this, GPS receivers ignore ranges measured from satellites at very low elevation angles. ... atmospheric effects are primary source of GPS inaccuracies.
(I know GPS has inaccuracies, but I didn't really know what caused them, but if I had to guess, the atmosphere wouldn't have been on my list of guesses for the top causes)
One more thing I've wondered: the system depends on the sattelites knowing and broadcasting their exact position, but how do you determine this position? From ground stations, sure, but how exactly? What's the margin of error on that?
And to add to this, how do you bootstrap this?
Galileo had an outage from 2019-07-11 to 2019-07-18 [0]. I've not read much about the details what caused the outage, or why it took an entire week to get back up & running.
[0] https://www.gsc-europa.eu/news/galileo-initial-services-have...
This known orbit is then provided back to the satellite so that it can be broadcast. If this system of updates stopped working, the quality of GPS position estimates would degrade pretty quickly (think weeks, not years).
This also means that if a GPS satellite were to need to maneuver for some reason -- either periodically boosting back into its assigned orbit or for debris avoidance -- the normal system of updates will catch this and users will never have to know or care that the satellite moved.
From the article:
The outage in the ephemeris provisioning happened because simultaneously:
* The backup system was not available
* New equipment was being deployed and mishandled during an upgrade exercise
* There was an anomaly in the Galileo system reference time system
* Which was then also in a non-normal configuration
So they had to do a cold boot, which is by design slow because it focuses on high accuracy/certainty. Disappointing to read that the collaboration between the involved companies is downright bad in case of emergencies such as this. And the communication is also terrible, there's no public/official report of what exactly went wrong, why it took so long to recover, and what lessons were learned. It sounds to me that GPS being under military control is an advantage over Galileo.
* https://reginasailing.com/wp-content/uploads/2020/04/Altitud...
* https://thenauticalalmanac.com/Altitude_Correction_Tables.pd...
* https://thenauticalalmanac.com/Altitude_Correction_Tables_fo...
Multi-frequency receivers can derive the corrections directly because the distortions affect the different frequencies in predictable ways, and they can work back to "ionosphere-free" pseudoranges, and base the rest of the solution on those.
To your quoted comment, nicer receivers also tend to have a configurable "horizon mask" aka "elevation mask", so you can tune this rejection behavior. I could swear I've heard of some that let you configure the mask height _per azimuth_ but I can't find an explicit reference right now.
Elevation masking is tricky because if you crank it up too high, you force yourself into poor-DOP geometries. But if you relax it too low, not only do you get heaping piles of ionospheric distortion, you also invite ground-clutter multipath. I think it's primarily used by stationary timing receivers, because they know their position is fixed, they're less susceptible to GDOP.
It comes down to the fact that the ingredients we buy from the stores near us tend to come in nice round numbers in our local measuring system, and recipes tend to be tailored to that. For example, "1 cup of shredded cheese and 1lb sausage" may translate precisely to "236.9 mL shredded cheese and 0.45kg sausage", but your nearby store selling metric ingredients may have shredded cheese in a 300mL bag and sausage in 0.5kg packages. So you either measure very precisely and waste food (which makes the recipe a pain to get right), or try to use the local equivalent (and the recipe might not end up tasting the same as a result.) So there ends up being some "art" to doing a proper translation.
Purpose-built GPS time servers (like those from Meinberg) give you an option to enter the length of the coax cable connecting the receiver and the antenna, so that it can correct for the extra time it takes for the signal to travel over the cable (for example, see https://www.meinbergglobal.com/download/docs/manuals/english... page 19).
https://didhondafixtheclocks.com/
> Honda’s head unit receives a GPS signal for date and time including a number representing a week, coded in binary. These digits count from 0-1024 and rollover to 0 after the completion of week 1024. Honda’s head unit supplier did not code their head units to account for the rollover and, on January 1, 2022, reverted to a date and time 1024 weeks in the past [1024/52 = 19.7, so 20 years in the past or 2002]
So despite all the almost-magic level of engineering that has gone into the GPS system that has stayed consistent for 40-some-odd years, a classic integer overflow has ruined it all because some subcomponent test engineer didn't think to check the inputs against the expected lifetime duration of the car's equipment.
Another fun issue with these is DST databases. The satellites will tell you the time, but it's up to you know how your location translates into a DST zone. And if you have long-running offline equipment (say, a car), and the DST dates change, well, your smarts are only as smart as the update procedure.
The designers of GPS either should've made it use like 64 weeks so WNRO would happen constantly and we'd have to get good at handling it, or 32768 weeks so we could ignore it for the entire life of the system and any successors.
It's even worse than that: The traditional way of handling week number rollover is a rollover count in nonvolatile memory, incremented every time a rollover is seen (for a standalone receiver there's no other source for how many rollovers there have been)
So a griefer with a software-defined radio can radio out repeated week number rollovers and GPS receivers will increment their rollover counters. In 99% of cases there's no way to decrease them, and now your GPS receiver is convinced it's year 2100.
I presume you're referencing https://users.ece.cmu.edu/~dbrumley/pdf/Nighswander%2520et%2...
A lot of discrete GPS receivers have some nonvolatile storage where they "cache" fixes to reduce fix time. This has the amusing result that when you buy a GPS receiver and monitor its output immediately you usually find out the time and location where QA was performed, as the first fixes emitted without the quality flag.
I have a small list of funny locations I like to pipe into gps-sdr-sim, including Null Island, the north pole, 500 feet above the Kremlin, the middle of Lake Erie, and a quiet beach in the Bahamas.
Not that I expect anyone to look at the first few sentences of output after I hand them hardware, but if they _do_...
Except they decided to "smear" leap seconds [0], instead of handling them appropriately.
For that reason, if you "require correct timestamps for legal purposes" [1], you may want to make sure that you aren't using Google's NTP servers.
(N.B.: Amazon (AWS) too, FWIW.)
---
EDIT: found wiki from some quick googling https://en.wikipedia.org/wiki/Spoofing_attack#Global_navigat...
Tons of info starting here: https://berthub.eu/articles/posts/galileos-authentication-al...
Continued here: https://berthub.eu/articles/posts/galileos-authentication-al...
And finally here: https://berthub.eu/articles/posts/galileos-authentication-al...
For example, if your RX tells you that bird #7 is part of your location fix, but it knows from prior valid ephemeris data that that bird is currently below your horizon, the bogosity indicator will flash red. Ditto with certain pull-off spoofing methods.
but, gps (or other gndss) spoofing or jamming is effective, and i think that commercially available jammers simply broadcast reasonably broad spectrum noise around that frequency, which can overwhelm nearby recievers; although the article describes how noise rejection is performed, it has its limits. spoofing is more difficult, but still possible, including simple re-broadcast attacks using data received at another location, however i believe these things are non-trivial for military receivers due to countermeasures like beam steering?
Cell phones get around this by downloading the almanac from the internet. Standalone receivers also keep the almanac in nonvolatile storage, but the almanacs eventually go stale if you leave the receiver off for too long.
The satellites only know their own position to a certain precision, and there are only so many bits to express it in the data packet. More bits wouldn't make sense because the measurements aren't that good in the first place.
So what you get "live" is naturally limited by both of those things. Single-frequency unassisted solutions are usually good to a few meters, dual-frequency to a meter or so.
But ground stations can determine, after observing the satellites for a long time, where they _were_ to a much higher accuracy. It's a complicated process involving a whole network of ground stations, whose own positions are precisely surveyed, etc.
The product of that network is known as "precise ephemeris", and it's available in an "ultra-rapid" (3-9 hours later), "rapid" (24 hours later), and "final" (13 days later) version. With these data, the initial observation can be post-processed to get very good solutions. Down into the millimeters.
The RTKLIB manual has a lot more detail if you're curious.
Even sidestepping the internet just handing you a full alm+eph dump, modern standalone receivers can perform a cold-start much faster than their predecessors, because they have huge numbers of receiver channels available. The system operators cleverly offset the almanac being transmitted by each satellite, so if you can receive several satellites at once, you can start writing your almanac with several pencils on the page writing different paragraphs, as it were. Finish the page very quickly.
In the early 90s, it was common for a GPS receiver to have just 4 channels. So a blind search through all the satellite PRNs could take quite a while, and since the receiver didn't know where anything was yet, Murphy's law guaranteed that any satellite it did get a lock on would soon disappear over the horizon anyway. It took agonizingly long to get lucky and hit a bird just coming into view, so you could get whole messages from it and start filling in that table.
And of course any obstructions that limited your sky-view just made it worse.
By the late 90s, 12-channel receivers were fairly common, my first was one of these. This greatly increased the odds of getting useful satellites in a reasonable period of time, and on cold-start it would get a fix pretty reliably in 15 minutes, sometimes less.
In all cases, if the user could give the receiver a hint of the current time (within a few minutes) and location (within a few degrees), as soon as it got part of the almanac it could start figuring out which satellites must be behind the Earth right now, versus which ones would likely be overhead, and make much better use of its receiver channels to shorten the TTFF. Additionally, being able to estimate the Doppler shift greatly shortens the lock-on period.
Today's receivers don't even have discrete radio channels in the old sense, they just have a wide RF front end and then slice the data into digital correlator pipelines, achieving hundreds of virtual channels. True "all-in-view" reception is possible even with four full constellations aloft, and it's nearly magical how good they are. Cold-start times under a minute in some cases.
HOWEVER.
A survey receiver, whose data is being post-processed, need not even calculate its own position. (It probably does, since that costs nothing once the data has been received, but it's not strictly necessary.) It just records carrier-phase measurements and pseudoranges, along with clock and doppler info, in (or later converted to) a format called RINEX. The surveyor just keeps it in one place for a while, marks down "3:32pm-3:38pm, marker C", and then moves to the next point. Later back at the office (once the precise ephemeris comes out), the RINEX is crunched with that better data, and solutions are derived which allow the surveyor to say exactly where Marker C actually is.
This is better than doing it in real time, because the ephemerides available in real time just aren't that good. Only by measuring with a network of ground stations, can the better ephemerides be calculated, and then applied to the observations.
There's also RTK and correction networks, which deserve mention:
Real-Time Kinematic is called that because it tells you about distance and motion, the kinematics, _relative to a nearby base station_. If the base doesn't know where it is, the rover doesn't either. So the base is usually surveyed first, using the techniques outlined above, and then that surveyed position is combined with the kinematic differences, to derive the rover's precise position. It requires a data link between the base and rover, though that's gotten dramatically easier in the last few decades...
Correction networks do all of that, over a wide area, providing a "virtual reference station" nearby to wherever you need it to be. The corrections are transmitted typically over a separate data channel (often on leased L-band satellite time), and applied by the receiver. Some are available over the internet as well, if cellular signal is easy to come by wherever you happen to be. I don't know as much about these as I'd like to.
At that time the signal was intentionally degraded in a process called Selective Availability (https://www.gps.gov/systems/gps/modernization/sa/). I didn't have any experience with that.
(The more sinister version is that this has actually been planted as a cover-up for more realistic electronic intrusions, as this is also a trope in popular media and news.)
I think we're really fortunate that they made the choices they did. If they hadn't take the route that was the most complicated technically, GPS wouldn't have become as ubiquitous as it is today.
You can still do this with GPS if you want. In the surveying community, it's not unusual to collect an extended period of raw GPS observations (e.g. 48 hours) and then submit them to NOAA's offline GPS computation service OPUS which will return a fix by email a while later. This can result in a more accurate fix but perhaps more importantly a more consistent fix, since OPUS will apply the exact same sophisticated solver used for other government geodetics like survey benchmarks. The tradeoff is that OPUS is slow enough that it tends to run on a queue.
In any case modern GPS involves surprisingly active receivers since smartphones commonly use AGPS over IP to accelerate receiving ephemera.
When I fly, I like to cache a map of the region I fly over on my phone, particularly the airport region at the destination. Then, you can hold your phone to the window for a few minutes and get a GPS fix, even if in airplane mode, because as you say GPS is purely passive.
Then you can follow along nicely where you are, at the resolution you want. (Sure, many airlines have moving maps, but they're not as good as Apple maps or Google maps.)
All GPS devices MUST be switched off for the duration of the flight.
Because terrorism. /sAt this point it’s an explicit request from the cell phone companies to not have a plane with 200 people ripping through their cell networks with association attempts that are most likely going to fail and then immediately become stale.
The funny thing is that the James Bond/ Tomorrow Never Dies plot device has turned out to be the most realistic, but doesn't actually require the theft of some encoding device, with various record and delay replay attacks.
Other underused plot device: lots is made out of over reliance on GPS and what would happen in the event of an attack on the system. But most ignores the fact that the US NAVSTAR GPS constellation is multipurpose, and is also a (confirmed) primary component of worldwide nuke detection, with some (afaik unconfirmed) claims of a missile launch detection capability, as well.
Now I saw this article and I got goosebumps, well done, thank you very much! It's really fantastic. From today it will be enough for me to just share this article with my friends, or I will tell along with this article.
[1] https://github.com/kristianpaul/SoftGNSS
[2] https://www.ocf.berkeley.edu/~marsy/resources/gnss/A%20Softw...
There's amazing stuff out there, you just have to spend time looking around!
Amazing that even engineers don't understand that GPS receivers don't talk to the satellites.
I think it's more relevant than asking an embedded engineer which sorting algorithm is the fastest.
If the intent was to find out if people __knew__ how GPS worked when they didn't need it for the position, sure.
However I see two other possibilities:
- How does a candidate react when they don't know something? Do they try to bullshit their way through? Do they admit it and ask what you'd like them to do?
- Can a candidate, __with guidance__, come to a basic understanding of how GPS works and come up with a reasonable (note: not necessarily correct) suggestion for how to implement it?
>Amazing that even engineers don't understand that GPS receivers don't talk to the satellites.
They're amazed at the lack of knowledge, not that a candidate wasn't able to talk it out, or that they bs-ed through it. That tells me the question is asked in bad faith.
For example when I interview, I have a question related to chess, which requires a basic understanding of how the pieces move. I was amazed that even engineers don't understand the basic movement rules of chess.
However as far as the interview went, it was a non-issue. It took about 30 seconds to explain, not a single candidate had a problem with it, and it never came up when I was giving my verdict.
As for why, by relating the question to something in the real world (like chess or GPS) a few things are accomplished:
- It gives the candidate an ambiguous situation that they have to navigate away from (e.g. by asking clarifying questions).
- It requires the candidate to map a real-world situation to an algorithmic solution, rather than just being told "implement a graph traversal" or "use dynamic programming to solve this".
- It makes the problem more interesting.
I know exactly what it's like to be on the other side because I was there too not so long ago, solving interviews just like this. I found questions like this much nicer than more obscure questions like Gray code.
I think you're just fixated on this idea that the interview is there to test what you know and not knowing something is a fail but that's not really how it works. What a candidate knows is next to nothing to me, what's most important is how they go about solving the problem. Do they ask questions? Do they consider alternative solutions before digging in? Is their code somewhat readable?
Aside from the basics of CS, I really don't care what they know and that's made reasonably clear before the interview (as it was to me when I was interviewed).
Getting stressed too much about a job interview may be a sign of overcommitment. And I believe you're not looking for a guy ready to go over corpses.
I'm often looking for someone I can give a problem to and they return with a potential solution. That involves thinking through problems, how they work, how they can't work, etc.
Asking someone how they think GPS works, or asking them a question about how they'd try to track down a defect based on what a customer is reporting to me are very important skill sets to have.
This is why these questions are important. The skill set is logic and deduction not regurgitation of ideal solutions.
But as a one-off, and if asked in a forgiving way to explore how they think, then I'd consider this question valid.
Maybe "Have you ever thought about how GPS works?" if "yes", then let them explain, if "no", then make it easy for them to start reasoning about the system and then see how they might design it.
Seems to me as fair as asking "have you ever thought about how a double-linked list works?" or "a basic way to ensure database consistency when the DB is replicated at two different physical machines"?
It's not like GPS is something esoteric that they are unlikely to have interacted with, odds are they used it to get to the interview location.
The "Have you ever thought about how GPS works?" question gets a scripted "No, but <blah blah blah>" answer. It's fully automatic, because there are now two possibilities:
- I have thought about GPS before. I will now fake my creative process. No hard feelings, but you are just another obstacle for me to get the job, that's it.
- I have never thought about GPS before. We will now try to design "together" a super-complicated system having so many boundaries and hidden constraints, while I will be also panicking on the inside the whole time. No wait, that would be dumb. I know, I will just refuse to discuss it further. Next question.
(Also, TIL that "flack" in addition to its primary meaning is apparently an acceptable spelling of "flak" too.)
There should be no expectation of them coming up with the “correct” answer. But they should be able come with an answer and explain it clearly, warts, holes and all.
Using something real like GPS also ensures that the candidate understands why the problem is a useful problem to solve, and what the objective of the solution is I.e. a system that lets you locate yourself on earth.
But directly talking about those topics is probably handy.
Once you understand the signals are timecoded, this boils basically down on your ability to picture the intersection of multiple sphere in 3D space and it will become obvious (amongst other, very technical reasons that should not be an interview question).
You have to picture those spheres given that the satellites are roughly at same orbital height relative to earth center and you always receive signals within your "field of view" on the nightsky - and of course assume the earth is round.
Unfortunately, I don't understand. For example, check out this screenshot from the OP: https://i.imgur.com/9kh5tBi.png
If the satellites are above (the horizon/field of view), and you're intersecting spheres, it seems to me that you would have the best precision in the height direction and worse precision along the sphere. Am I missing something?
* Ability to reflect on and critique their own ideas, using technical common-sense. If someone has never had a reason to research or think too hard about how GPS works, then it might be reasonable to initially assume that it sends a signal to a satellite. But hopefully, when prompted to think about it a bit more, they would realize: "Hey, if that's true, then somehow these satellites that were launched in the 80's and 90's were able to scale up their capacity and handle orders of magnitude more demand, now that everyone has a smartphone in their pocket. Maybe that's not how it works?"
* General curiosity and interest in areas outside their field of specialty. This might not be strictly necessary to get a job done, but it probably has some correlation with other measures of technical aptitude that are hard to probe directly.
I think this is a bit misguided, since the scope of things outside of a candidate's field of specialty is tremendously large. Picking a random piece of tech within that space and drilling the candidate about it seems rather unfair.
A better way to handle this would be to actually ask the candidate about what else interests them outside of their specialty. But hey, maybe that doesn't stroke the interviewer's ego enough (:
IDK. GPS is probably one of the most prevalent technologies used today besides the Internet itself.
In fact, someone who is able to sort of work through the problem on the spot may even be preferable to someone who just knows the answer because they happened to read Wikipedia the week before.
However GPS can be solved with some high school maths, and applying solutions found on the software engineering domain E.g. computing distance from latency, communicating with a remote resource over a comms link, broadcast vs unicast etc
It’s not like the interviewer is going to ask them to design the satellites and rockets themselves.
Asking how GPS works (in general terms) is more like asking how the Internet works. Anyone who has "engineer" attached to their job title should at have a general understanding of this, or at least be able to work through it using common sense on the spot. I know we covered it early on in college (maybe in Physics, I forget).
Again, I'm not talking about low level details here. Something like "your phone measures the time it takes the signals to arrive and calculates a distance" indicates some understanding. From there, most people can figure out how that information could be used to calculate a 3d position.
The fact that the interviewer finds so many candidates who don't answer the GPS question to their satisfaction, while companies complain about difficulty finding software engineers, should tell you all that you need to know about the question's relevancy as well as the bizarre assumptions that some interviews hold.
A decent candidate will give me 5-10 minutes of delving into various parts of "unix processes", maybe "dynamic linking", most probably a bit of "file system" by judicious use of "could you explain that in more detail" or "how does X work".
A truly excellent candidate will have me taking notes for 25-30 minutes, while they pre-answer all my followup questions, go through process creation, dynamic linking, file system API, filesystem internals, maybe some disk layout, process termination and signal handling.
Out of maybe 120 candidates I've asked that question, one (maybe two) have answered it so fully on their own that I did not have to ask any followup questions. And pretty much exhausted my question graph, so once done we could pivot to "do you have any questions for me?".
The super-simple answer is correct, but I think if you asked in an interview people would try to give a complicated and wrong answer out of nerves.
It's valuable to know how someone will handle a question they don't know the answer to -- whether they recognize their own ignorance and whether they are willing to admit to it.
Which is actually useful to know, even if this method would be a dickish way to do it.
I also like the question because even if you have no idea how GPS actually works, you could quickly come up with the rough idea yourself given that you have a bunch of satellites that can emit arbitrary signals. Lots of room to show creative and analytical thinking here.
What kind of engineers are you interviewing?
> I also like the question because even if you have no idea how GPS actually works, you could quickly come up with the rough idea yourself given that you have a bunch of satellites that can emit arbitrary signals.
I find this really doubtful. Someone who doesn’t already understand how GPS works is unlikely to derive it from first principals in a brief interview.
Just consider that there are people - perfectly intelligent, capable of learning - who don’t actually know what ‘GPS’ stands for. They maybe don’t know that the GPS system is separate from their phone’s cell connection. They may not even know that satellites are involved. They may have not taken enough of an interest in space technology to have internalized how satellite orbits work, to have intuitions for how orbital speeds and altitudes are correlated. Or they may have picked up a common misconception at some point in the past about how cellphones work, thinking cellphones are always talking to satellites. So they might have made some reasonable intuitions about how GPS works that - because they haven’t been exposed to the true answer - cause them to make some erroneous assumptions that seem like dumb mistakes a poor engineer would make.
Not having had the opportunity to come across those things is not the same thing as not being able to incorporate that knowledge into your worldview when you encounter it.
or was that the pothole cover? Sorry, I might have gotten confused.
If you ask an interviewee how GPS works and he says something about the cell phone sending signals to a satellite, you would want to pursue that further, at least to make sure that he's asserting that with a sufficiently low confidence.
Are you nitpicking the difference between a different engineer and a programmer or are you interviewing a different sort of engineer?
I think that it is a good question for any engineer. One explanation for why HeyLaughingBoy might have disagreed was that HeyLaughingBoy was making a distinction between a programmer and an engineer.
I thought that highlighting the distinction between what HeyLaughingBoy wrote (programmer) and the parent (engineer) was a parsimonious way of expressing this.
Bombers use a similar inertial guidance system, but with updates from GPS and star trackers as applicable. The reduced precision from GPS doesn't matter too much, as the inertial guidance systems are pretty good now.
Modern devices have them all, the iPhone 13 for examples combines satellite data from GPS, BeiDou, GLONASS & Galileo.
In practice, you get a "super-GPS", with way more satellites (120 vs GPS' 35) and great coverage. Potential accuracy can be in the cm's, it is all about software optimization.
(pretty sure each post has had its own HN submission)
also see 3Blue1Brown: https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw
The Lonely Halls Meeting a GPS Documentary
https://scpnt.stanford.edu/news/tom-sylvester-video-lonely-h...
https://www.amazon.com/Lonely-Halls-Meeting-GPS-Documentary/...
...Bartosz always manages to over-deliver despite very high expectations.
Amazing!
Maybe we should give him an impossible task, like explaining different types of neural networks ;-)
Due to the complexity of the signal processing (relativity means that the clocks onboard run faster than on earth) there was much scepticism. The story I heard was that they only let them launch 1 Block 1 satellite to prove that could work, and then the first block of 10 satellites was used to validate the system before spending enough to get the full 24 satellites needed.
http://www.nbmg.unr.edu/staff/pdfs/blewitt%20basics%20of%20g... (page 8)
http://lea.hamradio.si/~s53mv/navsats/theory.html
This guy made his own gps receiver from scratch in 1991-1992
Not really.
Determining the angle of a microwave signal requires a pretty big receiver dish (or an array of receivers, at least).
The wavelength of the GPS L1 band is 19cm, you'd need (roughly) something of at least 10x that size to get a good sense of where a signal is coming from, so on the order of 2m.
A single good antenna and sensitive amplifier gets you a fix on more satellites, which provides good accuracy with less space and hardware used.
Let alone the interactive visualizations.
There should be some sort of Nobel Prize for people that contribute to humanity’s education - and methods therof.
Kudos!
Organization and presenting information in a uniquely useful way can cement your life as having a major impact on the memetic evolution of human colossus, to a much greater degree than making babies ever will in most cases, even if no one ever knows or remembers your name.
There's a certain satisfaction in knowing that you've made an impact on millions of minds and that that impact will ripple into the future for as long as the light of consciousness burns.
It is worth every minute you spend reading it (took me over 60 to get through it and I feel like I did skim a little towards the end)
> It only takes light one billionth of a second to travel the distance of around 1 foot.
Holy crap. I wish I knew more people to share it with.
* where, "bookmark" may mean a variety of things that saves a URL so that it can easily be recalled.
Kudos to the author.
Bartosz is a one of a kind explainer of things - no matter what topic he touches, he always manages to outright nail the communication of the core concepts in a manner almost anyone can understand.
Let alone the interactive visualizations.
There should be some sort of Nobel Prize for people that contribute to humanity’s education - and methods therof.
Kudos!
Additionally the code level, If you view the source you can see, nice clean, non-minified code that is clear and has no dependencies other than browser/render standards. The project simply has a base.js and a gps.js, base for common canvas tools and gps for the project/interactives.
Very nicely done and very refreshing to see and experience. We need to get back to this level, it was a simpler higher level with more innovation. Even HN's code is this way, partially why this site is great besides the contributors and curation.
Engineering/creative and good value creation is ultimately taking complexity and making it simple, this is right along those lines in every aspect.
Simple is beautiful and very difficult to achieve in a cluttered/distracting/dependency/minimal context overload world. This interactive nails it. Solid work Bartosz Ciechanowski!
For anyone who is still hesitant: Just do it, it feels so good to put your money where you mouth is ;-)
(Also, a constant reminder to learn WebGL. ;-) )
Those graphics were lovely, and makes me realize how underutilized this stuff is in the modern web.