Howto:Calculate elevations: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (Robot: Cosmetic changes)
(improve wording and supply a direct download link)
Line 1: Line 1:
There is a specific script in [[FlightGear]] that enables the calculation of the elevation at a specific longitude and latitude. The script is called find_elevations.pl and under GNU/Linux, for instance, this script is located at: <tt>/usr/local/src/flightgear/scripts/perl/examples/find_elevations.pl</tt>.
There is a specific script in FlightGear that enables the calculation of the elevation at a specific longitude and latitude. The script is called find_elevations.pl and is located in the FG source directory under: <tt>scripts/perl/examples/find_elevations.pl</tt>.
 
It can as well be downloaded directly from the GIT repo, if needed:<br />
http://mapserver.flightgear.org/git/gitweb.pl?p=flightgear;a=blob_plain;f=scripts/perl/examples/find_elevations.pl;hb=HEAD


To use it:
To use it:

Revision as of 16:35, 25 March 2011

There is a specific script in FlightGear that enables the calculation of the elevation at a specific longitude and latitude. The script is called find_elevations.pl and is located in the FG source directory under: scripts/perl/examples/find_elevations.pl.

It can as well be downloaded directly from the GIT repo, if needed:
http://mapserver.flightgear.org/git/gitweb.pl?p=flightgear;a=blob_plain;f=scripts/perl/examples/find_elevations.pl;hb=HEAD

To use it:

  • Launch FG like this : "fgfs --fdm=null --telnet=5401"
  • Then, in a separate windows, lauch the script : "./find_elevations.pl".
  • Enter the longitude and latitude of the object for which you want to get the elevation.

For instance :

olivier@olivier-portable:/var/www$ ./find_elevations.pl
-3.926816 48.632452 62.37586682

For a longitude of -3.926816 and a latitude of 48.632452, the elevation is 62.37586682.

Enjoy !

Related content