Thanks so much for your help, this works like a charm for FlightGear 0.9.2.

Geoffrey Frost

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul Surgeon
Sent: Wednesday, February 16, 2005 11:11 AM
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] FlightGear version 9.2 Help Request

On Wednesday, 16 February 2005 20:05, Geoffrey Frost wrote:
> Can I just replace the radio-medium.xml file with a .3ds model and get the
> same results?
>
> Geoffrey Frost

No, the xml files are used to change attributes of models (animations,
visual
range, scale, etc)

Here is a quick rundown on how to add a shared model to the current version
of
FlightGear - I'm not sure if this is applicable to 0.9.2 since I never ran
that version and wouldn't have remembered anyway.  :)

Step 1 :
Create a directory under the FlightGear data/Models directory.
I'm going to use data/Models/MyModels as an example.

Step 2 :
Inside the data/Models/MyModels drirectory create an xml file called
foomodel.xml with the following contents :

<?xml version="1.0"?>

<PropertyList>

 <path>foomodel.3ds</path>

 <animation>
  <type>range</type>
  <min-m>0</min-m>
  <max-m>25000</max-m>
 </animation>

</PropertyList>

Step 3 :
Create an 3ds model called foomodel.3ds and save it into the
data/Models/MyModels directory. Notice that the xml file references the 3ds
model file and tells FG that it must be visible from 0 meters up to 25 km.

Step 4 :
Start FG and fly (or use UFO model and move) to the location where you want
to
place the model.
Open up the property browser in FG and write down the lat, lon and altitude
where you want to place the model. (File->Browse Internal
Properties->Position)

Step 5 :
In CVS there is a perl program called calc-tile.pl that works out what stg
file a geodetic coordinate falls in.
You can get it here if you don't feel like playing with CVS and don't have
the
CVS branch installed :
http://cvs.flightgear.org/cgi-bin/viewcvs/viewcvs.cgi/*checkout*/FlightGear/
scripts/perl/scenery/calc-tile.pl?rev=HEAD&cvsroot=FlightGear-0.9&content-ty
pe=text/x-perl

Run the perl script in a terminal window passing it the longitude and
latitude
that you wrote down in step 4. You'll probably have to install perl first if
you run on a MS OS's.

Example :
[EMAIL PROTECTED] scenery]$ ./calc-tile.pl -55.5 30.3
Longitude: -55.5
Latitude:  30.3
Tile:      2039314
Path:      "w060n30/w056n30/2039314.stg"

Step 6 :
Open the corresponding stg file in your scenery directory
(in my case SceneryDir/w060n30/w056n30/2039314.stg)

Step 7 :
Add the following lines to the stg file replacing the parameters with your
own :
OBJECT_SHARED Models/MyModels/foomodel.xml -55.5 30.3 1000.0 0.00
The format is :
OBJECT_SHARED <Relative path to model xml file> <lon> <lat> <altitude above
wgs84 ellipsoid> <rotation/heading>

Step 8 :
Start FG and fly to where you added the model and it should be there.

Hope that helps
Paul

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to