My newly installed Piaware setup is working fine, except that my position shown on the Skyview map is about 500 metres off.
I have a GPS module on my Pi in order to use it as an NTP server; it’s also running Pihole as my DNS server. I think having the GPS is stopping me from being able to set the location manually in my site configuration on the Flightware My ADS-B page. I know I could set it manually for another Pi that did not have a GPS but I want it running on my main Pi. The config page just says “Your site location is set by your receiver.” and does not have the “set location” or “set height” buttons.
My GPS is spot-on with my location right now, although it does tend to jump around a little within 10m or so.
Is there anything I can do to fix this? Other than remove the GPS, that is.
I’m not sure why your position would be that wrong when you say it only changes by 10m?
Setting the position manually is a good idea anyway.
Let’s see if that helps.
The position given on the stats page is accurate, and changes to reflect the little bit of jumping around my GPS does so it’s clearly getting the correct coordinates from gpsd. I have no idea why the location on the map should be 500m off. The GPS was not turned off throughout the installation so should have given good coordinates even immediately after a Pi reboot.
The use-gpsd option isn’t recognized on mine:
pi@PiHole:~ $ sudo piaware-config use-gpsd no
warning: cannot set option ‘use-gpsd’, it is not a known config option
I tried piaware-config -showall and use-gpsd wasn’t listed in the settings. I should be using the latest piaware I would think, 3.6.3, since I only installed it the other day.
Where would I put the dump1090-fa accuracy option so that it’s applied at startup?
Well it looked like multiple errors but it’s justone:
Apr 11 10:15:56 pi piaware[615]: failed to write status file: invalid command name "gpsd"
Apr 11 10:15:56 pi piaware[615]: traceback: invalid command name "gpsd"
Apr 11 10:15:56 pi piaware[615]: while executing
Apr 11 10:15:56 pi piaware[615]: "gpsd is_connected"
Apr 11 10:15:56 pi piaware[615]: (procedure "build_status" line 91)
Apr 11 10:15:56 pi piaware[615]: invoked from within
Apr 11 10:15:56 pi piaware[615]: "build_status"
Apr 11 10:15:56 pi piaware[615]: (procedure "write_status_file" line 2)
Apr 11 10:15:56 pi piaware[615]: invoked from within
Apr 11 10:15:56 pi piaware[615]: "write_status_file"
Which is fixed by:
Edit: Yeah that’s as not a fix.
The error comes from programs/piaware/statusfile.tcl: The procedure gpsd is called but it doesn’t exist when use-gpsd is set to no.
Sorry i assumed you were on a piaware sd-card install.
On the package install it is easy, just edit
sudo nano /etc/default/dump1090-fa
It is in the last line, change the value after --json-location-accuracy to 2.
Ctrl-o and enter to save and Ctrl-x to exit. (or use any editor you like)
Yeah sorry it seems to be a new option in a testing version.
Anyway if you don’t mind your position being set by gpsd you don’t need that option anyway.
Ah yes, there’s the config file. I didn’t look in ‘default’ (everywhere else but not there).
I wondered if you were running a test version that explains it. I don’t mind the location being set by gpsd; it’s generally within a few metres. Unfortunately I bought the expensive GPS module, which it seems doesn’t have a ‘static location’ setting like the cheap ones do for use in timekeeping systems. I do have a cheap Chinese module on the way though.
My concern was more that the wrong location was being used for MLAT, than simply looking wrong on my map. Hopefully that won’t be the case since the stats page shows the correct coordinates so clearly piaware is seeing them.
Yeah the “fix” i posted before was incorrect, you probably saw that already.
This should work though and it at least produces no errors for “use-gpsd no”.
diff --git a/programs/piaware/statusfile.tcl b/programs/piaware/statusfile.tcl
index c3417b4..403128b 100644
--- a/programs/piaware/statusfile.tcl
+++ b/programs/piaware/statusfile.tcl
@@ -156,7 +156,7 @@ proc build_status {} {
# gps: GPS fix status
# only report this if we actually got a gpsd connection at least,
# as most installs won't have GPS.
- if {[gpsd is_connected]} {
+ if {[piawareConfig get use-gpsd] && [gpsd is_connected]} {
if {[info exists ::locationData(gpsd)]} {
lassign $::locationData(gpsd) lat lon alt altref
set data(gps) [status_entry "green" [format "GPS 3D fix at %.3f,%.3f" $lat $lon]]
Anyway it’s probably not a pretty fix but it’s a fix.
Is there a way to display the lat/long of the mouse on the skyview map (or a grid on the map). I see the lat/long of planes in the table , but not on the map.
The reason I want this is if a plane reports their position (by voice) in lat/long , I would like to easily move the cursor to that position