Elvas Tower: QDirection() - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

QDirection() Rate Topic: -----

#11 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,349
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 12 January 2019 - 06:49 PM

Playing around in excel it seems the problem is with the first number being negative. When I remove the sign I can paste as text and things work. With the minus sign Excel assumes the data is numeric instead of a string (it does this by adding an equals sign as a prefix). The sheet is protected so I cannot format the cell as text.

But obviously your example worked... wonder why mine is different. Guess it is time to find a spreadsheet cracker (again; I cracked this once before and added a page to mimic the gantry function).

#12 User is offline   dajones 

  • Open Rails Developer
  • Group: Status: Contributing Member
  • Posts: 413
  • Joined: 27-February 08
  • Gender:Male
  • Location:Durango, CO
  • Country:

Posted 12 January 2019 - 07:57 PM

The rotation matrix calculated from those quaternions with all negative numbers should be the same as if all of the numbers are positive, see rotation matrix from quaternion. All of the fields in the rotation matrix are based on two quaternion fields, so the sign will cancel. Maybe RE doesn't like all negative values.

Doug

#13 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 January 2019 - 02:48 AM

 Genma Saotome, on 12 January 2019 - 06:49 PM, said:

Playing around in excel it seems the problem is with the first number being negative. When I remove the sign I can paste as text and things work. With the minus sign Excel assumes the data is numeric instead of a string (it does this by adding an equals sign as a prefix). The sheet is protected so I cannot format the cell as text.

But obviously your example worked... wonder why mine is different. Guess it is time to find a spreadsheet cracker (again; I cracked this once before and added a page to mimic the gantry function).

Ah, I was having a bit of difficulty pasting the numbers in but thought that was just me not being used to the spreadsheet's ways. :)

I got around the problem by typing into the cell: equals, double-quote, paste, double-quote, enter. I.e. ="-0.00047883 -0.969808 -0.00190423 -0.243864"

Still a bit unsure why the MSTS RE wouldn't like it, but maybe Doug's right.

#14 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,349
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 13 January 2019 - 10:28 AM

 dajones, on 12 January 2019 - 07:57 PM, said:

The rotation matrix calculated from those quaternions with all negative numbers should be the same as if all of the numbers are positive, see rotation matrix from quaternion. All of the fields in the rotation matrix are based on two quaternion fields, so the sign will cancel. Maybe RE doesn't like all negative values.

Doug


I tried that... the results are 180d from expected. But that's easily corrected and so now I know the correct value for the angle -- 29.456d. There are no curves of 0.456d and so what I will to is skew both ends of the curve by 0.022d, a slight bump but surely acceptable.

Very big thanks to all!!
:sign_thanks: :sign_thanks: :sign_thanks:

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users