| 1 |
.\" Copyright (C) 2017 Alessandro Menti |
| 2 |
.\" |
| 3 |
.\" This program is free software; you can redistribute it and/or |
| 4 |
.\" modify it under the terms of the GNU General Public License |
| 5 |
.\" as published by the Free Software Foundation; either version 2 |
| 6 |
.\" of the License, or (at your option) any later version. |
| 7 |
.\" |
| 8 |
.\" This program is distributed in the hope that it will be useful, |
| 9 |
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
.\" GNU General Public License for more details. |
| 12 |
.\" |
| 13 |
.\" You should have received a copy of the GNU General Public License |
| 14 |
.\" along with this program; if not, write to the Free Software |
| 15 |
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 16 |
.\" Or try here: http://www.fsf.org/copyleft/gpl.html |
| 17 |
.\" |
| 18 |
.TH FGELEV 1 2020-11-15 FlightGear "FlightGear man pages" |
| 19 |
.SH NAME |
| 20 |
fgelev \- Compute FlightGear scenery elevation for a given list of points |
| 21 |
.SH SYNOPSIS |
| 22 |
\fBfgelev\fR [\fB\-\-expire\fR \fInum\fR] [\fB\-\-print\-solidness\fR] |
| 23 |
[\fB\-\-fg\-root\fR \fIrootdir\fR] [\fB\-\-fg\-scenery\fR \fIscenerydir\fR] |
| 24 |
[--tile-file osgbfilename] [--use-vpb] |
| 25 |
.SH DESCRIPTION |
| 26 |
.B fgelev |
| 27 |
is a standalone utility that, given a list of points on standard input, prints |
| 28 |
the corresponding elevation for each of them on standard output. It can also |
| 29 |
(optionally) print whether the material covering that point is solid or not. |
| 30 |
|
| 31 |
The list of points must be in the following form: |
| 32 |
|
| 33 |
\fIid lon lat\fR |
| 34 |
|
| 35 |
where \fIid\fR is an arbitrary identifier for the point, \fIlon\fR is the |
| 36 |
longitude of the point and \fIlat\fR is the latitude of the point. Positive |
| 37 |
longitudes (latitudes) correspond to points located in the Eastern (Northern) |
| 38 |
hemisphere; negative ones correspond to points located in the Western |
| 39 |
(Southern) hemisphere. |
| 40 |
|
| 41 |
The list of elevations returned by |
| 42 |
.B fgelev |
| 43 |
is in the following form: |
| 44 |
|
| 45 |
\fIid: elev solid\fR |
| 46 |
|
| 47 |
where \fIid\fR is the identifier of the point passed as input, \fIelev\fR is |
| 48 |
the elevation of the point in meters (or \fB-1000\fR if the elevation of the |
| 49 |
given point was not found) and \fIsolid\fR is: |
| 50 |
.IP \(bu 3 |
| 51 |
the string |
| 52 |
.B solid |
| 53 |
if the parameter |
| 54 |
.B \-\-print\-solidness |
| 55 |
was passed to |
| 56 |
.B fgelev |
| 57 |
and the material covering the point is solid; |
| 58 |
.IP \(bu 3 |
| 59 |
the string |
| 60 |
.B \- |
| 61 |
if the parameter |
| 62 |
.B \-\-print\-solidness |
| 63 |
was passed to |
| 64 |
.B fgelev |
| 65 |
and the material covering the point is not solid; |
| 66 |
.IP \(bu 3 |
| 67 |
absent if the parameter |
| 68 |
.B \-\-print\-solidness |
| 69 |
was not passed to \fBfgelev\fR. |
| 70 |
.SH OPTIONS |
| 71 |
.TP |
| 72 |
\fB\-\-expire\fR \fInum\fR |
| 73 |
To speed up elevation data retrieval, |
| 74 |
.B fgelev |
| 75 |
uses an internal cache. This option lets the user specify the number of |
| 76 |
requests after which, if a point was not queried in them, it should be marked |
| 77 |
as expired. By default, |
| 78 |
.B fgelev |
| 79 |
expires points not queried in the last \fB10\fR requests. |
| 80 |
.TP |
| 81 |
\fB\-\-print\-solidness\fR |
| 82 |
Require |
| 83 |
.B fgelev |
| 84 |
to print the solidness of the material covering the queried point. See the |
| 85 |
.B DESCRIPTION |
| 86 |
section for more details. |
| 87 |
.TP |
| 88 |
\fB\-\-fg\-root\fR \fIrootdir\fR |
| 89 |
Set the FlightGear data root directory (\fB$FG_ROOT\fR) to \fIrootdir\fR. If |
| 90 |
this option is not set, |
| 91 |
.B fgelev |
| 92 |
uses the path specified in the |
| 93 |
.B FG_ROOT |
| 94 |
environment variable or, absent that, the FlightGear data directory chosen at |
| 95 |
the time the program was compiled. |
| 96 |
.TP |
| 97 |
\fB\-\-fg\-scenery\fR \fIscenerydir\fR |
| 98 |
Set the FlightGear scenery directory (\fB$FG_SCENERY\fR) to \fIscenerydir\fR. |
| 99 |
If this option is not set, |
| 100 |
.B fgelev |
| 101 |
uses the path specified in the |
| 102 |
.B FG_SCENERY |
| 103 |
environment variable or, absent that, the |
| 104 |
.B Scenery |
| 105 |
subdirectory inside \fB$FG_ROOT\fR. |
| 106 |
.TP |
| 107 |
\fB\-\-tile\-file\fR \fIosgbfilename\fR |
| 108 |
Use a specific tile file when searching for elevation details, instead |
| 109 |
of scanning through the whole world. |
| 110 |
.TP |
| 111 |
\fB\-\-use\-vpb\fR |
| 112 |
If specified, enables WS3.0 scenery behaviour, searching under the vpb/ |
| 113 |
subdirectory. |
| 114 |
.SH "EXIT STATUS" |
| 115 |
.B fgelev |
| 116 |
exits with |
| 117 |
.B EXIT_SUCCESS |
| 118 |
on success, with |
| 119 |
.B EXIT_FAILURE |
| 120 |
if it is unable to read data from standard input or to load the scenery. |
| 121 |
.SH ENVIRONMENT |
| 122 |
.IP "\fBFG_ROOT\fR" 4 |
| 123 |
If |
| 124 |
.B FG_ROOT |
| 125 |
is set and |
| 126 |
.B \-\-fg\-root |
| 127 |
is not set, it specifies the root data directory to use. |
| 128 |
.IP "\fBFG_SCENERY\fR" 4 |
| 129 |
If |
| 130 |
.B FG_SCENERY |
| 131 |
is set and |
| 132 |
.B \-\-fg\-scenery |
| 133 |
is not set, it specifies the scenery directory to use. |
| 134 |
.SH "SEE ALSO" |
| 135 |
.BR fgfs (1) |