Altitute filter spezification

Falco shared this question 1 month ago
Answered

Hi,


please could you tell us the specifications of the altitute filter? http://docs.locusmap.eu/doku.php?id=manual:user_guide:tools:altitude#altitude_filter

  • Filter logic and threadholds for each selectable option
  • Does it care about the altitute source? GPS, GPS accuracy data, pressure, srtm?
  • Does it got appled to statistic numbers only or does it soften the recording data as well?
  • Could it be applied on a recorded track after the record is done? Because it will take a while to find the best setting if you have to collect hours of data every time.

Would be nice to put the answers direct into the documentation because there is no usual default way to handle this, everybody has his own implementation. The results does even differ across garmin outdoor devices of the same outdoor product range.


Kind Regards

Falco

Comments (16)

photo
1

Good day Falco,

it is a really complex question and best how to answer, should be to publish few hundreds (maybe thousands) of source code lines so everybody will analyze them by yourself.

Most simple and clear: all parameters set in Altitude manager (offset, filter, etc) are applied immediately when Locus Map receive GPS location. Do this later is not possible. So all services in app already use a location object, that has modified elevation value. For example, recorded track data are have modified elevation values.

About logic, thresholds and other parameters: anything special you are interested in?

Menion

photo
1

Thank you, I did expect this early applyment.

2 of 4 parts are clear now. 2 are missing:

  • Does the filter profile care about the altitute source, or do you need to select low for good sources and high for bad sources? For example a filter for GPS could be smart based on accuracy values.
  • Filter logic and threadholds: I would like to know how many old points are used as reference for the adjust of the next point because for pressure you need less points to lookup because you don't have errors you have just noise and for gps you need to lookup many point to detect messurement errors. Well, actually I don't want to know this. I want to know which profile is the best for maybe 0.3m pressure noise and which one for 0.5m pressure noise. And even more importand I would like to know the resolution across multible points. If the logic is not optimized for pressure values, I would maybe disable it an play arround with external altitute leveling. But at the end it would be great to know which conzept is used for altitute leveling. For example your approuch is very limited because you can't lookup the value of the next points because you have only access to the previous points. I would guess that somebody did thought about how pressure values can be leveled to remove the noise without destroying the resolution. Because there are so many different ways to handle it, it would be nice to know if the conzept does follow a specific research study or if anything else was the base for it.

photo
2

Good day Falco,

- the filter does now use accuracy values to optimize filter strength. All received altitude values have the same weight.

- a pressure sensor system in the app computes an average value from last 10 measurements (max. age 15 seconds). This value is then used for computing of current device altitude value. App use elevation data from HGT files and every hour makes a correction based on these offline elevation files (if available).

Precision? Well, to be true, if you are looking for most accurate elevation values, do not use Locus Map for this purpose. I believe in Google Play have to be apps that use a lot more precise algorithms to compute altitude values thanks to the pressure sensor.

Jiří M. aka Menion

photo
1

Thank you,


Is the metric 10 measurements (max. age 15 seconds) equal for all selectable filter options? Because track recording screen looks alot more responsive then 10s average. I can easily find a 0.6m lift of my phone in the recording monitor without waiting to long in the end postion. Or maybe it just feels a lot more snappy then it acually is because of the smooth transition.


I tought about a pressure data filter for MTB:

I need maybe 5-10s, horizontal resolution and 2 meter vertical resolution, Horizontal resolution would exacly match to a 10s average. Maybe 5s average to get near 3s resolution for smallest hills with only 5 meter altitude difference. But need 2 meter filtering to remove bumps, sensor noise and vertical rider movement.

Vertical resolution could be a little bit difficould because it's needed to prevent edgecases where the value does swap arround 2 numbers. It should be already covered by the average of the last 10 measurements but I don't have anoght data to tell if bumps have an impact on each individual average calulculation results.


Other apps? I am not sure. My first thought was don't use locus for altitute monitoring because it will need GPS for track recording.


I did only found 6 apps which can work without gps and pressure sensore and non of them could be record more often then 30s

Sure there are many for realtime display of current, value but non of them do record as fast as the display changes.

photo
1

There is usually around 3 - 4 pressure measurements per second so I'm sure, that changes in altitude based on pressure will be quick enough.


Anyway filtering based on activity, to correctly filter some disturbances caused for example by bike-ride is an interesting idea. Anyway, such algorithm needs more clever mind than mine :).

If you wanna play with raw pressure data, you may try my small utility feature:

  • open main menu and long-click on "settings" icon at the bottom
  • after you see "experimental mode enabled", open settings > miscellaneous > experimental (at the bottom) > record sensor data

Since that moment, Locus will log GPS and pressure data into Locus/data/sensors directory. Lines with "loc" at the start is a GPS location and line with "si_pr" is a pressure sensor data. Not sure if you will find any use for it, but maybe you want these information for some own post-processing? So you may play with them. Otherwise forget I wrote it.

photo
photo
1

No way, that is great! That does solve so many things.


Now I can play arround with realtime recording filter without loosing reference data. I could even apply local weather pressuremaps in post. I did nearly start to develop my own sensor recording app.


Does it store sensor data even if GPS fix is missing?


Why did you mention 3-4 times per second? Did the filter analyse 3-4 points per second (which means only last 3 seconds) or does it analyse only points which got eligible for gpx track storage based on record distance/time setting (last 10s to 15s based on how many GPS points got into the record)?

photo
1

Hello Falco,

I used it quite a long time ago for own test of filters, so hopefully it will still work.

It records raw received data immediately, app gets it. So data in text files are unfiltered, unaffected by any Locus filter etc. And yes, pressure values should be recorded even if GPS is not active. If you will have a while, test it and let me know. In case of any problem, rather write me here and I'll look on it, just don't waste time on it :).

And "3-4 times per second" is usual frequency, how often Locus Map receive pressure data on devices. You will probably see this in the text file. So I just wanted to mention that changes in altitude even with this averaging, should be quite fast.


Jiří M. aka Menion

photo
1

That means altitute filter got applied before track recording filter and if you have pressure sensor it takes even more values then available GPS fixes. That does explain why we got such a high time resolution.


What does the selectable filter options change?

- only vertical resolution

- only time resolution

- vertical resolution and time resolution

photo
1

Yes sure, application filter all received data, so usually every second new location and 4x per second new pressure data. As I wrote before, these filtered values are then forwarded to various services like track recording, live tracking etc. So if track recording record data once per 10 seconds, it does not mean, that all these filters are applied only once per 10 sec.

And by "filter options" you mean parameters defined in track recording profile?

photo
1

I mean altitude filter options form low to high.

photo
1

Ah these filters. This option is applied as a final step in "Altitude optimization". It simply uses easy filter defined as

current alt. value * filter + prev alt. value * (1 - filter)
So it really only little bit optimize altitude values, nothing more.

photo
photo
1

Hi Menion,


I just read one of your response here:


"App use elevation data from HGT files and every hour makes a correction based on these offline elevation files (if available).


Precision? Well, to be true, if you are looking for most accurate elevation values, do not use Locus Map for this purpose"


Is the automatic correction already applied in the offline map when the elevation data has been downloaded? The automatic correction is based on Geoid model which is safe to say more accurate compared to the ellipsoid model.

photo
1

Hi,

what exactly you mean by this "Is the automatic correction already applied in the offline map when the elevation data has been downloaded"?

Altitude manager > Offset > Automatic correction is applied on received GPS data. GPS altitude is based on Ellipsoid model, so results are not values you usually see in paper maps or in the woods on labels. This automatic correction should be good enough for a common hike & bike usage.

photo
1

Hi Menion,

Thank you for your immediate response.

What I meant is if the elevation shown in the offline topographic map already corrected based on Geoid model? Please see attached screenshots.

When is the automatic correction of elevation/altitude being applied?


Also, I've already uploaded the track in GPSIES and performed an altitude recalculation which results to the same altitude. I presume it is already Geoid model altitude.

photo
1

Yes they are. Values used for map shading or Dynamic elevation (as on your screenshot) are already in correct "Geoid height". So really only received GPS location are corrected by this offset. Expect that dynamic elevation on peaks may not be exactly correct (usually little lower then real values).

photo
1

Thanks Menion for the confirmation, Geoid values is better since ellipsoid seems overstated.

photo