• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Request for Help

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,981
Country
unitedkingdom
My algorithm to determine a new set of co-ordinates (lat/lon) based on a reference point (lat/lon) and offsets for lat and lon is giveing a small but significant error in the longitude result. This is being used in the decode of taxisigns.

I would appreciate it if anyone has a formula or algorithm for doing this. I have tried several different methods with varying results. I am sure that there is a 'recommended' way to do this!

thanks in advance
 
Hi Jon,

This should be spot on:

lat = lat_ref + Y / 111130.55555555555555555555
lon = lon_ref + X / (111319.44444444444444 * cos(lat))

The lat and lon are in degrees here, only for the cos function it needs to be in radians of course.
 
Hi,

do you use a 2D or 3D formula ?

I once had a problem calculating the distance between two points on a great circle (on earth surface, 3D formula). For very short distances, the results were pretty bogus. After some searching i found out, that the usual math text book formula found everywhere suffers from the limited precision of floating point variables. There is an alternate formula, which is good for small distances, but sucks for huge distances. I created a mixed formula, which roughly checks for big or small distances, and then picks either the standard or the alternate formula to have the error on the other side ..

Since calculating x2/y2 from x1/x2 + dx/dy sound like the same problem from a different viewpoint, that alternate formula might help.

Look here: http://williams.best.vwh.net/avform.htm
and click on the 3rd link (Distance between points) ..

If i remember correctly, that alternate formula is called the haversine formula.

Look here: http://en.wikipedia.org/wiki/Great-circle_distance
and here: http://en.wikipedia.org/wiki/Haversine_formula

Hope it helps ..

.. another link: http://mathworld.wolfram.com/
 
Guys

Thanks you very much for your help

Arno - you are correct that works spot on :)
 
Back
Top