script have json with ip/network to coordinates mappers. for example, I know, what network 192.168.3.0/25 - my home's network, I map network to home coordinates with good accuracy. Or I know, what my office's external IP is 25.25.25.25 - I map it in json files wit office coordinates. If script found known IP, it change coordinates and send corrected request to traccar. If IP is not in json - request doesn't change
WiFi and cell triangulation would still be better accuracy in most cases, unless you're in a rural area.
sometimes it work wrong in big city in Russia, because location services suppressed. Sometimes coordinates jumps may be 100 meters - 50 kilometers without open sky
Example
But, your are right, will better use another accuracy sources. Main task for this script - detect real device IP and publish traccar via balancer (nginx/haproxy/etc) with tls
By the way, there's an option to include IP address in attributes on the server side. Then you can potentially use computed attributes to override coordinates.
yes, I use computed attribute with code for rewrite IP in true attribute
How does that increase accuracy over WiFi/cell triangulation?