GeoffDraper wrote in Thu Mar 31, 2016 12:57 pm:I've had a look at the download of the DG-101G aircraft definition. It seems to consist of XML code to define the property tree, and NAS code to change tree values dynamically. Also key definitions - "w" etc.
Broadly, I think I'll need to :
- remove the auto-release code, just two lines.
- add a new letter ("z"?) to tell the winch to gradually decelerate and stop.
- maybe shift the tow-hook location aft as the winch decelerates.
I think you're saying I can do all this in my own copy of the aircraft definition, and then just add it (with a new name) to my installed aircraft folder, then fly it. Have I got that right?
See
http://wiki.flightgear.org/Howto:Make_a ... _and_files for an overview of the usual conventions for files.
It's easier to just modify the files that are already there (after making a backup of course); as there are some complexities that might slow down progress when working with new or renamed files.
You shouldn't need to move the connection point; just calculate the appropriate force vectors in the aircraft X,Y,Z axes. Look for properties that are in fdm/jsbsim/external_reactions/ (use the / key to open the property browser)
If you want to see how this is done entirely using a JSBSim system look at the catapult or arrestor hook on the F-14. I'd probably change all of the winch calculations to be in a JSBSim system because then you can use a lookup table coupled with some maths to get the force vectors and magnitude correct for a winch.
Instead of rebinding the Z key maybe you could use the throttle position to control the winch speed. Before rebinding keys look in /input/keyboard to see which ones are available