Aswin - How to handle duplicate paths? My advan...
How to handle duplicate paths? My advanced wind plugin can correct apparent wind (for leeway, mast height, etc). As a result, the apparent wind path is found twice, although coming from different sources. What is the preferred way to deal with this? Should the plugin always remove the uncorrected delta's, should this be optional, or should the two delta's coexist?
6 Replies
I would make it optional
In case someone is using a client that can’t differentiate between sources.
And then someone else might want to see and/or record the original value.
Use https://demo.signalk.org/documentation/develop/plugins/server_plugin_api.html#appregisterdeltainputhandler-delta-next---
if you don’t want to keep the original value.
Server API - Signal K Server Documentation
A Guide for users and developers.
Would you be able to use "Source Priorities" for this? Or do they only work for external sources and not values produced by plugins?
I don't know. I have never used them. But reading about them it seems that it is not the plugin that defines source priority.
Yes, the user could setup source priorities for this
@Aswin we have a similar situation where we have 2 GPSes and get duplicate paths. The source priorities allows the user to select which will usually be used and also allow the other one as a fallback.