|
|
|
@@ -602,7 +602,7 @@ function drawScales(ifDirty = false) { |
|
|
|
ctx.fill(); |
|
|
|
|
|
|
|
|
|
|
|
if (config.drawYAxis || config.drawAltitudes) { |
|
|
|
if (config.drawYAxis || config.drawAltitudes !== "none") { |
|
|
|
drawVerticalScale(ifDirty); |
|
|
|
} |
|
|
|
if (config.drawXAxis) { |
|
|
|
@@ -728,22 +728,39 @@ function drawVerticalScale(ifDirty = false) { |
|
|
|
drawTicks(ctx, pixelsPer, heightPer); |
|
|
|
} |
|
|
|
|
|
|
|
if (config.drawAltitudes) { |
|
|
|
if (config.drawAltitudes == "atmosphere" || config.drawAltitudes == "all") { |
|
|
|
drawAltitudeLine(ctx, math.unit(8, "km"), "Troposphere"); |
|
|
|
drawAltitudeLine(ctx, math.unit(50, "km"), "Stratosphere"); |
|
|
|
drawAltitudeLine(ctx, math.unit(85, "km"), "Mesosphere"); |
|
|
|
drawAltitudeLine(ctx, math.unit(675, "km"), "Thermosphere"); |
|
|
|
drawAltitudeLine(ctx, math.unit(10000, "km"), "Exosphere"); |
|
|
|
} |
|
|
|
|
|
|
|
if (config.drawAltitudes == "orbits" || config.drawAltitudes == "all") { |
|
|
|
drawAltitudeLine(ctx, math.unit(7, "miles"), "Cruising Altitude"); |
|
|
|
drawAltitudeLine(ctx, math.unit(211.3, "miles"), "Space Station"); |
|
|
|
drawAltitudeLine(ctx, math.unit(369.7, "miles"), "Hubble Telescope"); |
|
|
|
drawAltitudeLine(ctx, math.unit(1500, "km"), "Low Earth Orbit"); |
|
|
|
drawAltitudeLine(ctx, math.unit(20350, "km"), "GPS Satellites"); |
|
|
|
drawAltitudeLine(ctx, math.unit(35786, "km"), "Geosynchronous Orbit"); |
|
|
|
drawAltitudeLine(ctx, math.unit(238900, "miles"), "Lunar Orbit"); |
|
|
|
drawAltitudeLine(ctx, math.unit(7, "miles"), "Cruising Altitude"); |
|
|
|
} |
|
|
|
|
|
|
|
if (config.drawAltitudes == "weather" || config.drawAltitudes == "all") { |
|
|
|
drawAltitudeLine(ctx, math.unit(1000, "meters"), "Low-level Clouds"); |
|
|
|
drawAltitudeLine(ctx, math.unit(3000, "meters"), "Mid-level Clouds"); |
|
|
|
} |
|
|
|
|
|
|
|
if (config.drawAltitudes == "water" || config.drawAltitudes == "all") { |
|
|
|
drawAltitudeLine(ctx, math.unit(12100, "feet"), "Average Ocean Depth"); |
|
|
|
drawAltitudeLine(ctx, math.unit(8376, "meters"), "Milkwaukee Deep"); |
|
|
|
drawAltitudeLine(ctx, math.unit(10984, "meters"), "Challenger Deep"); |
|
|
|
drawAltitudeLine(ctx, math.unit(5550, "meters"), "Molloy Deep"); |
|
|
|
drawAltitudeLine(ctx, math.unit(7290, "meters"), "Sunda Deep"); |
|
|
|
drawAltitudeLine(ctx, math.unit(592, "meters"), "Crater Lake"); |
|
|
|
drawAltitudeLine(ctx, math.unit(7.5, "meters"), "Littoral Zone"); |
|
|
|
drawAltitudeLine(ctx, math.unit(140, "meters"), "Continental Shelf"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// this is a lot of copypizza... |
|
|
|
@@ -2034,8 +2051,16 @@ const settingsData = { |
|
|
|
"show-altitudes": { |
|
|
|
name: "Show Altitudes", |
|
|
|
desc: "Draw interesting altitudes", |
|
|
|
type: "toggle", |
|
|
|
default: true, |
|
|
|
type: "select", |
|
|
|
default: "none", |
|
|
|
options: [ |
|
|
|
"none", |
|
|
|
"all", |
|
|
|
"atmosphere", |
|
|
|
"orbits", |
|
|
|
"weather", |
|
|
|
"water" |
|
|
|
], |
|
|
|
get value() { |
|
|
|
return config.drawAltitudes; |
|
|
|
}, |
|
|
|
|