Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    PWS API v2 - updating position (lat/lon)

    Scheduled Pinned Locked Moved Developers
    3 Posts 2 Posters 100 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SY GRACES Offline
      SY GRACE | Premium
      last edited by

      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 the operator_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.

      RolandozR 1 Reply Last reply Reply Quote 0
      • RolandozR Offline
        Rolandoz @SY GRACE | Premium
        last edited by

        @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. :-)

        8497c9c8-2c0b-487c-a0ce-923a9da8b524-image.png

        --

        SY GRACES 1 Reply Last reply Reply Quote 1
        • SY GRACES Offline
          SY GRACE @Rolandoz | Premium
          last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Windy Community  |  Powered by excellent NodeBB
          Terms of Use     Privacy Policy     Windy.com