Thread: math logic bomb
View Single Post
09-07-12, 07:35 PM   #7
Jamash
A Fallenroot Satyr
 
Jamash's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 20
You can't scale your sliding window average to your display range until you figure out what your display range is. What are the minimum and maximum values you intend to display? What will you do with values outside that range? Does the minimum = (-the maximum)?

Is the range fixed value? Is it determined by the values in the sliding window? Does it depend on values that have passed out of the sliding window?

Once you have answered that, scaling the input value (the sliding window average) to an output value (an integer between -10 and +10, or equivalently 0 to 20, inclusive) is easy.
  Reply With Quote