GPS won’t return “wrong coordinates”. It will only return coordinates once it has enough data to actually calculate them correctly within a certain margin for error (few hundred feet worst case). It can return SV’s (SV is for “Space Vehicle”) without calculating coordinates. Use of the software I suggested above will allow you to see the SV data.
FYI, I’ve got the GNSS HAL accepted now to upstream GPSd. You can checkout their master branch, there is an android/ directory with a readme in it explaining how to build AOSP with it.
But be aware that it WILL NOT work with android 5/6 – requires a minimum of a release branch of android 9, although I’ve only tested it on master.
It should work out of the box with just about any external GPS, on USB or UART, and can even interface with a GPSd server running on a different machine accessible on the network. You can get UBlox or quasi-knockoff receivers WITH CERAMIC ANTENNA for <$20 on Amazon. I’d suggest getting at least a UBlox 8, since they can use multiple constellations (I.e., GPS, Glonass, Galileo) simultaneously, 7 and under can receive from multiple constellations, but only one at a time.
A note about so-called “knockoff” or “fake” UBlox receivers that you may have heard about; it isn’t that there isn’t any UBlox hardware in them, its that the devices are claiming to be some specific UBlox module, like a NEO-M8N, yet the module only contains the genuine UBlox M8030 chip (which is also in the genuine module), with the rest of the module being a copy of a genuine NEO-M8N. The fake modules can have various deficiencies, like relatively poor reception, or being impossible to update to the latest firmware. If it says “UBlox 8 engine” or something to that effect, its being honest. If it says “UBlox NEO-M8N”, then it could be real or could be fake.
And one last thing to remember, if you want to try this with the qualcomm gps, you will need that PDS patch, which may not apply cleanly to the latest GPSd.