Ask / Submit
18

Additional data for Sailfish Weather application

asked 2018-07-11 14:49:47 +0300

Edz gravatar image

updated 2018-07-11 15:26:43 +0300

jiit gravatar image

@jahonen

with respect to the Sailfish Weather app, I wondered if there is more data to access, i.e. sunrise/sunset or humidity, etc (https://corporate.foreca.com/en/weather-data/weather-api-details).

Is it simply a case of, the appropriate QML has not been written or is there simply no more data to access as a developer/end user?, I'd be interested to know as I am keen on developing the Sailfish Weather app, even if only for personal use.

Regards,

Edz

edit retag flag offensive close delete

Comments

1

Thanks for adding tags @jiit

Edz ( 2018-07-11 15:34:19 +0300 )edit

@jahonen, it's been a fortnight since I posted my original question, might you care to give a 'yay' or a 'nay' ...? :)

Edz ( 2018-07-25 12:30:11 +0300 )edit

Hi, Sorry for the late reply but I was on holiday for 5 weeks and back only now. I have no idea about this app, but I will forward your question to the right person(s). Regards, Jarkko

jahonen ( 2018-08-27 07:56:07 +0300 )edit

No worries@jahonen, I hope you had a decent break :)

Edz ( 2018-08-27 10:21:04 +0300 )edit

Thanks, I really did :)

jahonen ( 2018-08-27 10:39:15 +0300 )edit

1 Answer

Sort by » oldest newest most voted
7

answered 2018-08-27 12:54:29 +0300

Joona Petrell gravatar image

Some forecast information is not covered in our current license, but yes there are data that we could extract from the weather forecast API that we don't currently use: probability of precipitation (pp), daily average wind speed (wsx), daily maximum wind speed (wsa), sun rise time (rise), sun set time (set), UV index (uv), day length (dl).

Weather details page in Weather app could be extended to show more information about the forecasted weather: /usr/lib/qt5/qml/Sailfish/Weather/WeatherPage.qml

The data is easy to extract by introducing respective XmlRoles in the forecast model: /usr/lib/qt5/qml/Sailfish/Weather/WeatherForecastModel.qml

Leaving most of the work in the UX, which requires certain type of visual and interaction design skills. I am happy to try out improvement proposals in the form of prototypes.

edit flag offensive delete publish link more

Comments

Thanks @Joona Petrell.

I had a feeling licensing would be part of the deal :)

I have played extensively with getting other data to show, but I really am a total noob compared to someone like yourself. I managed to develop a way to turn compass headings into text to be displayed inside WeatherDirectionIcon and it works even if it is a little bit clunky.

Thanks for the clues, oddly, WeatherForecastModel.qml is one of the pages I have paid no attention to regarding XML roles, so I will dive in and start playing (tinkering).

With WeatherPage.qml, I have played quite a bit trying to get UV, rise, set, pp and tp (thunder probability) but I never actually got anything to display - but then I am a dork when it comes to code! :D

One of my next challenges is to get some weather data displayed on the lockscreen, namely windspeed and wind direction, I am already playing with it along with another user on tmo. It's harder than I thought.

Good to hear from one of the SFOS masters, thanks for replying! :)

Edz ( 2018-08-27 13:10:23 +0300 )edit

Also, it would be nice to have options for different speed units. I have copied and then edited TemperatureConverter.qml to WindSpeedConverter.qml and have added a menu to jolla-settings/pages//sailfish-weather/SettingsPage.qml, so we can choose from m/s(default), mph, kmh & kts (very sailfishy!), but somehow, I cannot get the unit to change. I understand that the default speed unit requires a little bit of maths to make the different units display correctly, like *2.2 to get MPH or *3.6 to get KMH. I'm missing something but I don't know what ~ story of my life, so close, but no cigar! :D

Edz ( 2018-08-27 14:34:26 +0300 )edit

Distance units normally default to system locale (e.g. US English uses Imperial, German Metric system). Maps application settings have option to manually select units you like, if it was a system-wide setting instead Weather app could follow those.

Joona Petrell ( 2018-08-27 14:52:57 +0300 )edit

well - imperial us, metric german is not entirely right its basically uk an us imperial, rest of the world metric ;)

kaktux ( 2018-08-28 00:03:32 +0300 )edit

I know, just giving example countries. 🙂

Joona Petrell ( 2018-08-28 02:35:45 +0300 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2018-07-11 14:49:47 +0300

Seen: 460 times

Last updated: Aug 27