Thorsten wrote in Tue Mar 20, 2018 8:06 am:I suspect he wants to follow it /after/ it has been released... Kind of a missile-view. I frankly have no idea whether it's possible.
Exactly my desire is precisely that of being able to make subjective ones.
For this we need the position in space and the velocity vector that are present in AIBalistic.cxx which is called by submodel.cxx (All the files are present in AIModel)
Reading the AIBalistic code (... fgfs/build/flightgear/src/AIModel) I noticed that this only inserts some information in the property-tree:
List of ballistic objects that have been activated by submodel:
The reported data that are only a part of those present in AIBalistic. Unfortunately, these data do not report the position in the space of the object and its velocity vector, these are all essential data for the construction of a subjective video recording. I think it would not be a problem to add such data in property-tree. This addition could be optional for speed optimization.
Observing the code of the AIBalistic.cxx module, note that in order to obtain the position coordinates and the velocity vector, a switch must be activated in the "submodels.xml" file:
- Code: Select all
<submodel>
<external-force>true</external-force>
</submodel>
This switch enables the ability to display more information for that object. Normally the
<external-force> switch is used to allow the object to be guided by a NASAL code (missiles or smart bombs), but in our case the switch will be useful to get the point of view from the object itself.
The image shows what the system responds when the wing tanks have not been released:
The property-tree
/ai/models it does not display anything, but as soon as you release the wing tanks (I have dropped 3 in this example), the ballistic objects appear:
As you can see the first part is what you saw even without having activated the option, but now there are new nodes that bring other information:
orientation and
positionThis is the
orientation node:
This is the
position node:
With this information it is possible to construct a visualization system that has the object itself as a point of view.