Hi all,
My message is mostly destined to Mathias Froehlich since he seems to be mainly
involved in this part of FG but of course every help is welcome.
I would like add a new feature to the STG parser. Some months ago I had already
added the possibility to give the pitch and roll (with the help of Anders). Now
I want add the possibility to compute the ground elevation dynamically in order
to add object in the scenery without elevation information.
Currently the STG parser requires this kind of line :
OBJECT_SHARED Models/Communications/radio-medium.xml -121.287778 37.008056
2500.00 180 0.0 0.0
Where "2500.00" is the elevation data of the object. A lot of objects are often
simply at ground level. Thus I would like to give the possibility to interpret
this kind of line :
OBJECT_SHARED Models/Communications/radio-medium.xml -121.287778 37.008056 GND
180 0.0 0.0
OBJECT_SHARED Models/Communications/radio-medium.xml -121.287778 37.008056
GND-108.254 180 0.0 0.0
OBJECT_SHARED Models/Communications/radio-medium.xml -121.287778 37.008056
GND+56.3 180 0.0 0.0
As you can see the "GND" tag means that the object is simply at ground
elevation. Also we can give an optional offset (positive or negative) for
adjustment. Of course the current way of working need to continue to work ! I
have already began to change the source code in order to make working together
the "old" parser and "maybe future" parser.
The "GND" tag give a big advantage, imagine if you can place object in FG just
by giving lat/lon and FG computes himself the elevation of object. In this way
we can place object without FG. We can place object with an automatic script or
using just a map available on the web. Also, with this new feature, we can use
the same object line with different elevation terrain, everybody know that a
lot of custom scenery exist everywhere on the web and often the ground
elevation is not the same in these custom scenery and in TerraSync terrain.
This feature solves the problem.
Since I am a partisan of the "do it yourself" mostly recommended in Open Source
project I have already modified SG source code. Here is my <<git diff>> :
http://pastebin.com/vT2xE6ii
I plan to organize the change in 2 part : first part is "detect the GND tag and
optional offset", second part is "compute the ground elevation with the lon/lat
and optional offset"
The first part is pretty advanced, the second part is mainly already create by
Mathias with the new "fgelev" tool. I hope that "fgelev" can be adapted for a
runtime execution.
With my changes, SG compilation works fine, but even if I haven't touched FG
files (I have only touched "ReaderWriterSTG.cxx") FG doesn't compile :/ I'm a
little bit surprised that SG compilation is a success but FG compilation fails
since I haven't touched FG source code.
I need some help to solve this FG compilation fail because I'm not a great
programmer, I have only C++ base skills.
In the SimGear changes I use boost::regex (I think it's better to use boost
library isn't it ?) so I have included the library with #include
<boost/regex.hpp> in this way SG compilation works fine. But now FG compilation
fails because boost::regex_basic and a lot of other boost library are missing.
And I don't understand why since only SG use boost::regex library.
The failed compilation log of FG is here : http://pastebin.com/zU4csueP
I have done a lot of investigation and research on the web, I have consulted a
lot of tutorial, example, documentation (cmake, boost), C++ forum
(stackoverflow, developpez) without solve this problem.
I think it's a cmake problem, maybe I need add something in CMakeLists.txt but
since I'm far to be a cmake guru I can't find the solution.
Please can you help me to solve this problem ? After that I can continue my
implementation ;)
Hoping that you can found interest in this new feature,
Thanks in advance,
Cheers,
Clément
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel