BasicAirData / GPSLogger

A GPS logger for Android mobile devices

Home Page:http://www.basicairdata.eu/projects/android/android-gps-logger/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to use pressure sensor to calculate altitude

ferraript opened this issue · comments

First of all, this application is best for the tracking purposes I found so far, so thank you very much for good job done

For better accuracy of altitude readings, however, it would be awesome if you could add the ability to use pressure sensor as the source for altitude data. Many of users have smartphones with pressure sensor and I believe they would use this option too.

If I am right, all that needs to be done, is

  • add the switch to choose GPS altitude or Barometric altitude
  • add field where user can input current real altitude

Then, with the formula in https://en.wikipedia.org/wiki/Pressure_altitude it's easy to calculate pressure at sea level and then just use pressure sensor data for calculating altitude

If you need help with math equations, I can help you with that.

If you decide to add this option, whenever in the future, thanks a lot!

commented

I think that the implementation of the barometric altitude could be a great feature to add, so thank you for your suggestion and your availability.

I link an article from the BasicAirData website that deepen part of the topic:
https://www.basicairdata.eu/projects/barometric-altimeter/

We'll use this issue to write ideas, mock-ups, suggestions, to track the possible implementation and eventually to collect feedbacks.

commented

I'm considering adding the Baro-GPS fusion functionality to the track contextual icon bar, the one at the top of the figure. Of course, I will add a specific icon for post-processing tasks, just left of the view/eye Icon. I think it will be good to use an icon with the two letters "PP".
Any idea about that?

Screenshot_20220411-212742

commented

I think we should implement the feature without adding additional buttons to the contextual action bar.
I describe what was my idea:

We could modify the setting related to altitude correction, removing the switch of the automatic EGM96 altitude correction in favor of a more flexible ListPreference called "Altitude source". The user could select between the following options:

  • Ellipsoidal altitude (raw GPS)
  • Orthometric real altitude (GPS + EGM96 correction)
  • Raw Barometric altitude
  • Fused altitude (GPS + Barometric)

The third and the fourth options should be visible only if the device has the onboard barometric sensor.
The option should influence both real time visualization and exportation, as the app currently works.

Furthermore we should find a good way to modify the manual correction in order to allow the user to set a "current altitude" when he is using one of the previous options that involve the barometer. The same feature could be available with a (long?)click on Altitude tile on the GPS FIX tab.

In case we would to implement in the future an automatic optimization of the barometric correction in exportation phase (the only Post Processing part of this feature), we could add a simple switch in Settings (in Altitude Correction section) to enable/disable it.

To sum up the list of tasks I was thinking:

  • Save the raw barometric altitude into the Database, and export it into TXT files
  • Implement the FusedAltitude.class: we could call "FusedAltitude.add(currentLocation) when a new FIX is available, and we could call something like "FusedAltitude.getCurrentFusedAltitude() to have the current fused altitude basing on its calculations.
  • Modify the settings to include the new altitude sources
  • Add the click listener to the Altitude tile in order to let the user set the current altitude
  • Add the fused altitude to the data stored into the database (because it depends on the current altitude entered by the user, and on the fixes that could be obtained but not recorded into the track)
  • Add something graphical to the track cards to identify if the barometric altitude is available for each track

You can get some kind of inspiration in Locus Map application if needed.
I've been using it for many years, unfortunately I've got some issues since I bought the new phone, that's why I switched to GPS Logger.

commented

@ferraript Can you point out any particular good point/behaviour of Locus Maps?

commented

@ferraript the Altitude Manager of Locus Map has really good features, we can get surely some inspiration. Thanks for the tip.
Maybe a bit less good on ease of use: in my opinion we should try to find a better implementation using 1 - 2 settings instead of a 3-tabbed activity.

@ferraript Can you point out any particular good point/behaviour of Locus Maps?

no particular reasons
eight years ago, when I bought my first phone with barometer, Locus was the only tracker that was able to use those values and I've been using it since then

Maybe a bit less good on ease of use: in my opinion we should try to find a better implementation using 1 - 2 settings instead of a 3-tabbed activity

personally I don't care, you are developers - you are free to do anything you like, I'm just simple user
if I could choose, I'd go with the most simple solution, I don't want you to spend a lot of time on something, that who knows how many people will use
and then you can get response from users and make adjustments if needed

I think it would already be very useful to store the plain pressure data (mbar, hPa,...) in the exported file, e.g.

995

With this, the altitude math/physics could be done on the PC (Personally I am a fan of raw measurement data anyway).