Index: src/mlx/acft.py
===================================================================
--- src/mlx/acft.py	(revision 191)
+++ src/mlx/acft.py	(revision 197)
@@ -12,4 +12,29 @@
 import traceback
 
+from collections import deque
+
+#---------------------------------------------------------------------------------------
+
+class SmoothedValue(object):
+    """A smoothed value."""
+    def __init__(self):
+        """Construct the value."""
+        self._deque = deque()
+        self._sum = 0
+
+    def add(self, length, value):
+        """Add the given value and smooth with the given length."""
+        dequeLength = len(self._deque)
+        while dequeLength>=length:
+            self._sum -= self._deque.popleft()
+            dequeLength -= 1
+
+        self._sum += value
+        self._deque.append(value)
+
+    def get(self):
+        """Get the average."""
+        return self._sum / len(self._deque)
+        
 #---------------------------------------------------------------------------------------
 
@@ -36,4 +61,5 @@
         self._checkers = []
 
+        config = flight.config
         # Loggers
 
@@ -58,5 +84,5 @@
         self._checkers.append(checks.SpoilerLogger())
 
-        if flight.config.isMessageTypeFS(const.MESSAGETYPE_VISIBILITY):
+        if config.isMessageTypeFS(const.MESSAGETYPE_VISIBILITY):
             self._checkers.append(checks.VisibilityChecker())
 
@@ -66,5 +92,5 @@
         # queried from it, so the model should have a reference to the GUI as
         # well and access such data via the GUI!
-        if flight.config.onlineACARS and not flight.entranceExam:
+        if config.onlineACARS and not flight.entranceExam:
             self._checkers.append(checks.ACARSSender(flight._gui))
 
@@ -93,5 +119,8 @@
         self._checkers.append(checks.SpeedChecker())
         self._checkers.append(checks.VSChecker())
-        self._checkers.append(checks.OverspeedChecker())
+
+        timeout = 5.0 + config.realIASSmoothingLength - 1
+        self._checkers.append(checks.OverspeedChecker(timeout = timeout))
+                              
         self._checkers.append(checks.StallChecker())
 
@@ -99,4 +128,7 @@
         
         self._checkers.append(checks.ReverserChecker())
+
+        self._smoothedIAS = SmoothedValue()
+        self._smoothedVS = SmoothedValue()
 
     @property
@@ -132,5 +164,17 @@
 
     def handleState(self, aircraftState):
-        """Called when the state of the aircraft changes."""
+        """Called when the state of the aircraft changes.
+
+        This is the function that the simulator calls directly with the new
+        state."""
+        config = self._flight.config
+
+        self._smoothedIAS.add(config.realIASSmoothingLength, aircraftState.ias)
+        aircraftState.smoothedIAS = self._smoothedIAS.get()
+
+        print "handleState, realVSSmoothingLength:", config.realVSSmoothingLength
+        self._smoothedVS.add(config.realVSSmoothingLength, aircraftState.vs)
+        aircraftState.smoothedVS = self._smoothedVS.get()
+        
         for checker in self._checkers:
             try:
@@ -753,2 +797,51 @@
 
 #---------------------------------------------------------------------------------------
+
+if __name__ == "__main__":
+    value = SmoothedValue()
+
+    print "Adding 1, 12.0"
+    value.add(1, 12.0)
+    print value.get()
+
+    print "Adding 1, 15.0"
+    value.add(1, 15.0)
+    print value.get()
+
+    print "Adding 2, 18.0"
+    value.add(2, 18.0)
+    print value.get()
+
+    print "Adding 2, 20.0"
+    value.add(2, 20.0)
+    print value.get()
+
+    print "Adding 5, 22.0"
+    value.add(5, 22.0)
+    print value.get()
+
+    print "Adding 5, 25.0"
+    value.add(5, 25.0)
+    print value.get()
+
+    print "Adding 5, 29.0"
+    value.add(5, 29.0)
+    print value.get()
+
+    print "Adding 5, 21.0"
+    value.add(5, 21.0)
+    print value.get()
+
+    print "Adding 5, 26.0"
+    value.add(5, 26.0)
+    print value.get()
+
+    print "Adding 2, 30.0"
+    value.add(2, 30.0)
+    print value.get()
+
+    print "Adding 2, 55.0"
+    value.add(2, 55.0)
+    print value.get()
+
+#---------------------------------------------------------------------------------------
Index: src/mlx/checks.py
===================================================================
--- src/mlx/checks.py	(revision 192)
+++ src/mlx/checks.py	(revision 197)
@@ -619,5 +619,5 @@
         """Check if the fault condition holds."""
         speedLimit = aircraft.getFlapsSpeedLimit(state.flapsSet)
