diff --git a/public_html/config.js b/public_html/config.js
index 969998c..505d516 100644
--- a/public_html/config.js
+++ b/public_html/config.js
@@ -76,7 +76,10 @@ ColorByAlt = {
selected : { h: 0, s: -10, l: +20 },
// Changes added to the color of planes that have stale position info
- stale : { h: 0, s: -10, l: +30 }
+ stale : { h: 0, s: -10, l: +30 },
+
+ // Changes added to the color of planes that have positions from mlat
+ mlat : { h: 0, s: -10, l: -10 }
};
// For a monochrome display try this:
@@ -86,8 +89,14 @@ ColorByAlt = {
// air : { h: [ { alt: 0, val: 0 } ], s: 0, l: 50 },
// selected : { h: 0, s: 0, l: +30 },
// stale : { h: 0, s: 0, l: +30 }
+// mlat : { h: 0, s: 0, l: -10 }
// };
+// Outline color for aircraft icons with an ADS-B position
+OutlineADSBColor = '#000000';
+
+// Outline color for aircraft icons with a mlat position
+OutlineMlatColor = '#4040FF';
SiteCircles = true; // true to show circles (only shown if the center marker is shown)
// In nautical miles or km (depending settings value 'Metric')
diff --git a/public_html/planeObject.js b/public_html/planeObject.js
index 2ea62df..bc717ee 100644
--- a/public_html/planeObject.js
+++ b/public_html/planeObject.js
@@ -36,8 +36,7 @@ function PlaneObject(icao) {
// Display info
this.visible = true;
this.marker = null;
- this.icon = { type: 'generic',
- fillOpacity: 0.9 };
+ this.icon = { type: 'generic' };
// request metadata
this.registration = null;
@@ -233,6 +232,13 @@ PlaneObject.prototype.getMarkerColor = function() {
l += ColorByAlt.selected.l;
}
+ // If this marker is a mlat position, change color
+ if (this.position_from_mlat) {
+ h += ColorByAlt.mlat.h;
+ s += ColorByAlt.mlat.s;
+ l += ColorByAlt.mlat.l;
+ }
+
if (h < 0) {
h = (h % 360) + 360;
} else if (h >= 360) {
@@ -250,15 +256,19 @@ PlaneObject.prototype.getMarkerColor = function() {
PlaneObject.prototype.updateIcon = function() {
var col = this.getMarkerColor();
+ var opacity = (this.position_from_mlat ? 0.75 : 1.0);
+ var outline = (this.position_from_mlat ? OutlineMlatColor : OutlineADSBColor);
var type = this.getMarkerIconType();
var weight = this.selected ? 2 : 1;
var rotation = (this.track === null ? 0 : this.track);
- if (col === this.icon.fillColor && weight === this.icon.strokeWeight && rotation === this.icon.rotation && type == this.icon.type)
+ if (col === this.icon.fillColor && opacity == this.icon.fillOpacity && weight === this.icon.strokeWeight && outline == this.icon.strokeColor && rotation === this.icon.rotation && type == this.icon.type)
return false; // no changes
- this.icon.fillColor = col;
+ this.icon.fillColor = col;
+ this.icon.fillOpacity = opacity;
this.icon.strokeWeight = weight;
+ this.icon.strokeColor = outline;
this.icon.rotation = rotation;
this.icon.type = type;
this.icon.path = MarkerIcons[type].path;