Skip to content

weather/envcan: Fix parsing of station coordinates

Ismael Asensio requested to merge work/iasensio/envcan-fix-coord-parsing into master

Reason for the change

The station coordinates in the forecast xml results are in the form of textual "64.52N", "105.23W". We were previously only using the absolute value, which fails for most Canada points, as "W" has to be interpreted as a negative longitude.

The station coordinates are not exposed currently in the applet, but are used to calculate if the observation corresponds to day or night.

Screenshots or screen recordings

Example taken for Québec at 9AM local time (EST), when it is daytime in the location but night in Mongolia (where the wrong coordinates pointed to).

It also requires an actual "condition summary" (the text beneath the icon), otherwise the applet will copy the first forecast icon as the general one.

Before After
envcan-longitude-before envcan-longitude-after

Bugs fixed

BUG: 425770
FIXED-IN: 6.3.3

Merge request reports

Loading