We do know the location of the antennas in our area.
I am just trying to improve the position of the mobile phones given by GPS - oh, the word! - with a simple algorithm.
Thank you for your help.
Improve it by how much? Bearing in mind that high precision GPS is achieved by having a base station receiving GPS positions, comparing them to its known position & then transmitting the corrections to the rover receiver(s), you aren't going to get any more accuracy by using the known position of a cell tower & measuring how long the signal takes to get to your phone. Since selective availability was switched off decades ago, uncorrected cell phone GPS XY accuracy is generally pretty good (within 5-6m), however Z accuracy will be 3 times worse - so around 15m. Even if you could improve your XY accuracy by using GSM signal (you can't), the Z accuracy would still be way out. Honestly, if it were that simple companies like Trimble, Hemisphere, et al wouldn't have spent billions of $ over the decades developing RTK systems (which in the early days were site-specific & could cost $100K+ to set up) & then improving them to the point where you can now subscribe to wide area correction services.
Even if you wanted to use a "proper" correction source, you couldn't - because cell phones don't have the functionality built in to be able to receive the corrections & then process them to derive a HPGPS position. There's plenty of good info on GPS & the various means of improving accuracy in the public domain if you want to Google it.
**** I was involved in setting up RTK GPS systems for mining & agriculture from the mid 1990s until about 2014 & worked for companies that specialized in these systems, including Trimble Navigation, Caterpillar & Aquila Mining Systems - all pioneers in applying GPS to machine control, guidance & autonomy systems.
- Colin.