Board index FlightGear Development

Pushback and pullforwards ...

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Pushback and pullforwards ...

Postby Jabberwocky » Sat Dec 13, 2014 7:19 pm

Hello,

I try to build a pushback/pull vehicle thingy to pull around taildraggers on airports. Basically, instead of coming in from forward and left, the truck comes from behind and left and attaches to the tail wheel to pull the plane backwards around. So far so good and then I ran into a problem. The truck spawns basically in the coordinate system of the plane. Which is for a modern tricycle geared plane no problem because on the ground they have usually a pitch angle of zero. Taildraggers on the other hand have a pitch angle (for example for the Lanc about 6.5%) because of the short tail wheels. Thier coordinate system is therefore also pitched by the same angle against the ground. So my truck emerges now out of the ground to attach itself ...

The usual way to compensate for that would be sometihng like add a way up (sin(-pitch angle) * distance) to the z coordinate ... and I have no idea how to word that in xml as an <animation>. Any help please?

J.
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04

Re: Pushback and pullforwards ...

Postby Philosopher » Sun Dec 14, 2014 2:34 am

Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Pushback and pullforwards ...

Postby Jabberwocky » Sun Dec 14, 2014 3:38 am

Hi Philosopher,

how, we talk about the model of the pushback truck that has the problem, not the plane. The plane has entirely correct a pitch because it's a taildragger and stands nose up on the field. So the problem is to compensate against the pitch level of the plane-model. I also can't work with fixed values because the next taildragger has for example only 4 degree pitch while standing on the airfield or 8 or whatever. So it needs to be calculated. A kind of a z-offset only for the truck model, but the offset is calculated from the distance to the anchor point on the plane and the pitch angle. I don't know,m can such a thing be done in xml at all?

J
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04

Re: Pushback and pullforwards ...

Postby Johan G » Sun Dec 14, 2014 1:41 pm

Jabberwocky wrote in Sun Dec 14, 2014 3:38 am:A kind of a z-offset only for the truck model, but the offset is calculated from the distance to the anchor point on the plane and the pitch angle. I don't know,m can such a thing be done in xml at all?

It might be my experiences of hand coding POV-Ray scenes (though simple and many years back), but I think it can be done using rotation and translation animations if done in the right order, at least to a large extent. :wink:

For example translate till hitch or pull bar is at the aircrafts anchor point, then rotate to compensate for pitch and resting angle, then rotate for steering, then translate to the aircrafts hitch pint at the end of it. Or something like that. Or have I misunderstood your problem?
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5960
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Pushback and pullforwards ...

Postby Jabberwocky » Tue Dec 16, 2014 5:23 am

Hi Philosopher,

sorry for my late reaction, I am quite busy lately.
Yes, it seems, I expressed the problem a bit blurry.
The truck spawns. At this point it is ab. 25m away and some feet under ground (depending on the pitch of the plane). When I connect it to the plane, the truck comes in motion, translates, rotates the truck odel for the heading, drives a noce quarter circle and goes with the hitch straight to the anchor point at the plane. And as a side effect, it also comes out of the ground while on the way because it basically moves all the time in the coordinate system of the plane which is basically increasing (right word in English for that?) with the pitch angle the nearer one comes direction nose of the plane.

So what I need is to compensate for that angle and the resulting -z-offset by pitch at the spawn point of the truck. The amount I need to compensate for depends on pitch angle and x-distance to the plane. So I can't just rotate around the y-axis because the pivot point is in the plane, not the truck. I also can't use the pivot point in the truck because the truck has no idea how much too deep in the ground it is. So my idea was, to use a tranlate to move the truck "up", as in adding a z-offset. The problem is, the amount of this z-offset needs to be calculated from two parameters: pitch and distance. So how do I word an expression with a sinus(-pitch) and a distance (double) in xml in a way FG understands me?

J.
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04

Re: Pushback and pullforwards ...

Postby Thorsten » Tue Dec 16, 2014 6:46 am

So I can't just rotate around the y-axis because the pivot point is in the plane, not the truck.


If the coordinate reference is the plane, then rotate around the pitch axis of the plane at the origin of the coordinate system (probably underneath the plane) and not at the truck position and you're back to a plane-centered coordinate system that's level with the horizon.
Thorsten
 
Posts: 11720
Joined: Mon Nov 02, 2009 8:33 am

Re: Pushback and pullforwards ...

Postby Jabberwocky » Tue Dec 16, 2014 3:48 pm

Thanks Thorsten,

sometimes I think to complex, I stare all the time at the truck, not the plane. Will try that!

J.
Jabberwocky
Retired
 
Posts: 1319
Joined: Sat Mar 22, 2014 7:36 pm
Callsign: JWOCKY
Version: 3.0.0
OS: Ubuntu 14.04


Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests