Jump to content
Sign in to follow this  
ddawson

looking for doug's random number generator

Recommended Posts

Guest ridgell

looked at some older posts but the links are dead, can someone point me to the file plz?doug dawson's (i belive it is his) random number generator for use with xml gauges

Share this post


Link to post
Share on other sites

Here you go. Remember that the values are quasi-random at best. There are "only" 32767 distinct values that will be chosen.Doughttp://forums.avsim.net/user_files/175607.zipEdit: For future reference, it is now (or shortly will be) in the Avsim library, as dsd_random_number.zipdsd

Share this post


Link to post
Share on other sites
Guest ridgell

thanks Doug! check; after testing it would seem that the gauge generates the number in the panel config -1. or gauge46=dsd_random_number!random_number, 5,5,20,20,05 will generate random numbers for (L:dsd_random_01, number) thru (L:dsd_random_04,number) the 5th or what ever the upper limit is set to seems to stay 0.00000and that the number is 5 places to the right of the decimal.i watched it churn for a couple of minutes and it looked very random.true and correct?

Share this post


Link to post
Share on other sites

The gauge starts numbering the variables at zero, so for 5 variables, they will be numbered from 0 to 4.Five places to the right of the decimal makes sense - the raw value generated is an integer between 0 and 32767. I grind it down to a value between 0 and 1.Doug

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...