Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Property tree

From FlightGear wiki
Revision as of 15:50, 20 April 2006 by Hellosimon (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Property Server

For instance, start FlightGear with the following option:

--httpd=5400

You can pick any port number, but 5400 will probably work just fine.


Now on the same machine, fire up a web browser and open up the following url:

http://localhost:5400/

Now you can browse the entire FG property tree "live" and even change values if you like. You can configure autopilot modes and even set control inputs so you can literally fly the airplane from your web browser, although it's not the most convenient interface for doing that. ;-)

There is a similar interface minus the html wrappings that you can enable with the following option:

--props=5401


Note that you can setup as many of these as you want ... for instance, just to be obscene you could do:

--httpd=5400 --httpd=5401 --httpd=5402 --props=5403 --props=5404 --props=5405


Now you have 6 different network interfaces running that you can access from anywhere. We can't find a wiki named Note.

If you have a 'props' inteface configured you can now "telnet localhost 5401" and interact with the property system (again live) and set and examine values using a 'command line' style interface.

The cool thing is that you can easily write scripts to access this --props=<port#> interface.

Take a look at:

FlightGear/source/scripts/perl/examples/


Note that there is no requirement that you do this with perl. You could just as easily interact with FlightGear this way using perl, C, C++, java, probably even <ack> visual basic or anything else that can do tcpip network communication ... matlab? netcat?

Also note that the downside to this interface is that you can't blast a lot of data across it. It's fine if you want to monitor location and speed every second or 1/4 second and occasionally set some values (such as dump in a new weather configuration, reset the aircraft location, or read a set of values, etc.)

But if you need to track 100 different variables at 60hz, this isn't the interface for you.



Property Tree

A detailed list of all nodes within the property tree and their purpose, as well as possible values

accelerations/

ai/

autopilot/

command/

consumables/

controls/

devices/

engines/

environment/

fdm/

gear/

input/

instrumentation/

logging/

models/

nasal/

orientation/

The set of properties in orientation/ detail the orientation of the aircraft (pitch, yaw and roll).

  • alpha-deg
  • heading-deg
  • heading-magnetic-deg
  • pitch-deg
  • pitch-rate-degps
  • roll-deg
  • roll-rate-degps
  • side-slip-deg
  • side-slip-rad
  • yaw-deg
  • yaw-rate-degps

position/

The set of properties in position/ track the lat/lon location of the user's aircraft, as well as altitude and ground elevation immediately below the aircraft.

  • longitude-deg -- Current longitude of the aircraft in degrees.
  • latitude-deg -- Current latitude of the aircraft in degrees.
  • altitude-ft -- Current altitude of the aircraft above mean sea level.
  • ground-elev-m -- elevation of the ground below the aircraft, in meters. Note that for this property, ground structures are considered part of the ground. Thus, flying over any ground structure (a building, a sign, a radio tower, whatever) will raise the value of this property for as long as the aircraft is over the structure.
  • altitude-agl-ft -- Current altitude of the aircraft above ground/ground structures below.

sim/

  • aero --
  • ai
  • ai-traffic
  • aircraft --
  • aircraft-dir --
  • aircraft-min-status --
  • alarms --
  • allow-toggle-cockpit --
  • ATC
  • atc
  • author --
  • auto-coordination -- boolean (true/false) flag indicating whether auto-coordination is on or off.
  • chase-distance-m --
  • control-mode --
  • current-view
  • description --
  • flight-model --
  • frame-rate --
  • freeze
  • hud
  • input
  • instrumentation
  • instrument-options
  • intl
  • logging
  • model-hz --
  • multiplay
  • panel
  • presets
  • rendering
  • sound
  • speed-up --
  • startup
  • status --
  • time
  • view-mode --
  • menubar/
  • model/
  • mouse/
  • navdb/
  • number-views = '6' (int)
  • replay/
  • sceneryloaded = 'true' (bool)
  • submodels/
  • systems/
  • temp/
  • tower/
  • traffic-manager/
  • user/
  • view/
  • view[1]/
  • view[2]/
  • view[3]/
  • view[4]/
  • view[5]/
  • virtual-cockpit = 'false' (bool)

surface-positions/

systems/

velocities/