Height Calculations

Hilmar's picture

Hello,

I would like to know a bit more how the hight calculations are done using the 1° or 10° reference tables.
How do the formulars/algorithms look like.

Is there information in the internet? Google did not help much.

Thanks
Hilmar

mdeweerd's picture

Hi The 10° reference table

Hi


The 10° reference table came from the gpsd project as stated in the source file src/gps/convert/Conf.java .  There you'll also find a function performing the bilinear interpollation.  A bilinear interpollation is similar to a linear interpolation, but in two dimensions (not considering the resulting value itself which in a way is a third dimension).  After determining the four corner values (indexes and values), one interpollates these values for the two pairs of values in one dimension obtaining two interpolated values.  Then one does the interpollation on these values in the other dimension to find the resulting value.


Interpollation for a value x falling in the range [a,b] where f(a)=s and f(b)=t with f being the target function, the approximation of f(x) is  f(a)+(f(b)-f(a))*(x-a)/(b-a).  In the bilinear interpollation one has to find the approximation for f(x,y).  So one finds the known corner coordinates x0,x1,y0 and y1.  f(x0,y0), ... are known and one first finds the approximations for f(x,y0) and f(x,y1) from [f(x0,y0),f(x1,y0)] and [f(x0,y1),f(x1,y1)] respectively.   Then one interpollates f(x,y) from [f(x,y0),f(x,y1)].


The 10° table has a 'small' memory footprint suitable for portable devices and incorporation in the program itself.  The 1° table was constructed using data obtained through a form on the NASA site (about 64k individual values).

Hilmar's picture

Hi,a bit more tricky than I

Hi,

a bit more tricky than I thought, will try to understand it in more detail.

Many thanks!

I have a feature request: I

I have a feature request: I would really like to see a "hight-map", so something like a diagram where I can see how many meters I walked up the hill and down again and so on...
Is there something like this planned?

Also a connection between the map and the tracks-table would be nice. Example: Click on a GPS point on the map and see the values that belong to it, so speed, hight, etc.

mdeweerd's picture

1) I kind of started on that

1) I kind of started on that but did not finish.

2) This is (partly) the case for waypoints - for other positions this is a bit more complex (but not impossible) to do.

Somebody volunteered to work on this kind of functionality, but currently that did not go very far.  Anybody is welcome to help.