Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Requests
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Addon Requests If you have a request for a new addon or want to know where to find a specific addon, ask it here!

Reply
 
Thread Tools
Old 01-15-2019, 11:25 AM   #1
4throck
Enthusiast !
 
4throck's Avatar
Default 2016 landing points from scenario

We have older addons that run fine, but they lack 2016 style landing points.
Also script vessels still don't' support them...

So what if we could apply them from a scenario ?

I'm thinking about having a phantom vessel that reads the necessary parameters and applies them to the target vessels when the scenario runs.

By parameters I mean something like:
VesselNameA PT1 PT2 PT3
VesselNameB PT1 PT2 PT3

What do you think ?
Is there any problem I'm not thinking about ?
4throck is offline   Reply With Quote
Thanked by:
Old 01-15-2019, 01:13 PM   #2
barrygolden
Orbinaut
 
barrygolden's Avatar
Default

brianj and gattis have looked at this with the falcon landings and the LER
barrygolden is offline   Reply With Quote
Old 01-16-2019, 02:04 PM   #3
fred18
Addon Developer

Default

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,
fred18 is offline   Reply With Quote
Old 01-16-2019, 05:22 PM   #4
Donamy
Beta Tester


Default

Can it do SC3 .ini vessels ?
Donamy is offline   Reply With Quote
Thanked by:
Old 01-16-2019, 05:40 PM   #5
jacquesmomo
Kourou CSG addon Developper
 
jacquesmomo's Avatar
Default

hello Fred

A big thank you for this module which seems very interesting, and which will certainly allow me to make some updates for some of my vessels or projects ....

(At this moment I am still updating the ELA3 zone of Kourou (french Guyana).

I will test your module as soon as I will have time and I'll tell you

Jacques


Quote:
Originally Posted by Donamy View Post
 Can it do SC3 .ini vessels ?
As we can add a cfg file with SC3 and SC4 I think (and I hope) it is possible.... I'll will try....
jacquesmomo is offline   Reply With Quote
Thanked by:
Old 01-16-2019, 07:27 PM   #6
fred18
Addon Developer

Default

Quote:
Originally Posted by Donamy View Post
 Can it do SC3 .ini vessels ?
I haven't tested it but I think yes: since it works also with vessel's names you can just create a cfg file with the name of the SC3 vessel and it should set its touchdown points accordingly. Please make the test and let me know if it works.

---------- Post added at 20:27 ---------- Previous post was at 20:25 ----------

Quote:
Originally Posted by jacquesmomo View Post
 hello Fred
A big thank you for this module which seems very interesting, and which will certainly allow me to make some updates for some of my vessels or projects ....
As said I maid quite quickly so I don't know if it works perfectly. But if it does its job and users say that it is useful we can always implement it and make it better.
fred18 is offline   Reply With Quote
Thanked by:
Old 01-16-2019, 08:35 PM   #7
Donamy
Beta Tester


Default

I use this for the file name and it says, it is not a valid file name.

DM_1/DM_1capsule
Donamy is offline   Reply With Quote
Old 01-16-2019, 08:40 PM   #8
fred18
Addon Developer

Default

Quote:
Originally Posted by Donamy View Post
 I use this for the file name and it says, it is not a valid file name.

DM_1/DM_1capsule
Yeah I think that windows does not like the / in the filename. Is there any way to avoid the use of it? What s the name of the sc3 ini file?
fred18 is offline   Reply With Quote
Thanked by:
Old 01-16-2019, 09:30 PM   #9
Donamy
Beta Tester


Default

DM_1capsule
Donamy is offline   Reply With Quote
Old 01-16-2019, 10:27 PM   #10
fred18
Addon Developer

Default

ok, so a small update since I remember that with SC3 a lot of ships have slashes in their names.

I can't force window to accept slashes in the filename, so instead of use "/", just save the names with 3 underscores "___".

DM1/DM1_capsule becomes DM1___DM1_capsule.cfg

here's the download link for the new version (it's the same link anyway, I just overwrote the file).

http://www.intech-srl.eu/fred/TD_Pts_Updater.zip
fred18 is offline   Reply With Quote
Thanked by:
Old 01-17-2019, 02:06 AM   #11
Donamy
Beta Tester


Default

The slash denotes a subfolder in the spacecraft folder.
Donamy is offline   Reply With Quote
Old 01-17-2019, 08:22 AM   #12
fred18
Addon Developer

Default

Quote:
Originally Posted by Donamy View Post
 The slash denotes a subfolder in the spacecraft folder.
Yes, that s why you name the vessel with the slash. For this plugin you have to create a cfg file with the name of the vessel and the name of the file cannot contain slashes because window does not accept them, so you just use 3 underscores instead.
fred18 is offline   Reply With Quote
Old 01-17-2019, 03:08 PM   #13
Donamy
Beta Tester


Default

How do you make a .cfg file point to a spacecraft .ini ? Never done it believe it or not.
Donamy is offline   Reply With Quote
Old 01-17-2019, 04:24 PM   #14
fred18
Addon Developer

Default

Quote:
Originally Posted by Donamy View Post
 How do you make a .cfg file point to a spacecraft .ini ? Never done it believe it or not.
nono, you don't have to point anything, that's much easier than what you are thinking about. The module I attached does everthing for you. for the DM1/DM1_capsule vessel just do this:

go to orbiter/config/TD_Pts_Updater folder
create e a new text file and name it "DM1___DM1_capsule.cfg"
open it and write the touchdown points data (to see how there is a deltaglider.cfg example that sets the point for making it a tail sitter some 30 meters above ground...).

Finish, it's just a matter of creating an text file in the right folder, and name it with the name of your vessel.
fred18 is offline   Reply With Quote
Thanked by:
Old 01-17-2019, 04:52 PM   #15
4throck
Enthusiast !
 
4throck's Avatar
Default

Fred, many thanks for this!



I'm testing it with spacecraft.dll vessels and it works!

The only problem is that it never dampens completely.
But it's very close to that.
I'm leaving the calculations up to the plugin, I have no clue what values to use.

Last edited by 4throck; 01-17-2019 at 05:37 PM.
4throck is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Addons > Addon Requests

Tags
landing points


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 01:15 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.