Weather Data Field / API

Here is the design of the latest data field I'll develop over the next few days as I have time.

The Toybox.Weather API is nice, in theory. If you've played with that, does it work reasonably well? I assume it requires your smartphone to be in cell tower range, and Garmin Connect Mobile to be running and connected to your Garmin device?

There isn't a way to calculate the altitude of the weather reporting station, right? So an adjustment could be estimated for temp (say you are 3000 ft above the station's elevation).

  • Weather and forecasts are cached on the watch so you'll have data when you don't have cell service.  With Android, the weather where I live is updated every 20 minutes (if there is cell service), and I've heard it's about every hour with iOS.  See observationTime

    You don't even know the location of the weather station, much less it's elevation.  observationLocationPosition is your location, based on the cell phone's location.

  • Thx Jim! Bummer about observation location. Good to know.

  • I was curious and a while back I put together a little app that would show observationLocationPosition on a MapView, so I could see what it was as I moved around town.  

  • observationLocationPosition is your location, based on the cell phone's location.

    I do not believe that this should be the case. I'm fairly certain this should be the position where the observation was taken (where the weather station is located).

  •   As I said, i have an app that shows currentLocationPosition on a map on a map capable device..  I'll send it to the general CIQ email and reference this thread.  It's a bit of a hack of a hack, so the code in a bit messy Slight smile

    Or are you saying it's a bug?

  • I'm saying the behavior you believe you are seeing is a bug. The system should report the location where the conditions were observed, not the location you were when your device received the data.

    The documentation specifically says...

    var observationLocationName as String or Null
    
      Textual description of the observation location. If the app does
      not have the position permission then this will be null.
      
    var observationLocationPosition as Location or Null
    
      Location where the conditions were observed. If the app does not
      have the position permission then this will be null.
      
    var observationTime as Moment or Null
    
      UTC time the conditions were observed.

    If the nearest weather station is at the airport 30 miles away and recorded the data at 3:54pm, the data should indicate that the conditions were observed at the airport, with a GPS position and a timestamp.

  • See, to me "Location where the conditions were observed" can easily mean where you are observing that weather.  

    But it wasn't clear to me, and hence, I wrote the app.

  • IMO it only makes sense for us to tell you when and where the conditions were observed. I will throw together a test app to see what it says. If it is a bug, I'll make sure it gets filed.

  • My test app gives me the observationLocationName of "Corvallis Municipal Airport" which is about 27mi away from my home, but it gives me observationLocationPosition at my home.

    If I plug the GPS coordinates of my home into the weather service, the response data has observationLocationName as "Corvallis Municipal Airport" and observationLocationPosition of 44.4971, -123.29 (the location of the airport).

    So, for some reason the position data from the service is being ignored and we are being given the GPS location of the device instead. This is a bug. I've filed it as WERETECH-11121.

  • Hi do you know if this bug has been fixed? Is there a way for me to see the status or is that an internal database? Thanks!!