Here's a port fo calc-tile.pl to Nasal. To make use of it do the following:

(0) download this file: http://members.aon.at/mfranz/flightgear/calctile.nas [3 
kb]
(1) put it into $FG_ROOT/Nasal/
(2) add a keyboard definition like this to your $FG_HOME/keyboard.xml (or
    wherever you put local key defs):

    <key n="96">
        <name>Backtick</name>
        <desc>Output location.</desc>
        <binding>
            <command>nasal</command>
            <script>calctile.location()</script>
        </binding>
    </key>

(3) move to the desired location in fgfs (--aircraft=ufo comes to my mind ...)
    and press the ` key.
(4) marvel at the badly formatted output:

    Longitude:    -119.8459738070971 deg
    Latitude:     37.65290044101365 deg
    Altitude ASL: 912.2579847486952 m  (2992.972390907792 ft)
    Altitude AGL: 0 m  (0 ft)
    Heading:      177.8806990010071 deg
    Ground Elev:  910.7967615670653 m  (2988.178351597983 ft)

    w120n30/w120n37/991208.stg
    OBJECT_ -119.8459738070971 37.65290044101365 910.7967615670653 
182.1193009989929


The OBJECT_ line can be used directly in the given *.stg file. You only need to
add STATIC or SHARED and the path to the object. Some of the digits after the 
comma
may be stripped. Nasal doesn't seem to support that. The "Altitude AGL" is 
always zero
in the UFO.

m.

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to