-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHIP:FACING:PITCH supplying wrong values #664
Comments
And once again the bad terminology chosen in the early days of the mod before we took it over, to use the words "pitch", "yaw", and "roll" in a situation where it's wrong, rears its ugly head. I'm beginning to wonder if backward compatibility isn't worth breaking here because of how utterly wrong the terms are and how often that causes questions like this. @dcrockwell , the terminology is massively misleading. When you see SHIP:FACING:PITCH, you'd assume it was the pitch of the ship versus the horizon. It isn't. It's the Euler rotation angle around the universe's X axis that was used to rotate the ship from the default transform into the one it's in now. The actual XYZ axes of the universe are complex and messy, but what matters is that they have no relationship at all to the ship's own facing, and that they are what the terms pitch,yaw, and roll are really talking about, despite the broken terminology. To get the pitch relative to the horizon, you can try getting the angle between SHIP:FACING:VEC and |
Thank you very much for your reply! I understand much better now, and your example completely unblocks my project. Cheers! |
I'd suggest adding something like ship:relative:pitch/yaw/roll/hdg, ship:global:(whatever),ship:relvelocity:(whatever) for velocity in ship's reference frame, and ship:bodyvelocity:(whatever) for velocity in spherical reference frame of body. (whatever)-I don't have idea how to call these. Won't break old codes, will simplify new ones, maybe ad some redundant variables but backward compatibility will be kept. |
When using SHIP:FACING:PITCH, I expect the value to change with the pitch of the ship. Instead, the YAW changes while the PITCH changes less than a degree.
Currently, I can find no way to get the current pitch value of a vessel so that it can be fed into HEADING() so as to change the heading but not the pitch.
Is there any way to do this that you know of?
The text was updated successfully, but these errors were encountered: