On Android, in Developer Settings, it's possible to register an app as a Mock Location provider. I'm not sure the interface your app needs to surface to show up in that list for selection, but in theory that API existing means there's a potential path for this.
Your app could interface with more accurate external sensors, and then set the phone's GPS fix to be what the sensors read. Assuming that the issue is lack of accuracy at the sensor level and not lack of precision at the software / API level.