diff --git a/html/config.js b/html/config.js
index 2e07e4e..0d1770c 100644
--- a/html/config.js
+++ b/html/config.js
@@ -154,6 +154,8 @@ BingMapsAPIKey = null;
// positionFilterGsFactor = 1.8;
// debugPosFilter = false; // draw red dots for filtered positions
+// altitudeFilter = true;
+
// time in seconds before an MLAT position is accepted after receiving a
// more reliable position
//mlatTimeout = 30;
diff --git a/html/defaults.js b/html/defaults.js
index d3d3460..d637f73 100644
--- a/html/defaults.js
+++ b/html/defaults.js
@@ -184,6 +184,8 @@ var positionFilterSpeed = 2.5; // in Mach
var positionFilterGsFactor = 1.8;
var debugPosFilter = false;
+var altitudeFilter = true;
+
// time in seconds before an MLAT position is accepted after receiving a
// more reliable position
var mlatTimeout = 30;
diff --git a/html/planeObject.js b/html/planeObject.js
index 72e0f0e..32977ec 100644
--- a/html/planeObject.js
+++ b/html/planeObject.js
@@ -774,7 +774,7 @@ PlaneObject.prototype.updateData = function(now, last, data, init) {
else if (data.baro_rate != null)
max_fpm = 1.3*Math.abs(data.baro_rate) + 2000;
- if (this.altitude == null || altitude == "ground" || this.altitude == "ground") {
+ if (altitude != null && (!altitudeFilter || this.altitude == null || altitude == "ground" || this.altitude == "ground")) {
this.altitude = altitude;
this.altitudeTime = now;
} else if (altitude != null && altitude != this.bad_alt