-        return speedLimit is not None and state.ias>speedLimit
+        return speedLimit is not None and state.smoothedIAS>speedLimit
 
     def logFault(self, flight, aircraft, logger, oldState, state):
@@ -649,5 +649,5 @@
     def isCondition(self, flight, aircraft, oldState, state):
         """Check if the fault condition holds."""
-        return state.gearsDown and state.ias>aircraft.gearSpeedLimit
+        return state.gearsDown and state.smoothedIAS>aircraft.gearSpeedLimit
 
     def logFault(self, flight, aircraft, logger, oldState, state):
@@ -803,7 +803,7 @@
 class OverspeedChecker(PatientFaultChecker):
     """Check if Vne has been exceeded."""
-    def __init__(self):
+    def __init__(self, timeout = 5.0):
         """Construct the checker."""
-        super(OverspeedChecker, self).__init__(timeout = 5.0)
+        super(OverspeedChecker, self).__init__(timeout = timeout)
 
     def isCondition(self, flight, aircraft, oldState, state):
@@ -974,5 +974,5 @@
     def isCondition(self, flight, aircraft, oldState, state):
         """Check if the fault condition holds."""
-        vs = state.vs
+        vs = state.smoothedVS
         altitude = state.altitude
         return vs < -8000 or vs > 8000 or \
@@ -988,5 +988,5 @@
     def logFault(self, flight, aircraft, logger, oldState, state):
         """Log the fault."""
-        vs = state.vs
+        vs = state.smoothedVS
 
         message = "Vertical speed was %.0f feet/min" % (vs,)
Index: src/mlx/config.py
===================================================================
--- src/mlx/config.py	(revision 183)
+++ src/mlx/config.py	(revision 197)
@@ -126,4 +126,6 @@
         self._syncFSTime = False
         self._usingFS2Crew = False
+        self._iasSmoothingLength = -2
+        self._vsSmoothingLength = -2
 
         self._pirepDirectory = None
@@ -273,4 +275,46 @@
         if usingFS2Crew!=self._usingFS2Crew:
             self._usingFS2Crew = usingFS2Crew
+            self._modified = True
+
+    @property
+    def iasSmoothingLength(self):
+        """Get the number of samples over which the IAS is averaged for the
+        smoothed IAS calculation. It may be negative, in which case smoothing
+        is disabled, but we nevertheless store the number of seconds in case it
+        may become useful later."""
+        return self._iasSmoothingLength
+
+    @property
+    def realIASSmoothingLength(self):
+        """Get the real smoothing length of IAS."""
+        return max(self._iasSmoothingLength, 1)
+
+    @iasSmoothingLength.setter
+    def iasSmoothingLength(self, iasSmoothingLength):
+        """Set the number of samples over which the IAS is averaged for the
+        smoothed IAS calculation."""
+        if iasSmoothingLength!=self._iasSmoothingLength:
+            self._iasSmoothingLength = iasSmoothingLength
+            self._modified = True
+
+    @property
+    def vsSmoothingLength(self):
+        """Get the number of samples over which the VS is averaged for the
+        smoothed VS calculation. It may be negative, in which case smoothing
+        is disabled, but we nevertheless store the number of seconds in case it
+        may become useful later."""
+        return self._vsSmoothingLength
+
+    @property
+    def realVSSmoothingLength(self):
+        """Get the real smoothing length of VS."""
+        return max(self._vsSmoothingLength, 1)
+
+    @vsSmoothingLength.setter
+    def vsSmoothingLength(self, vsSmoothingLength):
+        """Set the number of samples over which the VS is averaged for the
+        smoothed VS calculation."""
+        if vsSmoothingLength!=self._vsSmoothingLength:
+            self._vsSmoothingLength = vsSmoothingLength
             self._modified = True
 
@@ -455,4 +499,10 @@
                                               "usingFS2Crew",
                                               False)
+        self._iasSmoothingLength = int(self._get(config, "general",
+                                                 "iasSmoothingLength",
+                                                 -2))
+        self._vsSmoothingLength = int(self._get(config, "general",
+                                                "vsSmoothingLength",
+                                                -2))
         self._pirepDirectory = self._get(config, "general",
                                          "pirepDirectory", None)
@@ -517,4 +567,8 @@
         config.set("general", "usingFS2Crew",
                    "yes" if self._usingFS2Crew else "no")
