PDA

View Full Version : Explanation of values in .w files



sixman
09-01-2006, 03:00 PM
Can someone explain what the three vales in the 'Position' line and the four values in the 'QDirection' line found within the .w files represent?


Position ( -893.623 527.322 -976.863 )
QDirection ( 0 -0.834192 0 0.551474 )

wacampbell
09-01-2006, 03:16 PM
Position represents the location of the object on the tile. The three numbers are X Y and Z values, in meters relative to the center of the tile. So, in your example:

Position ( -893.623 527.322 -976.863 )

The object is 893 meters west, 527 meters above sea level, and 976 meters south.

QDirection represents the complex 3 dimensional rotation of the object expressed as a mathematical quaternion. There are a couple of spreadsheets around to convert the four values in the quaternion to degrees of rotation. ( one spreadsheet I know is provided with Michael Vones route building guide ) Google quaternion to learn more.

sixman
09-01-2006, 04:32 PM
Thanks for the reply. This will make it easrier to try and figure out the locations of objects on the individual .w tiles.

sixman
09-01-2006, 04:49 PM
Do you know where in Michael Vone's guide he references this? I did a search on his V2 documents and came up with zero results.

Swissie
09-01-2006, 04:55 PM
Hi Bob,

to be more precise, that info is found in a separate (free) guide Michael published here on train-sim. It is file objrot2.zip, called 'Object Rotator 2'. From the file id:

'(...) The enlarged documentation also explains the not very obvious way in which QDirection expresses heading, slope and bank angles for tracks, roads and other objects. By Michael Vone.'

Cheers,
Lukas a.k.a Swissie

wacampbell
09-01-2006, 04:57 PM
He included a spreadsheet with the V2 package. It would have been installed here:

C:\Program Files\Abacus\StepByStepGuideToRouteBuilding\Object Rotator for MSTS-v10.xls

sixman
09-02-2006, 08:15 AM
Thanks for the assistance!