GPS return nil value at some coordinate
kulapa2000 opened this issue ยท 6 comments
Thank you for the report! Just a couple of questions:
- What are the positions of your GPS hosts? Just so I can attempt to reproduce this locally!
- Could you run
gps.locate(2, true)
as well, and screenshot the result - this should include some additional debugging information, which will help explain why it cannot find the position.
I was using it on a forge server, but when i log into the server today, gps works normally at that coordinate. But please don't close this issue for now, because this bug has showed up for a several times, I will follow up next time it shows up.
Thank you, that's very helpful!
The problem here is that you're very far away from your GPS array, which causes accuracy to suffer. In this particular case, we can't disambiguate on the y axis between
Because the two distances are less than 0.01 away from each other, the GPS library decides that's not accurate enough to guarantee the correct position.
The easiest fix here is just to move the GPS hosts further apart. Just shifting the top computer up a few more blocks should help here!
If you're trying to serve a massive area, I normally put my GPS hosts in the corners of a chunk, with 14 blocks between them. So something like this: