HalosGhost / shaman

A small, native C library and utility to fetch weather
GNU General Public License v2.0
49 stars 4 forks source link

Wind heading returns null #13

Closed jasonwryan closed 10 years ago

jasonwryan commented 10 years ago

Including a query with a wind heading request (%x) just returns 0.

shaman -l Wellington,NZ -m -f "%t°C %w %x"
7.34°C 5.16 0

It should return North-northwest

HalosGhost commented 10 years ago

Actually, it will never return North-northwest. However, it should be returning the degree heading (e.g., NNW is roughly 338°).

I believe I know what is causing this bug, and I'm working on tracking it down.


And, before you ask, I'm already going to implement a conversion specifier that will give you the cardinal/ordinal nomenclature rather than the degrees.

jasonwryan commented 10 years ago

Thanks. The output on OWM is:

Gentle Breeze 5.16 m/s 
North-northwest (345.504°)

So I just assumed that the wind direction was available as a string and by degree.

Thanks for chasing this up.

HalosGhost commented 10 years ago

Sadly, no. Though OWM's web interface provides the text version, their API does not. I'll be implementing that by-hand (along with the AU) until/unless the OWM API sees fit to include it.

HalosGhost commented 10 years ago

Fixed via ed7bd733ea