Page 1 of 1

Pantograph height adjustment

Posted: Mon Jul 22, 2002 11:37 am
by decapod
I hope OTTODAD doesn't mind if I "publish" here first, but, for those that like to fiddle here's :

How to adjust your (animated) pantograph height...

Rationale - routes with overhead wires can be set at different heights (probably not too relevant to UK routes), so different locos look odd if the pantograph is too high (e.g. the Acela is 7.2M the Japan wire height is just over 5M)
Unfortunately, the MSTS models are unable (and will never be able) to detect this to set the pantograph height accordingly.


Adjusting the height is not a simple matter of scaling (though you could do this but the loco would look a bit odd)

The angles of the pantograph animation need to be changed.

Using the Acela as an example, this has two parts (to both pantos)
The lower arm moves up by about 45 degrees and the upper arm moves 85 degrees (about twice the angle) relative to the lower arm.

The relevant part of the S file that controls this is :
(I have removed the linear key parts and a few brackets for clarity - not relevant)

Code: Select all

anim_node PANTOGRAPHBOTTOM1 (
	controllers ( 2
		tcb_rot ( 3
			tcb_key ( 0 -0.00436731 0 0 0.99999 0 0 0 0 0 )
			tcb_key ( 1 -0.386715 0 0 0.922199 0 0 0 0 0 )
			tcb_key ( 2 -0.386715 0 0 0.922199 0 0 0 0 0 )

anim_node PANTOGRAPHTOP1 (
	controllers ( 2
		tcb_rot ( 3
			tcb_key ( 0 0.0479783 0 0 0.998848 0 0 0 0 0 )
			tcb_key ( 1 0.678801 0 0 0.734322 0 0 0 0 0 )
			tcb_key ( 2 0.678801 0 0 0.734322 0 0 0 0 0 )
The second to fifth parameters of the tcb_key (this applys to slerp_key too) are a "quaternion" definition (3D matrix maths - fun stuff) but because the rotation is a simple one, about the x-axis only, it basically boils down to the fact that the second parameter is the negative sine of half of the rotation angle and the 5th parameter is the cosine of half of the rotation angle.

Looking at the Acela we can see that the key frames 1 and 2 (first parameter) are the same (modelling oddity?) 45/85 bottom/top animation angles and the first key frame (0) is almost 0 angle for top and bottom.

So now we can scale the animation - ignore key frame 0, this should be close to zero, if not use the difference to scale the angle.

To change the animation to 35/70 degrees bottom/top, take out your casio calculators, last used for O-level exams,

Sin(35/2)=0.3007, Cos(35/2)=0.95372 etc...

Code: Select all

anim_node PANTOGRAPHBOTTOM1 (
	controllers ( 2
		tcb_rot ( 3
			tcb_key ( 0 -0.00436731 0 0 0.99999 0 0 0 0 0 )
			tcb_key ( 1 -0.3007 0 0 0.95372 0 0 0 0 0 )
			tcb_key ( 2 -0.3007 0 0 0.95372 0 0 0 0 0 )

anim_node PANTOGRAPHTOP1 (
	controllers ( 2
		tcb_rot ( 3
			tcb_key ( 0 0.0479783 0 0 0.998848 0 0 0 0 0 )
			tcb_key ( 1 0.57358 0 0 0.81915 0 0 0 0 0 )
			tcb_key ( 2 0.57358 0 0 0.81915 0 0 0 0 0 )
Now the height achieved depends on how long the pantograph arms are, so it may take a bit of trial and error to get the correct values for your wire height.

Now the warnings...
Make sure you backup your files first!
Some animations may have more steps - you may need to experiment further.
Also, this is still not 1000% tested, though early tests looked promising.


Big thanks to Otto for introducing me to this part of the sim and for managing to understand my earlier e-mails. At some point in the future I'll alter the shape file manager to read and make the adjustments much more easliy (though I am a bit busy at the moment so it won't be very soon)

Re: Pantograph height adjustment

Posted: Mon Jul 22, 2002 4:19 pm
by OTTODAD
decapod wrote:I hope OTTODAD doesn't mind if I "publish" here first
Not at all !! I don't care where I read and print it first ! :lol:

Thanks a bundle ! Will keep me busy for some time. :wink:

P.S.: Forgot to mention how all this started with me planting the seeds in Paul's mind and letting him do all the Hard Work ! :P I couldn't have done it on my own anyway, although I stll have a CASIO fx-82 SUPER. :-?

I am a bit of a FussPot when I comes to Trains Perfection, Real, Models or Sims. Running SIM Elect.Locos with Pantographs of varying Fixed Heights on Routes with Catenary Overhead Wires from 5.4 (Japan) to 5.8 - 6.2 (Europe) and 7.2 metres (USA) does not look good unless you don't mind seeing Pantos never touch the Wire or sticking out over it like the first release of Just Trains TGVs 6 metres Pantos on the EuropaBahn's Routes 5.8 metres Overhead, Pantos fixed later.

So the options are to lower the Wire in the *.trk files for each loco with a different height Panto and then change it again for another ? Not likeley.

Or my solution of having the Overhead Wire at a standard height on all Routes and all Locos to match that height. I am going for the latter option !

As Paul pointed out, KUJU will not be able to make their Locos AUTO-ADJUST to the varying Overhead Wire Standards like Real ones do, unless they re-design MSTS from the Ground Floor up ? Unlikely.