* Bill Kennedy -- Tuesday 03 May 2005 18:51:
> I want to be able to place an AI controlled airplane in the
> world and have it follow the user aircraft.  I get how
> to insert an aircraft in the xml files, but I've been
> working on connecting that to some kind of function. 

I'm not sure what you did to "insert an aircraft in the xml files". Assuming
that you don't want to hack fgfs, that's what I would do: Write this into
an xml file, let's say "foo.xml":

<?xml version="1.0"?>

<PropertyList>
    <local>
        <foo>
            <longitude-deg type="double">0.0</longitude-deg>
            <latitude-deg type="double">0.0</latitude-deg>
            <elevation-ft type="double">-1000.0</elevation-ft>
            <roll-deg type="double">0.0</roll-deg>
            <pitch-deg type="double">0.0</pitch-deg>
            <heading-deg type="double">0.0</heading-deg>
        </foo>
    </local>

    <models>
        <model>
            <name>intelligent aircraft (haha)</name>
            <path>Aircraft/p51d/Models/p51d-jw.xml</path>
            <longitude-deg-prop>/local/foo/longitude-deg</longitude-deg-prop>
            <latitude-deg-prop>/local/foo/latitude-deg</latitude-deg-prop>
            <elevation-ft-prop>/local/foo/elevation-ft</elevation-ft-prop>
            <roll-deg-prop>/local/foo/roll-deg</roll-deg-prop>
            <pitch-deg-prop>/local/foo/pitch-deg</pitch-deg-prop>
            <heading-deg-prop>/local/foo/heading-deg</heading-deg-prop>
        </model>
    </models>
</PropertyList>


then call fgfs like so:

  $ fgfs --config=/tmp/foo.xml --httpd=5501 --aircraft=ufo

For a first test you can now call this page: http://localhost:5501/local/foo
and set the aircraft's location and orientation. After that you only need to
set the properties /local/foo/* via http/telnet/nasal-script/...

m.




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

Reply via email to