Magnetic Variation & headingTrue
Hi, I have openplotter set up with pypilot and I'm now able to see my headingMagnetic in SignalK. I'd love to also have headingTrue (e.g. for KIP's Wind Steering Display). It seems SignalK needs a source of magneticVariation. Neither of my GPSs seem to include it in their output, the key is there in SignalK as coming from my GPS, but its value is null. How do most people get variation data? It seems like there should be a plugin to compute it from WMM but I can't find anything.
12 Replies
You can hard code it in defaults https://github.com/SignalK/signalk-server/wiki/FAQ:-Frequently-Asked-Questions#how-to-add-missing-units-and-static-data-eg-displayname
GitHub
FAQ: Frequently Asked Questions
An implementation of a Signal K central server for boats. - SignalK/signalk-server
Great, thanks, that worked! I also found out it can be computed by derived-data plugin so I'll use that instead of hard coding
It threw me off that the derived-data README does not list it, but looking at the plugin config I see this is not a complete list and it can do quite a bit more than the README states
lol. forgot about that…
@fnoble where are you getting magnetic heading from? N2K compass, B&G...?
@barnaclebill From pypilot + an I2C 9-axis IMU
Which MCU (or chip)? I'm having a difficult time finding a magnetometer that has adequate noise filtering. Even sitting on my desk, the bearing for the 4 IMUs I've tried constantly drifts.
I use this one, same as PyPilot recommend now > https://shop.pimoroni.com/products/icm20948?variant=27843993960531
Great, thanks. I went into pypilot docs a bit and it looks like it uses an IMU library that has a lot of calibration and even Kalman filters built-in. That's exactly what I need. Trying to get pypilot working on my RPI and not having much luck but I will try the pypilot forums.
I now have a working IMU and basic USB GPS connected to my RPI, which is accessible on /dev/ttyACM0. When I start pypilot it connects to both and provides magnetic heading data to SK. However, the GPS is configured as a data source in SK, but if pypilot is using it, SK cannot access the tty (basic Unix/Linux limitation). Is socat my only option? Presumably I need to make sure socat starts before SK and pypilot, which seems questionable. Is there a more general/simpler solution to sharing a USB/tty data source for SK?
It's GPSD which takes over the GPS serial device when pypilot talks to gpsd. See this thread on openplotter > https://forum.openmarine.net/showthread.php?tid=5282&pid=29474#pid29474
Unable to turn off [email protected] so ..
"At the moment I forced gpsd to stay off by renaming /lib/systemd/system/[email protected] to /lib/systemd/system/[email protected]
Been running stable since then but a bit of a messy hack, still - it works "
Pypilot then gets GPS data from signalk, guessing the websocket.
Thanks PaddyB. That sort of worked for me...replied to your thread on openmarine because it doesn't look like a SK problem.
Uninstall the pesky thing if it causes trouble
It's shoved in the corner not allowed to do anything now. Order has been restored. 😎😁