Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function drawDensityPixel(
if (Math.round(patternValue % patternIndex) === 0) {
return color;
}
return [4, 4, 5, 0];
return [0, 0, 0, 0];
}

export function renderNormalMode(
Expand Down Expand Up @@ -143,24 +143,24 @@ export function renderNormalMode(
elevation >= absoluteCutOffAltitude
) {
if (elevation >= warningThresholds[2]) {
return drawDensityPixel(patternMapValue, 5, [255, 0, 0, 255]);
return drawDensityPixel(patternMapValue, 5, [194, 29, 26, 255]);
}
if (elevation >= warningThresholds[1]) {
return drawDensityPixel(patternMapValue, 5, [255, 255, 50, 255]);
return drawDensityPixel(patternMapValue, 5, [245, 200, 79, 255]);
}
if (elevation >= greenThresholds[1] && elevation < warningThresholds[0]) {
return drawDensityPixel(patternMapValue, 5, [0, 255, 0, 255]);
return drawDensityPixel(patternMapValue, 5, [100, 218, 29, 255]);
}
if (elevation >= warningThresholds[0] && elevation < warningThresholds[1]) {
return drawDensityPixel(patternMapValue, 3, [255, 255, 50, 255]);
return drawDensityPixel(patternMapValue, 3, [245, 200, 79, 255]);
}
if (elevation >= greenThresholds[0] && elevation < greenThresholds[1]) {
return drawDensityPixel(patternMapValue, 3, [0, 255, 0, 255]);
return drawDensityPixel(patternMapValue, 3, [100, 218, 29, 255]);
}
} else if (elevation === this.constants.waterElevation) {
return drawDensityPixel(patternMapValue, 7, [0, 255, 255, 255]);
return drawDensityPixel(patternMapValue, 7, [68, 217, 225, 255]);
} else if (elevation === this.constants.unknownElevation) {
return drawDensityPixel(patternMapValue, 5, [255, 148, 255, 255]);
return drawDensityPixel(patternMapValue, 5, [200, 127, 218, 255]);
}

return [0, 0, 0, 255];
Expand Down Expand Up @@ -213,18 +213,18 @@ export function renderPeaksMode(
) {
if (thresholds[2] <= elevation) {
// solid threshold
return [0, 255, 0, 255];
return [100, 218, 29, 255];
}
if (thresholds[1] <= elevation) {
return drawDensityPixel(patternMapValue, 5, [0, 255, 0, 255]);
return drawDensityPixel(patternMapValue, 5, [100, 218, 29, 255]);
}
if (thresholds[0] <= elevation) {
return drawDensityPixel(patternMapValue, 3, [0, 255, 0, 255]);
return drawDensityPixel(patternMapValue, 3, [100, 218, 29, 255]);
}
} else if (elevation === this.constants.waterElevation) {
return drawDensityPixel(patternMapValue, 7, [0, 255, 255, 255]);
return drawDensityPixel(patternMapValue, 7, [68, 217, 225, 255]);
} else if (elevation === this.constants.unknownElevation) {
return drawDensityPixel(patternMapValue, 5, [255, 148, 255, 255]);
return drawDensityPixel(patternMapValue, 5, [200, 127, 218, 255]);
}

return [0, 0, 0, 255];
Expand Down Expand Up @@ -332,7 +332,7 @@ export function renderNavigationDisplay(

// the pixel is disabled at all or the areas are clipped. Be sure not to overdraw the metadata line though
if (patternValue === 0 && this.thread.y !== height) {
return [4, 4, 5, 0][colorChannel];
return [0, 0, 0, 0][colorChannel];
}

if (maxElevation >= referenceAltitude - gearDownAltitudeOffset) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function renderVerticalDisplay(

const elevation = elevationProfile[pixelX];
if (elevation === this.constants.invalidElevation || elevation === this.constants.unknownElevation) {
return [255, 148, 255, 255][colorChannel];
return [200, 127, 218, 255][colorChannel];
}

const stepY = (maximumAltitude - minimumAltitude) / this.constants.maxImageHeight;
Expand All @@ -25,7 +25,7 @@ export function renderVerticalDisplay(
// altitude is above the elevation -> draw the background
if (altitude > elevation) {
if (greyBackgroundFromX >= 0 && pixelX >= greyBackgroundFromX) {
return [78, 78, 97, 255][colorChannel];
return [50, 49, 53, 255][colorChannel];
} else {
return [0, 0, 0, 0][colorChannel];
}
Expand All @@ -34,11 +34,11 @@ export function renderVerticalDisplay(
// elevation is water -> check if we draw the water until 0
if (elevation === this.constants.waterElevation) {
if (altitude <= 0) {
return [0, 255, 255, 255][colorChannel];
return [68, 217, 225, 255][colorChannel];
}
return [0, 0, 0, 0][colorChannel];
}

// draw the obstacle
return [110, 51, 14, 255][colorChannel];
return [82, 43, 18, 255][colorChannel];
}