Trying to add roll&pitch fields tracked in the App
-
I have roll and pitch data in my signalk data (I can see them in the data browser with path "navigation.attitude"), but I cannot find the dame in the list of field I can add for tracking in the app.
Have anyone tried that, any hints?
Thank you in advance
-
Actually navigation.attitude is composite field with 3 members ("yaw","pitch" and "roll").
I cant see any of them in the app as well.
-
It is indeed because it is a composite value. Those need to be split up. You can do so with Node-RED, please install Node-RED plugin to Signal K (Detailed instructions in this video tutorial)
And then import this snippet (courtesy of Scott Bender of Signal K team) using the top right menu item.
[{"id":"03814fb729f94bf2","type":"signalk-subscribe","z":"1a65e795a2e4022a","name":"navigation.attitude","mode":"sendAll","flatten":true,"context":"vessels.self","path":"navigation.attitude","source":"","period":1000,"x":190,"y":200,"wires":[["aa303e3ca247371e","1be984c9b6dbe6d0","7ae5e956a921f72f"]]},{"id":"aa303e3ca247371e","type":"change","z":"1a65e795a2e4022a","name":"yaw","rules":[{"t":"move","p":"payload.yaw","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"navigation.attitudeflat.yaw","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":200,"wires":[["74ede648e6a55306"]]},{"id":"74ede648e6a55306","type":"signalk-send-pathvalue","z":"1a65e795a2e4022a","name":"","source":"","meta":"{\"units\": \"rad\" }","x":710,"y":200,"wires":[]},{"id":"1be984c9b6dbe6d0","type":"change","z":"1a65e795a2e4022a","name":"pitch","rules":[{"t":"move","p":"payload.pitch","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"navigation.attitudeflat.pitch","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":260,"wires":[["74ede648e6a55306"]]},{"id":"7ae5e956a921f72f","type":"change","z":"1a65e795a2e4022a","name":"roll","rules":[{"t":"move","p":"payload.roll","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"navigation.attitudeflat.roll","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":320,"wires":[["74ede648e6a55306"]]}]It will create a flow like this:

When you deploy, it will give you explicit paths for
navigation.attitude.yaw,navigation.attitude.pitchandnavigation.attitude.roll.
At some point, Saillogger should decode composite values but there are many paths that have composite values and doing so in a smart way requires some thinking.
-
Thank you so much.
I'll try that.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login