Howto:Add shared models manually: Difference between revisions

Jump to navigation Jump to search
m
updated link, some corrections
mNo edit summary
m (updated link, some corrections)
Line 24: Line 24:


=== Step 5 ===
=== 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-type=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 :
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/viewvc/source/scripts/perl/scenery/calc-tile.pl?revision=HEAD 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 :


  paul@localhost scenery?$ ./calc-tile.pl -55.5 30.3
  paul@localhost scenery?$ ./calc-tile.pl -55.5 30.3
Line 38: Line 38:
Add the following lines to the stg file replacing the parameters with your own :
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  
  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
The format is: ''OBJECT_SHARED relative_path_to_model_xml_file LON LAT ALTITUDE_above_wgs84 ellipsoid_ROTATION''. If you have no XML file, just specify the path to your model.


=== Step 8 ===  
=== Step 8 ===  
Line 66: Line 66:
|}
|}


About Altitude. Looking at the files shipped with FG, there are some strange, to me, figures for altitude. Some are negative numbers. That seems odd, since objects are being placed on the surface. It suggests that above surface may be negative on the Z axis. COMMENT : Much more likely these are objects which are purposely sunk into the terrain to adjust their height.
About Altitude. Looking at the files shipped with FG, there are some strange, to me, figures for altitude. Some are negative numbers. That seems odd, since objects are being placed on the surface. It suggests that above surface may be negative on the Z axis. COMMENT: Much more likely these are objects which are purposely sunk into the terrain to adjust their height.


I ran across a comment: 3D object need scenery to compute their height. This is why scenery must be associated with an existing land surface file (whatever you call it).
I ran across a comment: 3D object need scenery to compute their height. This is why scenery must be associated with an existing land surface file (whatever you call it).
4

edits

Navigation menu