View Single Post
Old 11-23-10, 04:29 AM   #574
Stiebler
Fuel Supplier
 
Stiebler's Avatar
 
Join Date: Oct 2005
Location: London, UK
Posts: 1,237
Downloads: 29
Uploads: 4


Default

@H.sie:
Many thanks for the detailed reply above. I'll look into this as soon as possible.

One quick thought: maybe most problems could be resolved by setting the 'emphasis-factor' (or its associated random number) for wind speed to zero. Then redistribute the wind speed parameter between 0 and 15 m/s. Or use CherryHarbey's solution (below).

@CherryHarbey:
Quote:
or alternatively take two random numbers between 0 and 16 and multiply together. Maximum value will still be 256 and answer from the range 0 to 256 but skewed towards the lower end.
That is a very imaginative solution - many thanks also. Particularly since, improbable though it may appear, calm seas are actually more common than very stormy seas in mid-Atlantic (according to U-boat war diaries).

My concern would be the source of the random numbers, and how random the numbers would be if plucked in quick succession, at assembler speed, in a few adjacent lines of code. (Most random number generators rely on a time seed for their random algorithm; a few take numbers from a hardware generator that is involved in code or output processing, so results are pseudo-random).

Stiebler.
Stiebler is offline   Reply With Quote