Scenery Development Log

Half Moon Bay

Adding Objects to Scenery

The landscape in FG 1 is quite empty, there are no control towers or buildings for some airports. These can be added, but adding buildings requires obtaining the GPS locations and editing the required files.

Method for adding Scenery Objects:

The Latitude and Longitude coordinates elevation, or height above mean sea level (MSL) can be obtained from the properties of the Flight Gear sim from any vehicle parked at that location.

(June 2020)


Updates:

11 July 2020

Update: The UFO does export the location and other model data - it is in the users/application data/flightgear.org folder, so this makes things easier.

A line from this for example:

 <path type="string">Aircraft/ufo/Models/sign.ac</path>
      <latitude-deg type="double">37.50845715</latitude-deg>
      <longitude-deg type="double">-122.4953611</longitude-deg>
      <elevation-ft type="double">24.32499659</elevation-ft>
      <absolute-path type="string">C:\Program Files (x86)\FlightGear\data/Aircraft/ufo/Models/sign.ac</absolute-path>
      <stg-path type="string">w130n30/w123n37/942050.stg</stg-path>
      <stg-heading-deg type="double">80</stg-heading-deg>
      <elevation-m type="double">7.414258961</elevation-m>


The line of trees on left side of runway is done.

To do: (Posted on Forum)

Next: maybe add these all at once

2) The observatory

3) Rows of houses - left side of runway

4) Vehicles in parking lot - behind cafe

5) The cafe building- including trees - tarmac

6) Large building on the left - parking area

7) Aircraft on tarmac - 5 aircraft

Aircraft Hangers - on hold

9) Tree clumps at either end of the runway - far right side of runway , far left of runway

10 ) Boats - lots of boats - a line of identical sailboats - maybe 20



10 July 2020

Creating a line of trees:

  • Find the location where the line starts using the UFO
  • Add a large object to that spot to check for visibility
  • Add a row of trees by increment the Longitude and Latitude by 0.0001 degree
  • If the row of trees is not going in the required direction, add different increments to the Lat and Longitude values

The row of trees added by the above settings appear on the left of the runway. Trees added by previous changes are on the right. Over 300 trees in total.

The 2018 version does make it easier to update scenery because the UFO does actually export data to the console.

Maybe the Nasal code can be appended to make the earlier versions more capable.


model data exported to /home/starlight7/.fgfs/Export/ufo-model-export.xmlmodel data exported to /home/starlight7/.fgfs/Export/ufo-model-export.xml


Altitude AGL: 100.9938 m (331.3445 ft)


------------------------------ UFO -------------------------------Latitude: 21.45093546 degLongitude: -157.76476572 degAltitude ASL: 109.1790 m (358.1988 ft)39Heading: 134.6 degGround Elev: 8.1852 m (26.8542 ft)
# w160n20/w158n21/367577.stgOBJECT_STATIC -157.76476572 21.45093546 8.1852 225.4
http://maps.google.com/maps?ll=21.4509354616,-157.7647657197&z=12&t=h$ fgfs --aircraft=ufo --lat=21.450935 --lon=-157.764766 --altitude=358.20 --heading=126.8

------------------------ Selected Object -------------------------Path: Models/Buildings/water-tower.acLatitude: 21.44821987 degLongitude: -157.76401180 degAltitude ASL: 8.2298 m (27.0006 ft)Heading: 0.0 degPitch: 0.0 degRoll: -0.0 deg

9 July 2020

Added some trees, about 100 trees and 3 rows of them. The main concern here was frame rates, so adding trees did got me frame rates in the 20s (20fps) which was acceptable - on the 2015 model HP Celeron.

The rows were created using a spreadsheet to add an offset to the longitude or latitude, and automatically calculate the next row. Three such sets of data were created, height above ground was also incremented through the spreadsheet.



A V-shaped row of trees on the left of the runway on approach. Note the frame rate of 20fps.

Spreadsheet calculation of the coordinates of the trees, using an increment (offset) for latitude and height.

8 July 2020

Improving KHAF (Half Moon Bay Airport)

Forum: https://forum.flightgear.org/viewtopic.php?f=5&t=21911&start=15

The current state of scenery: The Cessna 172 N1234 is parked on the apron, with two King Airs, and several red hatchbacks (original .ac files converted to .3ds and colored red material) on the tarmac. A hanger floats in the background.

These were added by obtaining coordinates from Google Maps as well as from driving to the location in Flight Gear using the Amphibious Vehicle.

To obtain the correct height settings of an object above ground level, deploy an object in the same location at different heights (eg 12, 13, 14, 15). For example inserting five hangars on top of each other will result in maybe three of them appearing above ground, and one will be more or less at the correct height, not floating above the ground. Use the height settings for this object.

