July 22, 200718 yr 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
July 22, 200718 yr Author 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
July 23, 200718 yr 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?
July 23, 200718 yr Author 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
Create an account or sign in to comment