yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] M66B:
Yes, but you should use a known altitude, not a GPS altitude, since these are not accurate enough for this purpose.

The altitude fetched from the Google elevation API is suitable, provided you are at ground level.

My pressure sensor is accurate enough to see the difference in altitude between ground level and desk level!

Note that fetching an altitude does not update the altitude of the last known location (since this value is not stored into the database for performance reasons).
[Android Apps and Games] mva1985:
Something is not being converted correctly from C to F.... the Celsius temp is what is being reported for my city on openweather
[Android Apps and Games] mva1985:
The time is also off.

Edit... I understand about the time now. Makes sense.
[Android Apps and Games] an0n981:
One suggestion, one issue:

Suggestion: Add an optional notification for the weather details (I could finally get rid of my intrusive weather app :) )

Issue: Weather only updates once an hr, not ever 30 minutes. I haven't tried changing the value yet.
[Android Apps and Games] M66B:
What is exactly wrong with the conversion?

What is exactly wrong with the time?

The time in the weather history is the time of the weather report, not the time of fetching the weather report.
[Android Apps and Games] mva1985:
I was curious as to how often we could make requests for weather from openweather as users?
[Android Apps and Games] M66B:
The notification was on my to do list even without you asking, for the same reason and because closer weather stations will have a more accurate temperature.

The update interval is the interval to fetch weather reports, but actual updates depends on the frequency of updates of the weather station.

Hint: in the database is more information than currently shown.
[Android Apps and Games] mva1985:
20.5 celsius is equal to 68.9 F not 52
[Android Apps and Games] M66B:
The users of the application use a common API key I have requested.

The usage limits of OpenWeatherMap are generous as documented here:

http://openweathermap.org/price (free plan)
[Android Apps and Games] M66B:
This should be fixed in test version 1.5-2:

https://github.com/M66B/BackPackTrackII/releases/tag/1.5
[Android Apps and Games] mva1985:
Works. Thanks.
[Android Apps and Games] M66B:
A little note: the free plan of OpenWeatherMap does not support secure internet connections, so your last location is not sent encrypted over the internet. If there is an interest to use a paid plan, I will make the API key configurable.
[Android Apps and Games] an0n981:
Are any addtional infos sent or only the location?

Their free plan is very generous, but their paid plans are not.
[Android Apps and Games] M66B:
Only the latitude and longitude.

Check the logcat for the exact URL being sent (which contains all info).
[Android Apps and Games] an0n981:
Do you by chance have a map view of weather stations? I have been searching but unable to find any reliable infos. I believe the station that BPT2 is using is a little to far away.
[Android Apps and Games] M66B:
The distance to the used weather station is in the database.

I am working on displaying the station information and the wind direction.

http://openweathermap.org/maps

(check "stations informations" upper right)
[Android Apps and Games] mva1985:
Right now everyone is just using yours right?

If it was configurable then each user could get 1200 calls per month, would that be correct? Assuming each got their own key.
[Android Apps and Games] an0n981:
According to that link, there is a station about 100m from me, however one 8km away is being used.

Edit: disregard, I was reading the map wrong, the icons I was looking at were not weather stations.
[Android Apps and Games] M66B:
It is 1,200 API calls per minute and 1,700,000 per day, so I don't expect problems anytime soon:

http://openweathermap.org/price_detailes

Yes, this API key is currently being used by everybody:

https://github.com/M66B/BackPackTrackII/blob/master/app/src/main/AndroidManifest.xml#L44
[Android Apps and Games] an0n981:
Does a calibration offset of -17.2 sound like a realistic value?
[Android Apps and Games] mva1985:
I saw the min abbreviation on their website and thought it was a mistake. So yeah 1200 per minute should be fine :)
[Android Apps and Games] M66B:
I have no idea of the precision/calibration of the pressure sensors of different devices (yet), but this seems far off, comparing it to the minimal offset I use for my Nexus 5.
[Android Apps and Games] M66B:
I have added two new FAQs, which might contain useful information:

https://github.com/M66B/BackPackTrackII#FAQ9
[Android Apps and Games] M66B:
There is a new test release available here:

https://github.com/M66B/BackPackTrackII/releases/tag/1.5

