Board index FlightGear Development Nasal

Protocol file/property tree - Yoke/Rudder position

Nasal is the scripting language of FlightGear.

Protocol file/property tree - Yoke/Rudder position

Postby slawekmikula » Fri Mar 31, 2017 9:15 pm

Hi all,

I'm implementing interface between http://vfrflight.org application and FlightGear. One question about property tree. Is it possible to get information about yoke position and rudder pedals position independently from the controller. Right now i'm using code as below using first joystick property tree. Unfortunately one can have no joystick and control plane with e.g. mouse or have multiple joysticks and control these values with different ones.

Question: How get yoke/rudder position not from the controller interface ?

Code: Select all
            <chunk>
                <name>getYokeXPosition</name>
                <format>%f</format>
                <type>float</type>
                <node>/device/status/joysticks/joystick/axis</node>
            </chunk>

            <chunk>
                <name>getYokeYPosition</name>
                <format>%f</format>
                <type>float</type>
                <node>/device/status/joysticks/joystick/axis[1]</node>
            </chunk>

            <chunk>
                <name>getRudderPeddalsPosition</name>
                <format>%f</format>
                <type>float</type>
                <node>/device/status/joysticks/joystick/axis[2]</node>
            </chunk>
slawekmikula
 
Posts: 128
Joined: Sun Feb 19, 2017 10:31 am

Re: Protocol file/property tree - Yoke/Rudder position

Postby sanhozay » Fri Mar 31, 2017 9:57 pm

The control inputs should be:

Code: Select all
controls/flight/aileron
controls/flight/elevator
controls/flight/rudder

The trims are under the same branch.
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Protocol file/property tree - Yoke/Rudder position

Postby slawekmikula » Sat Apr 01, 2017 6:31 am

Thanks a lot. Silly me :)
slawekmikula
 
Posts: 128
Joined: Sun Feb 19, 2017 10:31 am


Return to Nasal

Who is online

Users browsing this forum: No registered users and 3 guests