Since you're looking into the filtering algorithm maybe you could change the setup too. A very simple change would be to allow us experimental aircraft owners to set pairs of values for the brightness curve. I tried working with the built in brightness values of 100, 75, 50, 25 but couldn't get it to work. I'm sure I could have gotten the internal sensor to work if I could have entered pairs of (sensor, brightness) values. e.g.
struct BrightnessCurveSample
{
int lightSensor; // measured value from light sensor scaled 0..999
float brightness; // percent of maximum screen brightness 0.0 .. 100.0
};
BrightnessCurveSample brightnessCurve[] =
{
{999, 100.0}, // Direct sunlight
{980, 80.0}, // Indirect sunlight
{600, 4.0}, // Worst case flashlight value
{0, 2.0} // This is the lowest brightness for my eyes in my cockpit
};
float GetTargetBrightness(int curSensor);
// if curSensor less than smallest sample, return smallest sample's brightness
// else if curSensor greater than largest sample, return largest sample's brightness
// else find the two samples that bracket curSensor and return linear interpolation of their brightness values
Keep up the good work. I know you'll figure this one out for the benefit of all.
I Love my SkyView! -can't wait for the touchscreen...
-Jim