Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 11-25-2016, 07:28 PM   #121
mike-c
Orbinaut
Default

imagine your vessel. it stands on the Touchdown-points right?

what happens, if you deploy a landing gear. the wheels move ...
down!
mike-c is offline   Reply With Quote
Thanked by:
Old 11-26-2016, 01:18 PM   #122
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Ok using Fred's formula. I get this for my msl rover

Code:
static TOUCHDOWNVTX tdvtx[ntdvtx] = {
    { _V(0, .001, 1.5), 5883, 4142, 3.2, 0.8 },
    { _V(-2, .001, -2.6), 5883, 4142, 3.2, 0.4 },
    { _V(2, .001, -2.6), 5883, 4142, 3.2, 0.4 }
It moves great. That is it doesn't flip over.


But it seems to pitch down on the pad.



And if I raise the touchdown y values it lowers the vessel.


So is there a level area for testing of touchdown poinjts?
gattispilot is offline   Reply With Quote
Old 11-26-2016, 01:36 PM   #123
Ripley
Tutorial translator
 
Ripley's Avatar
Default

gattispilot, when you finally solve your touchdown pioints issues, I'll open one of the good bottles I keep for those special occasions!

Ripley is offline   Reply With Quote
Old 11-26-2016, 01:50 PM   #124
jedidia
shoemaker without legs
 
jedidia's Avatar
Default

Quote:
But it seems to pitch down on the pad.
I can't see your screenshots from behind the school firewall, but your code tells me that all your points have the same stiffness and damping.

But if you have, for example, two points to the rear left and right, and one point to the front center, then the one in the front is carrying more mass than the two rear points, since they can distribute the mass among each other. Ergo, the front point must have a higher stiffness.

Quote:
And if I raise the touchdown y values it lowers the vessel.
Of course. You're essentially raising the wheels when you do that.
jedidia is offline   Reply With Quote
Thanked by:
Old 11-26-2016, 02:12 PM   #125
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by Ripley View Post
 gattispilot, when you finally solve your touchdown pioints issues, I'll open one of the good bottles I keep for those special occasions!

Sounds like one of those reasons to heat up the big pot of chili
Urwumpe is offline   Reply With Quote
Old 11-26-2016, 02:39 PM   #126
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Quote:
Originally Posted by jedidia View Post
 
Of course. You're essentially raising the wheels when you do that.
Oh!!
Thanks.

So you are not raising the bottom of the mesh?

Ok on the rover.

This gives me about 0 pitch:
Code:
static TOUCHDOWNVTX tdvtx[ntdvtx] = {
    { _V(0, .001, 1.5), 13883, 12142, 3.2, 0.8 },
    { _V(-2, .001, -2.6), 5883, 4142, 3.2, 0.4 },
    { _V(2, .001, -2.6), 5883, 4142, 3.2, 0.4 }
Up on the slscrawler it uses the old style of touchdown points and it is pitched down when raised up.

And as mentioned earlier We need a way to tell the suspension to compress/extent according to the terrain
gattispilot is offline   Reply With Quote
Old 11-26-2016, 03:39 PM   #127
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by gattispilot View Post
 So you are not raising the bottom of the mesh?
No. Remember what I already tried to explain you: The mesh is only for beauty. It generally serves no purpose, is a user interface in the best case.

The CoG of a vessel is the reference for everything. When you lower your wheels, you increase the distance between CoG and touchdown points = The vessel raises.

Takes some thinking to get into the different frames of reference. When you stand on the ground and look at the crawler, you see it differently than the crawler operator.
Urwumpe is offline   Reply With Quote
Thanked by:
Old 11-26-2016, 05:53 PM   #128
jedidia
shoemaker without legs
 
jedidia's Avatar
Default

Quote:
So you are not raising the bottom of the mesh?
No. The 0,0,0 coordinate of the mesh will by default be placed on your CoG. There's methods to offset that if you need to, but usually you don't.

And as everything else, the touchdown points also are relative to the CoG, but not really connected to anything else. You can move the mesh without affecting them. You can move the touchdown points without affecting your thruster positions. You can move your thrusters without affecting your dockports. And so on.
In effect, what you're doing when you move CoG, is move everything else. But if you move any of the other parts in relation to the CoG, all the other things remain unaffected.
jedidia is offline   Reply With Quote
Old 12-02-2016, 11:11 AM   #129
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

We think it is a tounchdown issue.
This vessel is good when Landed. I can placed it using scn editor.

But it you drop the vessel it just spins around.

Code:
static const DWORD ntdvtx_geardown = 3;
static TOUCHDOWNVTX tdvtx_geardown[ntdvtx_geardown] = {
	{ _V(0, 9.4, 22), 26150800, 18409627, 1.6, 0.1 },
	{ _V(-20, 9.4, -22), 26150800, 18409627, 3.0, 0.2 },
	{ _V(20, 9.4, -22), 26150800, 18409627, 3.0, 0.2 }
};
Code:
void SLSTOWER2::clbkSetClassCaps(FILEHANDLE cfg)
//void SLSTOWER2::SetTransporter()
{
	// physical specs
	SetSize(60);
	//SetEmptyMass(1170000000000000000);3,730,000
	SetEmptyMass(4000000);
	SetCW(0.3, 0.3, 0.6, 0.9);
	SetWingAspect(0.1);
	SetWingEffectiveness(0.1);
	SetCrossSections(_V(950,838.24,1080));
	SetRotDrag(_V(0.1, 0.1, 0.1));
	if (GetFlightModel() >= 1) {
		SetPitchMomentScale(1e-4);
		SetBankMomentScale(1e-4);
	}
	SetPMI(_V(.88, .99, .84));
	SetTrimScale(0.05);
	SetCameraOffset(_V(0, 1.2, 0));
	SetTouchdownPoints(tdvtx_geardown, ntdvtx_geardown);
gattispilot is offline   Reply With Quote
Old 12-02-2016, 11:57 AM   #130
fred18
Addon Developer

Default

Just a very quick note: if you used my formula then 26.150.800 should maybe be 2.615.080 for the stiffness? And damping goes along
fred18 is online now   Reply With Quote
Thanked by:
Old 12-02-2016, 01:50 PM   #131
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks I will adjust. Of course the tower doesn't have springs,....

But I haven't tried releasing ucgo cargo and seeing what it does.
gattispilot is offline   Reply With Quote
Old 12-02-2016, 03:42 PM   #132
fred18
Addon Developer

Default

Quote:
Originally Posted by gattispilot View Post
 Thanks I will adjust. Of course the tower doesn't have springs,....

But I haven't tried releasing ucgo cargo and seeing what it does.
Every object in orbiter now has springs: it's the way orbiter simulates ground contact, for everything
fred18 is online now   Reply With Quote
Thanked by:
Old 12-02-2016, 04:20 PM   #133
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Well I guess Dan will need to keep that in mind when Ummu for 2016 comes out.
gattispilot is offline   Reply With Quote
Old 12-14-2016, 01:33 PM   #134
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Ok. I want to see if I have it correct. There are 3 points of contact just has before. The additional contacts are for collison detection,.... right?

So like a car or Shuttle A where you would have 4 points of contact. How would you push up on the vessel to represent the spring force of the 4 point?
gattispilot is offline   Reply With Quote
Old 12-28-2016, 04:15 PM   #135
jedidia
shoemaker without legs
 
jedidia's Avatar
Default

Can somebody tell me how I calculate exact load distribution of asymetrically placed points?

Let's say I have 3 touchdown points at asymetric locations relative to the CoG, how do I calculate appropriate stiffness values so that the thing ends up in level?

---------- Post added at 05:15 PM ---------- Previous post was at 03:18 PM ----------

Never mind, hobbled something together by distributing mass proportional to distance from CoG that seems to work reasonably well. Here it is in case somebody else has use for it:

EDIT: Had a bug in a line, fixed now.

Code:
/**
* \brief Creates the default triangle of attachment points for this vessels landing gear.
* If there is no hullshape, the points created by orbiter will be used.
* \note There must be at least 3 landing gears on the vessel for this method to work!
* \returns A vector with size 3.
* \note Assumes that the ground-contact plane is perpendicular to the y-axis, does not work for other arrangements!
*/
void setDefaultTdStiffness(TOUCHDOWNVTX *IN_OUT_tdarray, double displacement)
{
	vector<double> proportional_loads(3);
	double proportional_sum = 0.0;
	//calculate proportional loads
	for (UINT i = 0; i < 3; ++i)
	{
		double propdist_from_cog = (abs(IN_OUT_tdarray[i].pos.x) + abs(IN_OUT_tdarray[i].pos.z));
		//guard against division by zero
		if (propdist_from_cog == 0)
		{
			proportional_loads[i] = 1;
		}
		else
		{
			proportional_loads[i] = 1 / propdist_from_cog;
		}
		proportional_sum += proportional_loads[i];
	}
	
	//normalise the proportional loads so the total sum is 1, calculate the effective load and the required stiffness.
	//we'll take a default damping value for now.
	double mass = vessel->GetMass() * 2;
	double normaliser = 1 / proportional_sum;
	for (UINT i = 0; i < 3; ++i)
	{
		double effective_load = (proportional_loads[i] * normaliser) * mass;
		double stiffness = effective_load / displacement;
		IN_OUT_tdarray[i].stiffness = stiffness;
		IN_OUT_tdarray[i].damping = TD_DAMPING;
	}
}

Last edited by jedidia; 12-28-2016 at 04:45 PM. Reason: Had a wrong line of code in there!
jedidia is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK


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 12:01 PM.

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.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.