+        config.set("general", "iasSmoothingLength",
+                   str(self._iasSmoothingLength))
+        config.set("general", "vsSmoothingLength",
+                   str(self._vsSmoothingLength))
 
         if self._pirepDirectory is not None:
Index: src/mlx/const.py
===================================================================
--- src/mlx/const.py	(revision 191)
+++ src/mlx/const.py	(revision 197)
@@ -4,5 +4,5 @@
 
 # The version of the program
-VERSION="0.1"
+VERSION="0.2"
 
 #-------------------------------------------------------------------------------
Index: src/mlx/fs.py
===================================================================
--- src/mlx/fs.py	(revision 170)
+++ src/mlx/fs.py	(revision 197)
@@ -173,8 +173,10 @@
     - bank: the bank of the aircraft in degrees. Positive means bank left,
     negative means bank right (float)
-    - ias: the indicated airspeed in knots (float)    
+    - ias: the indicated airspeed in knots (float)
+    - smoothedIAS: the smoothed IAS in knots (float)
     - mach: the airspeed in mach (float)    
     - groundSpeed: the ground speed (float)
     - vs: the vertical speed in feet/minutes (float)
+    - smoothedVS: the smoothed VS in feet/minutes (float)
     - radioAltitude: the radio altitude of the aircraft in feet (float)
     - altitude: the altitude of the aircraft in feet (float)
Index: src/mlx/gui/monitor.py
===================================================================
--- src/mlx/gui/monitor.py	(revision 89)
+++ src/mlx/gui/monitor.py	(revision 197)
@@ -72,9 +72,9 @@
         table.attach(self._bank, 9, 10, 1, 2)
 
-        (label, self._vs) = self._createLabeledEntry("VS:", 5)
+        (label, self._vs) = self._createLabeledEntry("VS:", 13)
         table.attach(label, 10, 11, 1, 2)
         table.attach(self._vs, 11, 12, 1, 2)
 
-        (label, self._ias) = self._createLabeledEntry("IAS:", 4)
+        (label, self._ias) = self._createLabeledEntry("IAS:", 11)
         table.attach(label, 0, 1, 2, 3)
         table.attach(self._ias, 1, 2, 2, 3)
@@ -259,6 +259,8 @@
             self._pitch.set_text("%.0f" % (aircraftState.pitch,))
             self._bank.set_text("%.0f" % (aircraftState.bank,))
-            self._vs.set_text("%.0f" % (aircraftState.vs,))
-            self._ias.set_text("%.0f" % (aircraftState.ias,))
+            self._vs.set_text("%.0f (%.0f)" % (aircraftState.vs,
+                                               aircraftState.smoothedVS))
+            self._ias.set_text("%.0f (%.0f)" % (aircraftState.ias,
+                                                aircraftState.smoothedIAS))
             self._mach.set_text("%.2f" % (aircraftState.mach,))
             self._groundSpeed.set_text("%.0f" % (aircraftState.groundSpeed,))
Index: src/mlx/gui/prefs.py
===================================================================
--- src/mlx/gui/prefs.py	(revision 186)
+++ src/mlx/gui/prefs.py	(revision 197)
@@ -229,4 +229,9 @@
         self._syncFSTime.set_active(config.syncFSTime)
         self._usingFS2Crew.set_active(config.usingFS2Crew)
+        
+        self._setSmoothing(self._iasSmoothingEnabled, self._iasSmoothingLength,
+                           config.iasSmoothingLength)
+        self._setSmoothing(self._vsSmoothingEnabled, self._vsSmoothingLength,
+                           config.vsSmoothingLength)
 
         pirepDirectory = config.pirepDirectory
@@ -269,4 +274,8 @@
         config.syncFSTime = self._syncFSTime.get_active()
         config.usingFS2Crew = self._usingFS2Crew.get_active()
+        config.iasSmoothingLength = self._getSmoothing(self._iasSmoothingEnabled,
+                                                       self._iasSmoothingLength)
+        config.vsSmoothingLength = self._getSmoothing(self._vsSmoothingEnabled,
+                                                       self._vsSmoothingLength)
         config.pirepDirectory = text2unicode(self._pirepDirectory.get_text())
 
@@ -366,4 +375,16 @@
         self._usingFS2Crew.set_tooltip_text(xstr("prefs_usingFS2Crew_tooltip"))
         simulatorBox.pack_start(self._usingFS2Crew, False, False, 4)
