I'm not sure you've picked up on how the data is being used in the next steps if the process. Please refer to this method I've been using successfully:
Okay, so I've finished these bits of code and I think I now have a working test app that can effectively get GPS coordinates while my phone has no data or is in airplane mode (with location still on).
It relies on the work of @TIMAI2 here: Location Services with HTML5 GeoLocation to more effectively/reliably obtain GPS coordinates while offline. I found I needed to extend the timeout period to at least 10000ms for my particular phone.
and a python script from Daniel Agar here: PX4-ECL/geo_lo…