Piaware with gpsd running


#1

Hi!

I recently added a GPS module to my RaspPi with PiAware 3.6.2 stretch to build a NTP server on it. I tried some configurations and currently I’ve gpsd running. After some time I wondered why the green IO LED flashes up every second.

I found out that /usr/bin/piaware tries to connect to gpsd as well and if available it writes every TPV sentence (once per second) to /var/cache/piaware/location(.env). I think it makes no sense to fry microSD Cards by writing this information every second without checking if the position changed noticeable. Using “-cachedir” to move the cache to a tmpfs would be a bad workaround since the feeder_id lives there as well.

I would prefer an option to disable the gpsd connection at all since I defined my position on the webinterface quite well. Or maybe some option to define it statically in the local config.


#2

This was originally written for FlightFeeders which have that path on tmpfs and a gps module that doesn’t constantly update its location after an initial survey. It’s quite possible that there’s some less than ideal behavior with other setups.

How much jitter do you have in the reported GPS positions? Currently piaware will rewrite the location file whenever the location changes at all, even if only by a small amount; I agree that it would make sense to only rewrite it when there’s some real movement.


#3

The position is stable on the first 4 (most of the time 5) digits after the “.”. I set my GPS receiver to “stationary” mode as well. It’s a u-blox M8.

Currently I patched health.tcl and commented out the “gpsd connect” line which works “perfectly”. Would be nice to have a command line switch for that, or a way to define them statically.

I saw that piaware somehow prefers “receiver data” over “gspd” over “adept” (health.tcl:103). “adept” I guess is the web interface. “gspd” is self-explanatory. But I could not figure out where “receiver data” comes from yesterday before I fell asleep. Because I set lat,lang in dump1090 as well and it’s not taken from there.


#4

“receiver data” is for cases where the location is provided as part of the Mode S data stream - the radarcape is the only thing that does this currently.


#5

I picked up a u-blox receiver & I can reproduce the problem here; should be fixable for the next piaware release.


#6

thanks a lot for your efforts and the good news!


#7

BTW, I recognized that /tmp is no tmpfs on flightaware 3.6.2 images as well. Easy to fix, but worth mentioning here since I noted -cachedir. Don’t know if this is intended our just a raspian default.

I’m not sure if I edited /etc/fstab on 3.5.x as well or if it was already there on the older images.


#8

It is the Raspbian default.


#9

Which u-blox receivers are you using? Thanks!


#10

A uputronics uBLOX MAX-M8Q Breakout


#11

How can you fix that? Is this enough?
Open /etc/fstab:

tmpfs                   /tmp                    tmpfs   size=512m       0 0

#12

That’s one way. The “systemd way” would be
sudo cp /usr/share/systemd/tmp.mount /etc/systemd/system/
sudo systemctl enable tmp.mount


#13

The original problem is fixed in 3.6.3, the location file is now only rewritten if the GPS location moves by more than approx 250m.