You're on a busy city street. Your GPS app abruptly tells you to make a left turn, so you quickly cross three lanes of traffic. Once you're in the far left lane, the app suddenly changes its mind: Take a right at this intersection, not a left.\nWhat the (expletive of your choice)?\nThe events described above happened to me, more than once, and while using different GPS apps. I've been told to drive down an unpaved, unlighted country road at night, even though there was a paved, lit street just ahead that could get me where I was going. I've had major streets mysteriously disappear from my turn-by-turn directions. I could go on, but you get the idea.\u00a0\nGPS navigation apps and portable navigation devices (PNDs) are amazing. Multiple technologies work together behind the scenes \u2014 including satellites and software-based maps \u2014 to guide us to our destinations. GPS technology helps us avoid traffic jams and red light cameras, find nearby four-star Italian restaurants, and locate the cheapest gas along our routes.\n[Related: How to Get GPS Directions on the Go Without Using Your Data Plan]\nI'd be lost, literally, without GPS. And yet, each and every GPS navigation app and PND that I've ever used has, in some way or another, led me astray. They all provided head-scratching, circuitous, and in a few cases, downright dangerous directions.\u00a0\nTo find out why, I talked to two GPS navigation companies: Magellan, a GPS navigation company founded in 1986 and a developer of PNDs and mobile apps; and ALK Technologies founded in 1979 and the developer of the CoPilot mobile apps, among other navigation products. (I reached out to both Garmin, which makes GPS apps and devices, and Google, which develops Google Maps and owns Waze, but neither responded to my requests for comment.)\nHow GPS Works\nTo fully understand how and why things go wrong, it helps to know what's going on behind the scenes. When you open a GPS app on your smartphone or turn on a PND and ask for directions, the following technologies jump into action.\nGPS Satellites. There are 24 GPS satellites orbiting the Earth at about 12,000 miles above its surface, according to Garmin's website, though other sources put the total at 30. The satellites complete two full orbits in less than 24 hours at speeds of roughly 7,000 mph.\nThe first GPS satellite was launched in 1978 by the U.S. Department of Defense. In the 1980s, the U.S. government made GPS satellites available for commercial use.\nGPS Receivers. GPS satellites transmit radio signals to receivers on Earth, including the ones in your smartphone or PND.\u00a0\n"GPS receivers take this information and use triangulation to calculate the user's exact location," according to Garmin. (Triangulation is a system for establishing the distance between any two points.) "Essentially, the GPS receiver compares the time a signal was transmitted by a satellite with the time it was received. The time difference tells the GPS receiver how far away the satellite is. Now, with distance measurements from a few more satellites, the receiver can determine the user's position and display it on the unit's electronic map."\n(Devices that lack GPS receivers, such as Wi-Fi-only iPads, can use Wi-Fi networks to determine their users' approximate locations.)\u00a0\nMapping Software. GPS receivers apply their users' locations to software-based digital maps. Those maps are either downloaded to PNDs or smartphones, as is the case with some navigation apps such as CoPilot; or remote servers transmit map data via cell networks to GPS-equipped smartphones or other device.\nNavigation-app and PND developers typically license mapping software data from Tele Atlas (a subsidiary of TomTom) or Nokia's HERE division (formerly NAVTEQ). OpenStreetMap.org, a crowdsourced "Wiki world map," also supplies map data to services including MapQuest and Apple Maps. Some GPS developers incorporate map data from more than one source, and Google is building its own mapping database.\nMap software databases include Point of Interest (POI) data, as well, which supplies information about businesses, landmarks and other places on maps, so users can locate nearby gas stations or other destinations while traveling along routes.\nTraffic Data. Today, the majority of GPS-app and PND developers provide real-time traffic data that's licensed from providers, including INRIX, and streamed over the Internet. Traffic databases continuously gather anonymous information about road speeds from mobile devices, connected cars and other vehicles. The information is transmitted to remote servers over cellular networks. Traffic databases combine the anonymous data with information from other databases, such as weather forecasts and road construction details. Real-time traffic updates are then transmitted back to users' devices to help drivers navigate around traffic jams or other temporary roadblocks.\nIntegrating All That Information. GPS smartphone apps and PNDs perform hundreds of calculations using a variety of data sources to get people from one location to specific destinations.\nFor example, a processor inside Magellan's PNDs uses an algorithm that incorporates all of these different pipelines of information, according to William Strand, the company's director of product marketing.\u00a0\nThe algorithm "analyzes the base map, which is stored on the PND; takes in the satellite signal; receives your input as to where you want to go; and uses the algorithm to figure out the best route to get to that location," Strand says. "Then, it overlays any other information, like traffic events and red light camera locations. All these different pieces of information come together and are transformed into directions that speak to you and monitor what you're doing, so it can correct you if you wander off course."\u00a0\nWhen Good GPS Goes Bad\u00a0\nAny one of the many interdependent pieces of the GPS puzzle can fail to deliver optimal results for a variety of reasons. For example, environmental factors, such as clouds, dense forests and tall buildings, can block or degrade signal transmissions between GPS satellites and receivers. The quality of the GPS receiver in your smartphone or PND plays a role as well, with most receivers providing position accuracy within 10 to 50 feet, or 3 to 15 meters.\nDavid Quin, vice president of consumer applications, ALK Technologies, says GPS receivers in smartphones have improved significantly during the past few years. Many smartphones also use Wi-Fi or cell-tower locations to assist GPS receivers, helping phones fix on satellite signals more quickly.\n[Related: What a Trip to London Taught Me About GPS Apps and Navigation]\nTo calculate routes, software algorithms make their best guesses on how to get you where you're going as efficiently as possible. Each possibility is weighed with a value for distance and speed limits, Strand explains.\u00a0\n"There are lots of crazy roads out there, with hairpin curves, different speeds and one-way directions, and you have a computer brain trying to make sense of it all, weighing one factor over another," Strand says.\u00a0\nSometimes, algorithms don't take everything into account when deciding on a route, according to Strand. And while the resulting directions may be technically accurate, they may not always be efficient, at least compared to how a human who knows the area might navigate a route, he says.\nOutdated maps often result in the delivery of faulty directions, especially on PNDs because many require manual updates. Roads can also change significantly in relatively short periods of time.\u00a0\nSometimes map data is just plain wrong, and it's not hard to find related horror stories online. In 2013, for instance, Apple Maps instructed users to drive across a runway to get to the Fairbanks International Airport in Alaska. A woman, her daughter and a friend got lost in Death Valley the same year after being directed in circles in 128-degree heat. And in 2014, a truck driver faced charges after driving on Iowa's Heritage Trail, a recreational trail that is not suited for cars, much less trucks.\nWhy do GPS directions sometimes suddenly change at the last minute, as in the example used to open this story? Quin says the directions may have changed in that scenario because the current traffic situation also changed, and the app was trying to prevent me from getting caught in gridlock. Or the app could have briefly lost its GPS connection and then recalculated my route based on my current location when it retrieved a signal.\n\n\t\n\nThe Future of GPS\nAn increase in the use of crowdsourced data, obtained from GPS apps on smartphones or from PNDs, will help make navigation more efficient in the future, according to both Quin and Strand.\u00a0\n"We have only scratched the surface of what GPS navigation can deliver," says Quin. "The evolution won't come so much from features but from analytics, of really having a deeper understanding of where you drive, how you drive, the average speed of the roads you take."\u00a0\n[Related: Top 15 GPS Apps and Devices for Travel]\nThe "big data" associated with collective driving histories will have a positive impact on delivering the most efficient routing. However, the real question may be whether drivers, pedestrians, cyclists and others will be willing to share their comings and goings with "Big Brother."\nPrivacy concerns are a real concern and a possible impediment in the path toward more efficient GPS driving directions, according to Quin. "The public has been wary of anyone knowing anything about where they are, and you need to get their approval to monitor their car speed and location," Quin says, even though that data is supposedly anonymous.\nYounger drivers are less concerned about the privacy aspect of data collection than older drivers, according to Strand. The popular Waze navigation app, which crowdsources current traffic conditions and road hazards, is helping people become more comfortable with sharing location information, he says.\nThough technology will continue to evolve, according to Strand, "users are the key to getting better directions in the future."