+        
+        (iasSmoothingBox, self._iasSmoothingEnabled,
+         self._iasSmoothingLength) = \
+           self._createSmoothingBox(xstr("prefs_iasSmoothingEnabled"),
+                                    xstr("prefs_iasSmoothingEnabledTooltip"))
+        simulatorBox.pack_start(iasSmoothingBox, False, False, 4)
+
+        (vsSmoothingBox, self._vsSmoothingEnabled,
+         self._vsSmoothingLength) = \
+           self._createSmoothingBox(xstr("prefs_vsSmoothingEnabled"),
+                                    xstr("prefs_vsSmoothingEnabledTooltip"))
+        simulatorBox.pack_start(vsSmoothingBox, False, False, 4)
 
         pirepBox = gtk.HBox()
@@ -401,4 +422,33 @@
 
         return vbox
+
+    def _createSmoothingBox(self, checkBoxLabel, checkBoxTooltip,
+                            maxSeconds = 10):
+        """Create a HBox that contains entry fields for smoothing some value."""
+        smoothingBox = gtk.HBox()
+
+        smoothingEnabled = gtk.CheckButton(checkBoxLabel)
+        smoothingEnabled.set_use_underline(True)
+        smoothingEnabled.set_tooltip_text(checkBoxTooltip)
+
+        smoothingBox.pack_start(smoothingEnabled, False, False, 0)
+
+        smoothingLength = gtk.SpinButton()
+        smoothingLength.set_numeric(True)
+        smoothingLength.set_range(2, maxSeconds)
+        smoothingLength.set_increments(1, 1)
+        smoothingLength.set_alignment(1.0)
+        smoothingLength.set_width_chars(2)
+
+        smoothingBox.pack_start(smoothingLength, False, False, 0)
+
+        smoothingBox.pack_start(gtk.Label(xstr("prefs_smoothing_seconds")),
+                                False, False, 4)
+
+        smoothingEnabled.connect("toggled", self._smoothingToggled,
+                                 smoothingLength)
+        smoothingLength.set_sensitive(False)
+
+        return (smoothingBox, smoothingEnabled, smoothingLength)
 
     def _setLanguage(self, language):
@@ -434,5 +484,30 @@
             dialog.hide()
             self._warnedRestartNeeded = True
-       
+
+    def _smoothingToggled(self, smoothingEnabled, smoothingLength):
+        """Called when a smoothing enabled check box is toggled."""
+        sensitive = smoothingEnabled.get_active()
+        smoothingLength.set_sensitive(sensitive)
+        if sensitive:
+            smoothingLength.grab_focus()
+
+    def _setSmoothing(self, smoothingEnabled, smoothingLength, smoothing):
+        """Set the smoothing controls from the given value.
+
+        If the value is less than 2, smoothing is disabled. The smoothing
+        length is the absolute value of the value."""
+        smoothingEnabled.set_active(smoothing>=2)
+        smoothingLength.set_value(abs(smoothing))
+        
+    def _getSmoothing(self, smoothingEnabled, smoothingLength):
+        """Get the smoothing value from the given controls.
+
+        The returned value is the value of smoothingLength multiplied by -1, if
+        smoothing is disabled."""
+        value = smoothingLength.get_value_as_int()
+        if not smoothingEnabled.get_active():
+            value *= -1
+        return value
+        
     def _pirepDirectoryButtonClicked(self, button):
         """Called when the PIREP directory button is clicked."""
Index: src/mlx/i18n.py
===================================================================
--- src/mlx/i18n.py	(revision 195)
+++ src/mlx/i18n.py	(revision 197)
@@ -662,4 +662,17 @@
                  "If this is checked, the logger will take into account, "
                  "that you are using the FS2Crew addon.")
+        self.add("prefs_iasSmoothingEnabled",
+                 "Enable the smoothing of _IAS over ")
+        self.add("prefs_iasSmoothingEnabledTooltip",
+                 "If enabled, the IAS value will be averaged over the "
+                 "given number of seconds, and in some checks "
+                 "this averaged value will be considered.")
+        self.add("prefs_vsSmoothingEnabled",
+                 "Enable the smoothing of _VS over ")
+        self.add("prefs_vsSmoothingEnabledTooltip",
+                 "If enabled, the VS value will be averaged over the "
+                 "given number of seconds, and in some checks "
+                 "this averaged value will be considered.")
+        self.add("prefs_smoothing_seconds", "sec.")
         self.add("prefs_pirepDirectory",
                  "_PIREP directory:")
