Board index FlightGear Development Aircraft

Slow instrument

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Slow instrument

Postby bassmannate » Thu Aug 06, 2009 2:54 am

Hello,

I modified the code for the first VSI in the Bocian sailplane to act as a compensated variometer. I'm using the nasal script found in this post: http://www.flightgear.org/forums/viewto ... =15#p35604
and it seems to be working properly except that the needle only seems to be updating 1-2 times per second. All other instruments are operating normally. It's just this one and I can't figure out why it won't operate smoothly.

I'm a bit of a noob when it comes to instrument programming. I really want this to work properly partly to have it working but also so I can understand what is going on and maybe do some other work and contribute.

Thanks!
bassmannate
 
Posts: 34
Joined: Mon Jul 27, 2009 7:41 pm

Re: Slow instrument

Postby erik » Thu Aug 06, 2009 7:54 am

it's probably due to this line, you might want to increase the update rate to say 30Hz:

settimer(func me.update(), 1/2); # update rate: twice per second
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: Slow instrument

Postby bassmannate » Thu Aug 06, 2009 1:24 pm

Ah. Thank you! I thought there might be a line in there somewhere that controlled the update frequency. I just couldn't find it.
bassmannate
 
Posts: 34
Joined: Mon Jul 27, 2009 7:41 pm

Re: Slow instrument

Postby bassmannate » Thu Aug 06, 2009 5:53 pm

One more question about this instrument...

How would I damp the movement of the needle? As it works now the needle is CONSTANTLY moving and makes it difficult to tell what the actual reading should be.
bassmannate
 
Posts: 34
Joined: Mon Jul 27, 2009 7:41 pm


Return to Aircraft

Who is online

Users browsing this forum: No registered users and 13 guests