PWS API v2 - updating position (lat/lon)
-
I am the author of the recently released plugin that updates PWS observations from Signal K.
As this use case is targeted towards boaters, which are often moving vessels, there is a frequent need to update position (lat/lon).
With the exception of position (lat/lon), the remaining data in the PUT payload to
/api/v2/pws/{id}is seldom updated. Considering that for a moving vessel it would be appropriate to update the position with every observation GET update to/api/v2/observation/update, it doesn't appear efficient to be resending the remaining static information, including possibly theoperator_logo, with every transmission.Is there any interest to adapt/extend the new API v2 to make position updates for a station more efficient?
Thank you for the consideration.
-
@SY-GRACE I have no experience into updating my PWS using the new API v2, but I am sending regular data. What if you ONLY include the lat / lon fields in the json and omits all the other? Then you have thin and simple call to update the position. And I assume your plugin can save the previous reported position and if it has not changed significant the simply omit the position update at all? Just a way I would look at it. :-)

-
@Rolandoz said in PWS API v2 - updating position (lat/lon):
What if you ONLY include the lat / lon fields in the json and omits all the other?
Appreciate you thinking through the possible angles. I tried that approach previously. Because the station update via API v2 is done with a PUT, if any fields are missing they are overwritten as blanks.
@Rolandoz said in PWS API v2 - updating position (lat/lon):
And I assume your plugin can save the previous reported position and if it has not changed significant the simply omit the position update at all?
The code already has a configurable distance calculation (default: 300m) so that when a boat is at anchor or dock the station update is skipped.