simcodersdotcom / headshake

Source code of the HeadShake plugin for X-Plane
https://www.simcoders.com/headshake
GNU General Public License v3.0
39 stars 12 forks source link

Fork aimed at resolving the "tilted head after flying a while" bug #20

Open quantumac opened 5 years ago

quantumac commented 5 years ago

I created a fork to specifically address the irritating bug where after flying for a while the pilot's view is permanently rolled to one side or the other. My fork basically recomputes the roll from the camera commands and applies an offset to counter the roll drift offset introduced by X-Plane. It also attempts to quantize the floating point calculations so as to minimize numerical precision issues when adding/subtracting offsets to head rotations. Lastly, it sets the head roll first before setting the pitch and yaw angles, and that seems to minimize some of the imprecision in roll introduced by X-Plane.

You can check out the changes at "https://github.com/quantumac/headshake". Feel free to use any of these changes or not.

quantumac commented 5 years ago

Addendum: I filed a bug report with Laminar Research regarding another issue where the "alternate orientation" which X-Plane maintains is overwritten or updated when the view is aligned with a preset and HeadShake modifies the pilots head orientation. The result is the user is no longer able to bounce back and forth between some orientation they've slewed to and a preset orientation by pressing a single key. It's a handy feature. I requested they add some dataref which HeadShake could use to keep this alternate orientation from being modified when HeadShake makes its modification of the pilots head. I don't know if Laminar Research will address this or not, but at least they have given the issue a bug report number: XPD-10251.

nico87 commented 5 years ago

Looks great. Why don't you create a pull request for it?

Claudio

Il giorno ven 9 ago 2019 alle ore 03:10 quantumac notifications@github.com ha scritto:

Addendum: I filed a bug report with Laminar Research regarding another issue where the "alternate orientation" which X-Plane maintains is overwritten or updated when the view is aligned with a preset and HeadShake modifies the pilots head orientation. The result is the user is no longer able to bounce back and forth between some orientation they've slewed to and a preset orientation by pressing a single key. It's a handy feature. I requested they add some dataref which HeadShake could use to keep this alternate orientation from being modified when HeadShake makes its modification of the pilots head. I don't know if Laminar Research will address this or not, but at least they have given the issue a bug report number: XPD-10251.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/simcodersdotcom/headshake/issues/20?email_source=notifications&email_token=AAKMVZS76QGP3DCXEVPT2JLQDS7ZZA5CNFSM4IKE3QZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD35JZ3Q#issuecomment-519740654, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKMVZXFAEQAMH4HRPM23T3QDS7ZZANCNFSM4IKE3QZQ .

quantumac commented 5 years ago

Pull request created. Try it out and see what you think.

nico87 commented 5 years ago

Thanks! I'll do it during the weekend.

Claudio

Il giorno ven 9 ago 2019 alle ore 16:18 quantumac notifications@github.com ha scritto:

Pull request created. Try it out and see what you think.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/simcodersdotcom/headshake/issues/20?email_source=notifications&email_token=AAKMVZWYWFJPRXPSYHIJYWTQDV4DFA5CNFSM4IKE3QZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD36ZWWQ#issuecomment-519936858, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKMVZTT4UIVW5Z6B6PYQY3QDV4DFANCNFSM4IKE3QZQ .