-
Notifications
You must be signed in to change notification settings - Fork 12
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
added damping sine wave to model nose wheel bump on touchdown #32
base: master
Are you sure you want to change the base?
added damping sine wave to model nose wheel bump on touchdown #32
Conversation
In real life the view does not shake, of course, but you get the feeling of the wheel touching down. |
Unfortunately, judging from the datarefs, there seems to be no way to get the vertical speed of the nose wheel, but I'm new to XP plugin development so I could be wrong. As for the "vertical shaking with a very little roll of the view" do you mean that, apart from the movement I already implemented on the vertical axis, it would be nice to have a roll on the longitudinal axis? |
It's implemented using the "sim/aircraft/parts/acf_gear_znodef" dataref. Taildraggers are excluded.
In the datarefs there's no direct reading of the vertical speed of the nose wheel but in other plugins I just used the pitch speed to detect this kind of movement. A quick change of pitch means that the nose wheel is going to hit the ground pretty hard. With "vertical shaking with a very little roll of the view" I mean a roll along the longitudinal axis, as you mentioned. |
Understood, I'll try to implement it! Would you mind pointing me in the right direction with the dataref I can use to gauge the pitch speed? Thank you |
I would use "sim/flightmodel/position/true_theta" to get the current pitch. In the flightloop you can get the elapsed time. Tracking the change of pitch in time you get the pitch speed. :-) |
I added the requested features, if you could try it and let me know it would be great. |
This is a draft aiming to add the bump effect when the nose wheel touches down.
I added a damping sine wave to model the nose wheel bump on touchdown.
Since I'm not a real life pilot, I'm not quite sure how big the effect is and which variables might affect it (I imagine many, like wheel pressure and nose down speed, if at all possible to be determined via a dataref, tho we might want to limit the model to a few). For this reason, every damping function parameters are exposed as dataref so that they can be modified and tested in game. It would be nice if someone with real life experience could try it and tell me what parameters feel the best.
The function has the form:
where:
simcoders/headshake/touchdowncamera/bump_initial_amplitude
) [default value: 0.03]simcoders/headshake/touchdowncamera/bump_decay_rate
) [default value: 1]simcoders/headshake/touchdowncamera/bump_frequency
) [default value: 1]At the moment, the nose wheel touchdown check is performed assuming the nose wheel is the first in the
sim/flightmodel2/gear/on_ground
array dataref, but we might want to perform a better check, testing the position of each wheel using thesim/aircraft/parts/acf_gear_znodef
in order to establish which wheel is the furthest forward.All code is unfinished and unpolished, everything will be cleaned up in future commits.
Closes #28