
Mobile software engineers (iOS and Android), are normally not familiar with how GPS works, instead of just getting Lat/Lon readings, and doing geo operations with it, why not become familiar with how GPS works? π€
This will not be a lengthy article, it will be a chat between an iOS developer (Alex π¨π»βπ») and an electrical engineer (Sarah π©πΌβπ»).
π¨π»βπ»: So what does GPS stand for?
π©πΌβπ»: It stands for (Global Positioning System).
π¨π»βπ»: Who created it? and what for?
π©πΌβπ»: The GPS project was launched in the USA back in 1973 due to limitations of old navigation systems.
π¨π»βπ»: I know it works without internet, but do I need cellular service to use GPS?
π©πΌβπ»: No.
π¨π»βπ»: How come it works without internet or cellular service?
π©πΌβπ»: You get readings from satellites, there are about 24 artificial satellites in 6 orbits.
π¨π»βπ»: So a mobile needs to connect to all of these?
π©πΌβπ»: Of course not, when you are stationary, you need to be exposed to 3 of them, when you are moving, you will need to be exposed to 4.

π¨π»βπ»: So how come it identifies me? and send me data?
π©πΌβπ»: The Satellites don’t identify you, they only emit synchronous pulses all the time everywhere.
π¨π»βπ»: And how does my mobile give me back the (latitude, longitude, and altitude)?
π©πΌβπ»: It compares the receive time of these pulses from each satellite, and use calculations to determine a point on earth, since the distance between these satellites is constant, and they have atomic clocks, the calculations will not be difficult.

π¨π»βπ»: The service is totally free, and I don’t have any subscription for GPS, how?
π©πΌβπ»: GPS is not the only service for (Global Navigation Satellite Systems), there are many like (GLONASS, BeiDou, Galileo…), there are other commercial solutions that I don’t know much about, there are a lot of details, I heard retail GPS receivers are designed to not work if the tracked object is moving fastly, you get the idea π§?
π¨π»βπ»: ah! yes.

π¨π»βπ»: What is the error margin?
π©πΌβπ»: It’s variable, but you can say between 15 to 50 meters, some commercial systems use other inertial systems to give more accurate estimations.
π¨π»βπ»: What is the minimum detectable value?
π©πΌβπ»: You mean the resolution? theoretically, as far as I know, it’s one inch, but practically it’s about 3 meters.
π¨π»βπ»: I once tried to use the GPS inside a big hospital, it didn’t serve any purpose, the readings were not accurate.
π©πΌβπ»: GPS does not work indoors.
π¨π»βπ»: But I saw some readings on my maps application.
π©πΌβπ»: it’s the last point that was read, some devices like Huawei also augment (Accel/Gyro) sensor data, to mimic a basic INS to give your readings inside buildings, but it’s not reliable.
π¨π»βπ»: And what is used for indoor navigation systems?
π©πΌβπ»: They use beacons and Bluetooth and other technologies, read about apple air tags!
π¨π»βπ»: You mentioned sensors, why can’t we use the basic sensors like accelerometer/gyroscope of the mobile to calculate the position?
π©πΌβπ»: when you “integrate” the acceleration twice, the error will explode fastly, and it will become useless in a short time of movement, even if this works, this will not give you an absolute position, and you have to deal with drifting and gimbal lock and a lot of complexities.
π¨π»βπ»: That was a lot of information, thank you.
π©πΌβπ»: Welcome!, see you soon.