The red hatchback is a converted .ac file converted to .3ds and with a red material added. The King air is from /models/3ds. I was not able to convert it to .3ds due to an error with the file. The Cessna 172 in the background appeared out of nowhere, possibly an AI aircraft, inserted by FG itself, which is fine, except for the fact that it is floating above ground.

Adding more Scenery

July 8, 2020

Using the UFO model to add scenery is a good way to test the effects on frame rates, which surprisingly was not too bad at all. I have continued to add scenery items to the KHAF location, with the results in the image below. To recap, the method is as follows: start the UFO model. Use roll controls to point the UFO in the direction you want to go, which shows in the cockpit view. Press page up to move to the parking area and press page down to stop the UFO. You may have to use the roll controls to perfectly stabilize the UFO in place. Using again the instructions given in the Wiki:

Press SPACE bar

Left click on an item, say /models/Airport/hangar2.ac

Move the mouse to a position in the Flight Gear, say on to the tarmac and left click again.

The hangar will appear.


The above method is a good way of testing frame rates with added scenery. I found that frame rates were not too badly affected, which is a good thing.

Unfortunately it is not possible to add models directly to flight gear this way. The following procedure is the best I have come up so far, doubtless to be improved.

1. Start FG with the UFO model. Press Pg up to navigate to the location you want, press pg dn to stop.

2. Go to chase view and view the UFO from above, the UFO is transparent so you should be able to see the spot directly underneath. (Or you could use the shadow)

(Optional - place the model by pressing Spacebar > Left Click on model, Left Click on position you want the model.)

3. Browse to internal properties in File > Internal Properties and note the latiitude and longitude.

(I was not able to export data using E or D as instructed )

4. Locate the .stg file in the relevant scenery directory, and edit the file to include the model name and the location.

5. Use several copies of the object at different heights to get the height correct.

The UFO hovering in position over the spot at KHAF where the cafe should be. Left click added the building and TAB (FG1) brought up the adjustment menu, the model was duly rotated about 30 degrees left, this should be noted down. Also Browse Internal Properties latitude and longitude as well as ground elevation of the model, this may have to be adjused.

First Attempt - Adding two Radar towers

June 2020

I was able to add two radar towers and a control tower to Half Moon Bay airport (KHAF).

How were these towers added? The airport is Half Moon Bay - KHAF, so navigate to FlightGear/data/Terrain. There is only one default terrain folder, so that makes it easy: navigate to w130n30/w123n37 folder. This folder contains several files ending with .stg. Each file had to be inspected for the keywords "KHAF" which eventually was found as 942050.stg. Note: this is not the recommended practice, will update once I implement it.

OBJECT_BASE 942050.btg

OBJECT KHAF.btg

OBJECT_SHARED Models/Airport/beacon.xml -122.499971 37.513905 11.5 0.00

OBJECT_SHARED Models/Airport/windsock_lit.xml -122.506081 37.519485 19.1 0.00

OBJECT_SHARED Models/Airport/windsock_lit.xml -122.496094 37.508175 7.7 0.00

I added the following two lines, with a difference of 0.001 degrees to the second set of coordinates, and two towers appeared separated by a distance that looks to be about 4 meters or so (see image above)

OBJECT_SHARED Models/Airport/radar.xml -122.490094 37.508175 7.7 0.00

OBJECT_SHARED Models/Airport/radar.xml -122.490094 37.508275 7.7 0.00

Locating the Control Tower

How to locate the control tower? Earlier on, I taxied to the location in front of the 'tower view' position in the view options, and noted the location in the properties locations in browser internal properties.

So lets try those coordinates for the tower:

OBJECT_SHARED Models/Airport/tower.xml -122.495001 37.513702 7.7 5.00

The tower showed up in Flight Gear, so it was a success. However KHAF has no control tower, so it I need to add more items that are not towers, like buildings and cars.


Adding Terrain maps (scenery) (to be tested with latest scenery)

8 July 2020

The following was written some years ago, and the current set of scenery may not be compatible with the FG1 version I am using. Will test and post. Also maybe I can use Terragear.

So the following instructions is subject to testing.

The existing scenery is limited and only good for about a 30 minute flight, which is not very long. Scenery for Flight Gear One can be downloaded at this page:

http://ftp.igh.cnrs.fr/pub/flightgear/ftp/Scenery-v2.12/

The default scenery is w130n30

The scenery map is here:

http://wiki.flightgear.org/File:Worldscenery-text.jpg

To install, dowload the scenery file and copy it into the Flightgear/scenery folder. "c:/Program Files/FlightGear/scenery/"

Then use the back button and then the add button Fgrun to add the scenery directory to the launcher.

eg: c:/Program Files/FlightGear/scenery/

Use Atlas to display the scenery and airports in that scenery. Select that airport to start flight gear and check if the airport is really there. If it is there with runways and all, you are done. If you end up in a blue featureless ocean, something is wrong.