PDA

View Full Version : Damping



jp_langer
11-09-2007, 05:49 PM
Hello,
How is it possible to damp the movement of the ball in the turn coordinator in a C gauge callback?
I use the usual ball position variable but it moves too fast and not with the inerty it should normally have.
Thanks for the help.
Jean-Pierre

n4gix
11-10-2007, 03:58 PM
You could program a small routine that will increase/decrease by some scalar step:

if ( ballpos > TURN_COORDINATOR_BALL_POSvar.var_value.n )
{ballpos = ballpos - 0.1 ; }

if ( ballpos < TURN_COORDINATOR_BALL_POSvar.var_value.n )
{ballpos = ballpos + 0.1 ; }

jp_langer
11-11-2007, 03:05 PM
Thank you for this message, but I don't understand the syntax of the routine. What is "ballpos".
Is it pelement->source_var.var_value.n ?

What are or mean : &gt or &lt

Sorry, I am a beginner in C language

Regards

Jean-Pierre

jp_langer
11-11-2007, 03:11 PM
Once more sorry, as when I read your answer the signs superior and inferior where written as ampersand sign and GT or Ampersand sign and LT, so I didn't understand them.
Jean-Pierre