Please let me know if the weather info works for you, if it is accurate and if the altitude is correctly calculated from the atmospheric pressure.

Note that the altitude is never calculated from the atmospheric pressure for passive location updates (location updates from other applications).
[Android Apps and Games] mva1985:
Weather station reading from website showing 1010.8 hPa and this number is adjust for mean sea level.

All my readings from BPT2 are 1012. No variation

Two other barometer apps from the play store are showing 976.8

Temperature, wind and humidity are looking good.

Altitude seems to be running high.

Sent from my SM-N910V
[Android Apps and Games] M66B:
Weather stations report atmospheric pressure corrected to mean sea level, so that is correct.

Can you please find/post loggings like this:

W/BPT2.PressureService( 8356): Pressure 1010.7535mb offset=-1.8
W/BPT2.PressureService( 8356): Average pressure 1010.75946mb

Maybe your pressure sensor is slower than the Nexus 5 sensor, so try to increase the setting 'Pressure averaging time'.

Edit: do not try to calibrate the pressure sensor reading to match the reading of the weather stations. The pressure sensor reading should be the pressure at your current altitude (not sea level). It is this difference which is being used to calculate the altitude.
[Android Apps and Games] M66B:
There is another new release with some improvements:

https://github.com/M66B/BackPackTrackII/releases/tag/1.5
[Android Apps and Games] an0n981:
You're update faster than I can get around to testing. The weather info popup is showing '- km' instead of the actual distance
[Android Apps and Games] M66B:
Yes, that is because the database structure has been changed. Future weather reports will have a correct distance again. Instead of the distance, the observer's location (=last location at the time of fetching the report) is stored now.
[Android Apps and Games] M66B:
There is a new test release available:

https://github.com/M66B/BackPackTrackII/releases/tag/1.5
[Android Apps and Games] an0n981:
I restroed a nandroid from yesterday and updated from BPT2 v 1.4 to 1.5-6 and am now receiving the following error:

E/SQLiteLog(14722): (1) duplicate column name: station_latitude
E/BPT2.Service(14722): android.database.sqlite.SQLiteException: duplicate column name: station_latitude (code 1): , whil
e compiling: ALTER TABLE weather ADD COLUMN station_latitude REAL NULL
E/BPT2.Service(14722): android.database.sqlite.SQLiteException: duplicate column name: station_latitude (code 1): , whil
e compiling: ALTER TABLE weather ADD COLUMN station_latitude REAL NULL
E/BPT2.Service(14722): at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:891)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:502)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1674)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1605)
E/BPT2.Service(14722): at eu.faircode.backpacktrack2.DatabaseHelper.onUpgrade(DatabaseHelper.java:209)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:256)
E/BPT2.Service(14722): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
E/BPT2.Service(14722): at eu.faircode.backpacktrack2.DatabaseHelper.insertActivityType(DatabaseHelper.java:373)
E/BPT2.Service(14722): at eu.faircode.backpacktrack2.LocationService.handleActivity(LocationService.java:266)
E/BPT2.Service(14722): at eu.faircode.backpacktrack2.LocationService.onHandleIntent(LocationService.java:151)
E/BPT2.Service(14722): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/BPT2.Service(14722): at android.os.Handler.dispatchMessage(Handler.java:102)
E/BPT2.Service(14722): at android.os.Looper.loop(Looper.java:135)
E/BPT2.Service(14722): at android.os.HandlerThread.run(HandlerThread.java:61)

Edit: This might also be useful:

W/BPT2.Database(14722): Upgrading from version 9 to 11
[Android Apps and Games] M66B:
I will fix this in the next release.

Workaround: set the database version to 10 using SQLite Debugger.
[Android Apps and Games] M66B:
Then you will have to wait for the next release (soon) or clear the application data.
[Android Apps and Games] M66B:
[MENTION=5367731]an0n981[/MENTION]: version 1.5-7 should fix your database upgrade problem:

https://github.com/M66B/BackPackTrackII/releases/tag/1.5

Please let me know if it works now.

