Re: [Flightgear-devel] Setting position via property tree

2010-01-26 Thread Curtis Olson
Hi Petr,

Here's a little snippet of some perl code I use to do this sort of thing
(it's from the backend of some perl-tk gui code, and unfortunately I can't
share the whole thing since I developed it for a proprietary project):

$HASH{ /sim/presets/airport-id } = $aptid;
$HASH{ /sim/presets/runway } = $rwyno;
$HASH{ /sim/presets/vor-id } = $vor_id;
$HASH{ /sim/presets/vor-freq } = $vor_freq;
$HASH{ /sim/presets/ndb-id } = $ndb_id;
$HASH{ /sim/presets/ndb-freq } = $ndb_freq;
$HASH{ /sim/presets/fix } = $fix;
$HASH{ /sim/presets/longitude-deg } = -.0;
$HASH{ /sim/presets/latitude-deg } = -.0;
$HASH{ /sim/presets/offset-distance-nm } = $dist;
$HASH{ /sim/presets/offset-azimuth } = $bearing;
$HASH{ /sim/presets/heading-deg } = $heading;
$HASH{ /sim/presets/altitude-ft } = $tmpalt;
$HASH{ /sim/presets/glideslope-deg } = $gs;
$HASH{ /sim/presets/airspeed-kt } = $airspeed;

There's a little loop that dumps all these things to FlightGear via the
telnet property interface, and the finishes by calling:

run presets-commit

It is probably helpful to review the presets code that sorts out all the
different preset options depending on the values in this tree.  That will
give you an idea of what values you should leave empty, and what values to
set to -.0 (for example) in order to effect the right startup mode.
 (The logic is a bit complex, so have patience when you work your way
through that code.)

Note, it appears (as best as I can see) that in air startups are broke and
probably haven't worked for a while with JSBSim and YASim.  They do however
continue to work fine with an external proprietary fdm I've been using for
another project.

Regards,

Curt.



On Sat, Jan 23, 2010 at 4:40 PM, ing. Petr Ondra wrote:

 Hi,
 Please how can I set corretly position (on ground/in air) via property
 tree? (lat,lon,alt )

 THX

 mamucz


 --
 Throughout its 18-year history, RSA Conference consistently attracts the
 world's best and brightest in the field, creating opportunities for
 Conference
 attendees to learn about information security's most important issues
 through
 interactions with peers, luminaries and emerging and established companies.
 http://p.sf.net/sfu/rsaconf-dev2dev
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel




-- 
Curtis Olson: http://baron.flightgear.org/~curt/
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Setting position via property tree

2010-01-23 Thread ing. Petr Ondra
Hi,
Please how can I set corretly position (on ground/in air) via property
tree? (lat,lon,alt )

THX

mamucz

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel