Hi there,
I studied touchdown points a lot while developing MS2015.
I noticed that if we just use the points the default values for stiffness and damping often brings to instability or unexpected behaviour.
if it's just an issue of setting touchdown points to old vessel my first suggestion is a very simple plugin.
it can use a simple text configuration file as database for the points and then simply use the clbkNewVessel function so when the vessel is created it applies the correct touchdown points to the vessel.
It is indeed very simple so if you want I can give it a look and write it, it's gonna take 1 hour no more.
it can read either the vessel name or the classname of the vessel so if you want to change points to a specific vessel you can, but if you want to have the same points for all the vessels of that class you can as well.
Example of the text file:
Code:
[Atlantis]
N = 3
POINT_1 = 0 2.57 10
POINT_2 = 0 -2.57 10
POINT_3 = -3.5 -2.57 -1
[Deltaglider]
N = 4
POINT_1 = -8.5 -0.3 -7.05 1e7 1e5 3.0
POINT_2 = 8.5 -0.3 -7.05 1e7 1e5 3.0
POINT_3 = -8.5 -0.4 -3 1e7 1e5 3.0
POINT_4 = -8.5 -0.4 -3 1e7 1e5 3.0
(I used some random points and values). So for the DG you'll have 4 points with defined stiffness, damping and friction, while for the Atlantis the plugin will calculate them by itself using the equation of the damped harmonic oscillator (I have them ready)
and then the plugin will just look like in schematic non code
Code:
void clbkNewVessel(OBJHANDLE h_vessel){
if classname of h_vessel == 1 of the element in the database
Apply the touchdown points
else if name of h_vessel == 1 of the element in the database
Apply the touchdown points
return;
}
That's it, very easy.
If this is enough I can do it, just let me know
---------- Post added at 19:23 ---------- Previous post was at 16:42 ----------
a much,.... MUCH, easier way would be for the plugin to just have a folder in the config folder with a different file for each classname / vessel name... so Deltaglider.cfg inside the folder will just be:
Code:
N = 4
POINT_1 = -8.5 -0.3 -7.05 1e7 1e5 3.0
POINT_2 = 8.5 -0.3 -7.05 1e7 1e5 3.0
POINT_3 = -8.5 -0.4 -3 1e7 1e5 3.0
POINT_4 = -8.5 -0.4 -3 1e7 1e5 3.0
and that's it.
the unique file can be useful but requires extrawork to make it, and now I can't apply to that.
---------- Post added at 23:37 ---------- Previous post was at 19:23 ----------
Have a look here, it seems to work
I'll give explanations tomorrow, now I have to go!
http://www.intech-srl.eu/fred/TD_Pts_Updater.zip
---------- Post added 16th Jan 2019 at 15:04 ---------- Previous post was 15th Jan 2019 at 23:37 ----------
So as promised some explanations:
1) this simple plugin allows to set Touchdown points via cfg file
2) it works for specific vessel's names or for specific vessel's classes. So if for example you want to have specific touchdown points for a Deltaglider that in your scenario will be called GL01, you'll have to create the GL01.cfg inside the config/TD_Pts_Updater/ folder while if you want all the Deltagliders to have your specific touchdown points you'll have to create the Deltaglider.cfg file in the same folder
3) it won't work properly for vessels who set Touchdown points during simulations by themselves (the DG for example changes its TD points while lowering and raising the gear), but there is nothing that can be don for that.
4) you probably will not see any changes for already landed vessels until you move them either by their engines or (suggested) via scenario editor. This is because in the scenario also the arot and alt parameters and saved and used to restore the state, so if it seems to you that nothing changed, try first to move the vessels.
5) the parameters in the cfg are:
Code:
N = X ;number of points
POINT_X = aa bb cc dd ee ff gg ;point number x characteristics:
aa bb cc are the x y and z points of the touchdown point
dd is the stiffness of the point
ee is the damping of the point
ff is the mu coefficient of friction of the point
gg is the mu longitudinal coefficient (used only for the first 3 points)
if less than 3 points are defined the plugin will not do anything since 3 is the minimum that can be defined
if the first point does not have stiffness or damping defined (or they are simply 0) then the plugin will use the harmonic damped oscillator equations to find them for all the points using the vessel mass.
The use of the vessel mass is why in the code you see the initial check for existing vessel in scenario done after 10 frames, in the first frame the mass returned by GetMass() is 0, so instead of using the clbkSimulationStart I just put the check after 10 frames but it doesn't make much difference.
It is a quick and dirty module, so don't take it as gold, just test it and if you like it and does what it should then we could refine it a bit.
Hope it is useful,