Edit: CWOP and SYNOP stations are by default disabled now, since airports seem to report more accurate weather data.
[Android Apps and Games] an0n981:
Still no such table error
[Android Apps and Games] M66B:
Did you set the database (user) version to 9 again?
[Android Apps and Games] an0n981:
Now it works :)
[Android Apps and Games] mva1985:
I like the "show weather data" option
[Android Apps and Games] M66B:
No need to check the logcat anymore :)

I guess you will like setting your own weather station by ID as well.

This will allow a consistent weather graph, even when you are travelling around.
[Android Apps and Games] mva1985:
yeah I saw that and already set it.

I can only get temp root on my phone so examining the logcat can be quite the process especially when I've lost root.
[Android Apps and Games] an0n981:
I am getting weather data from a SWOP station although I have the option set to airport only
[Android Apps and Games] M66B:
Are you sure?

It could be the CWOP weather report is older than the airport weather report, which could mean it will not appear at the top of the list.

Also, specifying a station ID will ignore the station type settings.

Edit: the code looks okay to me:

https://github.com/M66B/BackPackTra...code/backpacktrack2/LocationService.java#L840

Edit #2: there is indeed a bug in the condition ...

Edit #3: new release:

https://github.com/M66B/BackPackTrackII/releases/tag/1.5
[Android Apps and Games] an0n981:
Now I'm getting the porper info
[Android Apps and Games] M66B:
I have just released

beta

version 1.6.

Changelog/download:

https://github.com/M66B/BackPackTrackII/releases/tag/1.6

This version will be available in the Play store after Google's approval.
[Android Apps and Games] an0n981:
Feature Request: Show distance in Raw Weather Data info
[Android Apps and Games] M66B:
This and more is in

test

version 1.6-2:

https://github.com/M66B/BackPackTrackII/releases/tag/1.6

The weather data reports are now being sorted both on distance and age. There is a new setting, sort factor, to influence sorting. The default sort factor is 0.2, which means the age is weighted by a factor of 0.2. The distance is always weighted by a factor of 1. Setting the weight factor to zero will result in the previous behavior to sort on distance only. A factor of 0.2 means a weather report which is a little further away, but which is much younger, will be picked faster. The sort is applied to the raw weather data display, so you can see the effect of changing the sort factor easily.

The distance and age are normalized to the minimum distance and minimum age first. The reference pressure maximum distance and age are being used to scale the normalized distance and age.
[Android Apps and Games] theCroh:
The speed of the development and issue solving here must be some kind of a world record :D

Lähetetty OnePlus Onesta Tapatalkilla
[Android Apps and Games] M66B:
To keep up with the speed of development ;) I have just released

beta

version 1.7.

Changelog/download:

https://github.com/M66B/BackPackTrackII/releases/tag/1.7

This version will be available in the Play store after Google's approval.
[Android Apps and Games] M66B:
New goodies:

https://github.com/M66B/BackPackTrackII/releases/tag/1.7
[Android Apps and Games] mva1985:
That weather history panel just keeps getting better and better.

I was wondering if you needed more space there if converting the time to 24h format would help.
[Android Apps and Games] M66B:
A fixed 24 hour time format would save some space, but in my experience there is always somebody complaining about units.

Everything fits now, but I am not sure if it will fit on devices with a small screen (it should but you'll never know).

Just out of curiosity: which units are you used to use?

The weather history graph/table is finished now, but please let me know if you have suggestions for improvements and/or new features.
[Android Apps and Games] mva1985:
When I can I use inches, feet and miles or miles per hour. When I can't I use KPH instead of the meters per sec.

As for hPa I was reading that it is essentially the same as mmHg which I think in the USA is generally the more recognized unit along with inches of Hg.

Sorry for running on. In summary the only unit that is not supported right now which would be useful to Americans is MPH. All the other units I think we can manage.

The table/graph is great.
[Android Apps and Games] M66B:
1.33322368×[mmHg]=[hPa]

hPa = millibar

I will later add imperial units for height, distance and speed.

For now I want to stabilize things, since I will be traveling in about a week.

There have been enough changes the past week or so, in fact two big entirely new features: altitude from pressure and weather history.

Edit: the next version will have the option to show mmHg instead of hPa:

https://github.com/M66B/BackPackTrackII/commit/f9d295238720eb21e8c2bfc1a8ecc9a0e965e7b6
[Android Apps and Games] M66B:
New test release:

https://github.com/M66B/BackPackTrackII/releases/tag/1.7
[Android Apps and Games] M66B:
I am thinking about combining weather data of multiple weather stations using a by distance weighted average (so closer weather stations will influence the average more than distant stations). Would this be a good idea?
[Android Apps and Games] an0n981:
Meaning what exactly? One line would contain info from multiple locations or the decision which station to chose would be influenced?
[Android Apps and Games] M66B:
One line would contain info from multiple locations.
[Android Apps and Games] an0n981:
That could lead to inconsistent data.

I love the new weather graphs. Only thing is that if precipitation is 0 no graph is shown (at least for me). IMO it should a graph with all 0s
[Android Apps and Games] M66B:
There is a difference between no data reported (null in the database) and zero reported (0 in the database). Check if your weather station(s) report precipitation data or not.
[Android Apps and Games] an0n981:
Is it possible to force the graph to always show a vertical line at midnight. It is hard to determine the time in this picture
[Android Apps and Games] M66B:
The graphview library does determine where the labels go and as far as I know only the number of labels can be configured (which is set to two due to space constraints and the size of the date/time labels).

http://www.android-graphview.org
[Android Apps and Games] an0n981:
That is exactly what is happening
[Android Apps and Games] M66B:
Showing zero for no data would be incorrect, since it could still be raining.
[Android Apps and Games] an0n981:
I just noticed there is no option to CSOP stations on/off
[Android Apps and Games] M66B:
It should be CWOP (there is a spelling mistake in the OpenWeatherMap documentation):

https://en.wikipedia.org/wiki/Citizen_Weather_Observer_Program

https://github.com/M66B/BackPackTrackII/blob/master/app/src/main/res/xml/preferences.xml#L388
[Android Apps and Games] an0n981:
Here is the issue I noticed, based on my choices I should be receiving data from station '2' (since I chose to only receive airport data), however I am receiving data from station '1' because it is closer
[Android Apps and Games] M66B:
I have a not so reliable CWOP station nearby, but in my case the airport further away is correctly be selected. Please tap on the weather data line to check if the station really was selected.
[Android Apps and Games] an0n981:
100% certain
[Android Apps and Games] M66B:
Please send me another log file if you can reproduce this issue.
[Android Apps and Games] an0n981:
I attempted to reproduce, but each time the airport was properly referenced :(
[Android Apps and Games] M66B:
So, it was either a for now unexplained glitch or the problem has been fixed somehow already..

Just a side note: the weather is not being updated when the device is in deep sleep (KitKat and later only). This will be fixed in the next release.

Next release will display wind speed / direction and rain 1 hour / today in one graph with a secondary scale.
[Android Apps and Games] M66B:
I have just made available

beta

version 1.8.

Changelog/download:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8

This version will be available in the Play store after Google's approval.
[Android Apps and Games] M66B:
Since there is a relation between temperature and humidity, it seemed a good idea to me to merge these graphs as well:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8
[Android Apps and Games] M66B:
New goodies: https://github.com/M66B/BackPackTrackII/releases/tag/1.8
[Android Apps and Games] mva1985:
The new temp/humidity graph looks good
[Android Apps and Games] mva1985:
What might I be doing wrong? On the 22nd I walked around our local zoo for about 3 hours and 11000+ steps counted by the app. But activity is not showing anything.
[Android Apps and Games] an0n981:
Way OT but I really miss that zoo, went there so often as a kid. Go Buckeyes
[Android Apps and Games] mva1985:
Hmm... I guess it could be OT. Just trying to work out the kinks.
[Android Apps and Games] an0n981:
In order to troubleshoot I assume [MENTION=2799345]M66B[/MENTION] would need a log.
[Android Apps and Games] mva1985:
Good point
[Android Apps and Games] M66B:
Either activity recognition is turned off or is not working.

Please check if activity recognition is enabled in the settings and if Play services are available in the version info.
[Android Apps and Games] mva1985:
Activity recognition is Enabled

Play services - Yes

If needed I could temp root to provide a logcat.
[Android Apps and Games] M66B:
Then activity recognition isn't working for some reason.

A logcat might reveal what is going on.

Disable and enable activity recognition, take a walk of about two minutes and after that capture a logcat from your PC with this command:

adb logcat | grep BPT2

Edit: you can also use an application like CatLog and filter on the label "BPT2".
[Android Apps and Games] M66B:
I have added a small new feature and changed the altitude graph a little:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8

Since I will be traveling in less than a week, I will basically fix bugs only for the time being.
[Android Apps and Games] M66B:
New test release:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8

[MENTION=1456824]mva1985[/MENTION] I have added an option to send a logcat (which doesn't require root, since only the logging of the application itself is being collected)
[Android Apps and Games] an0n981:
Is it possible to see which station was used for precipitation info?
[Android Apps and Games] M66B:
If you mean if this is being recorded: no, but I will change that. When the option is enabled, it will be the first station with precipitation data in the raw weather data list.
[Android Apps and Games] M66B:
New test release:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8
[Android Apps and Games] M66B:
Some more weather data:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8

Note that this version changes the database structure, so a backup might be a good idea.
[Android Apps and Games] an0n981:
I assume the red line in the wind graph is the gust indicator?
[Android Apps and Games] M66B:
Yes, and it will be magenta in the next release.

BTW, good day to make/test this ;)
[Android Apps and Games] an0n981:
It sure is, I even had a glass door break in my house do to it slamming closed from wind gusts :(

You might want to google 'Deutsche Telekom magenta' I know they own certain right to that color, I'm just not sure how far those rights reach.
[Android Apps and Games] M66B:
That's really unfortunate :(

Maybe BackPackPack II should have warned you ;)

Note that I don't want to make forecasting, the idea is to to use only current data.

I don't think using a color name will be a problem.

Google has about 100M hits on magenta ...
[Android Apps and Games] an0n981:
Is it just me or are the doors not connecting for you guys either?
[Android Apps and Games] M66B:
I have already fixed that, but I didn't release a version with this fix yet:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8
[Android Apps and Games] M66B:
I have just made available

beta

version 1.8-9

Changelog/download:

https://github.com/M66B/BackPackTrackII/releases/tag/1.8

This version will not be available in the Play store.

Note that using Forecast.io as weather provider (advised) requires an API key.

See also here: https://github.com/M66B/BackPackTrackII#FAQ12
[Android Apps and Games] mva1985:
I was just wondering as far as cleaning up a table and graph if the time was necessary on the Walk History panel?

Just a thought.
[Android Apps and Games] M66B:
A daily step count database record will not be a problem. A record for weather data each 15-30 minutes might be in some time, but if it gets a problem, I will make a cleanup/aggregation function for it.
[Android Apps and Games] mva1985:
The only reason I mentioned it was because all the times are exactly the same on the Walk History panel.

Did you get a chance to look at that logcat I sent? Hopefully the problem is easy to spot.
[Android Apps and Games] M66B:
Please post a screenshot of your walk history.

I have just responded to the sent logcat.
[Android Apps and Games] mva1985:
I got your email right after I posted that question.
[Android Apps and Games] M66B:
Nothing wrong here. The time is midnight for the time zone the counting of steps started. If you move from time zone on the same day, there will be two entries. I will soon test this ...
[Android Apps and Games] M66B:
I have just released

beta

version 1.9

Changelog/download:

https://github.com/M66B/BackPackTrackII/releases/tag/1.9

This version will be available in the Play store after Google's approval.
[Android Apps and Games] mva1985:
I reset all my data (that was painful) and force closed the app and restarted it. Hopefully that solves the problem.
[Android Apps and Games] M66B:
I have just released

beta

version 1.10

Changelog/download:

https://github.com/M66B/BackPackTrackII/releases/tag/1.10

This version will be available in the Play store after Google's approval.
[Android Apps and Games] M66B:
Changing time zone for the walk history works, but the graph is ugly (maybe a bug in GraphView). I will look into this when I have returned home.
[Android Apps and Games] M66B:
I have just released

beta

version 1.11.

Changelog/download:

https://github.com/M66B/BackPackTrackII/releases/tag/1.11