fe-map: speeds stated against cruise speed; American spelling
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ The search runs in two stages, mirrored by the page's live solver:
|
|||||||
1. least squares on every flight's relative error (smooth, finds the overall shape);
|
1. least squares on every flight's relative error (smooth, finds the overall shape);
|
||||||
2. reweighted pseudo-L1 on the amount by which each measurement falls outside its band, so the
|
2. reweighted pseudo-L1 on the amount by which each measurement falls outside its band, so the
|
||||||
solver gives up on as few measurements as it can rather than straining many (an approximation
|
solver gives up on as few measurements as it can rather than straining many (an approximation
|
||||||
to minimising the number broken).
|
to minimizing the number broken).
|
||||||
"""
|
"""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from scipy.optimize import minimize
|
from scipy.optimize import minimize
|
||||||
|
|||||||
+15
-15
@@ -7,7 +7,7 @@
|
|||||||
<meta name="description" content="219 cities, 1,344 timed flights and 7,084 measured limits laid out on a plane by a solver that keeps as many measurements as it can. The plane cannot close the southern routes; released into 3D, the same data closes into a ball.">
|
<meta name="description" content="219 cities, 1,344 timed flights and 7,084 measured limits laid out on a plane by a solver that keeps as many measurements as it can. The plane cannot close the southern routes; released into 3D, the same data closes into a ball.">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:title" content="The Best Flat Map">
|
<meta property="og:title" content="The Best Flat Map">
|
||||||
<meta property="og:description" content="Every measured flight, ping, rail line and satellite pass on one plane. Best of 311 starts: Auckland–Santiago would need its aircraft at 2.07× its top speed.">
|
<meta property="og:description" content="Every measured flight, ping, rail line and satellite pass on one plane. Best of 311 starts: Auckland–Santiago would need its aircraft at 2.07× its cruise speed.">
|
||||||
<meta property="og:url" content="https://fe-map.aethercosmology.com/">
|
<meta property="og:url" content="https://fe-map.aethercosmology.com/">
|
||||||
<meta property="og:image" content="https://fe-map.aethercosmology.com/og.png">
|
<meta property="og:image" content="https://fe-map.aethercosmology.com/og.png">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
@@ -147,7 +147,7 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<section class="wrap intro">
|
<section class="wrap intro">
|
||||||
<p><b>Rule.</b> The surface is a plane. Each of the 219 cities may sit anywhere on it. No latitude, longitude, radius, projection or spherical formula enters the solver.</p>
|
<p><b>Rule.</b> The surface is a plane. Each of the 219 cities may sit anywhere on it. No latitude, longitude, radius, projection or spherical formula enters the solver.</p>
|
||||||
<p><b>Measurements.</b> Flight times give lengths: 1,344 routes, cruise speed × time in the air, both directions. Pings (6,958), rail and road lengths (70) and satellite passes (56) give limits: no farther apart than this.</p>
|
<p><b>Measurements.</b> Flight times give lengths: 1,344 routes, cruise speed × time in the air, both directions. Pings (6,958), rail and road lengths (70) and satellite passes (56) give limits: no farther apart than this.</p>
|
||||||
<p><b>Tolerance.</b> A flight holds between 75% and 110% of its length. Shorter means a route over a third longer than the straight line; longer means an aircraft above its top speed the whole way.</p>
|
<p><b>Tolerance.</b> A flight holds between 75% and 110% of its length. Shorter means a route over a third longer than the straight line; longer means an aircraft averaging more than 110% of its cruise speed for the whole flight.</p>
|
||||||
<p><b>Solver.</b> The page opens on a starting flat map as drawn. <i>Solve</i> moves the cities to keep as many measurements as it can and marks the rest <span class="k-bad">red</span> (faster than possible) or <span class="k-warn">amber</span> (far off the straight line). Coastlines follow the cities like a rubber sheet.</p>
|
<p><b>Solver.</b> The page opens on a starting flat map as drawn. <i>Solve</i> moves the cities to keep as many measurements as it can and marks the rest <span class="k-bad">red</span> (faster than possible) or <span class="k-warn">amber</span> (far off the straight line). Coastlines follow the cities like a rubber sheet.</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -155,8 +155,8 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<div class="wrap barin">
|
<div class="wrap barin">
|
||||||
<span class="rowlab">Start from</span>
|
<span class="rowlab">Start from</span>
|
||||||
<div class="seg" role="group" aria-label="Starting map" id="starts">
|
<div class="seg" role="group" aria-label="Starting map" id="starts">
|
||||||
<button type="button" data-start="ae" aria-pressed="true" title="Azimuthal equidistant map centred on the North Pole">North-pole AE</button>
|
<button type="button" data-start="ae" aria-pressed="true" title="Azimuthal equidistant map centered on the North Pole">North-pole AE</button>
|
||||||
<button type="button" data-start="dp" aria-pressed="false" title="Azimuthal equidistant map centred on 0° N 0° E">Dual-pole AE</button>
|
<button type="button" data-start="dp" aria-pressed="false" title="Azimuthal equidistant map centered on 0° N 0° E">Dual-pole AE</button>
|
||||||
<button type="button" data-start="mds" aria-pressed="false" title="No existing map: the cities laid out from the flight times alone">No map</button>
|
<button type="button" data-start="mds" aria-pressed="false" title="No existing map: the cities laid out from the flight times alone">No map</button>
|
||||||
<button type="button" data-start="best" aria-pressed="false" title="The best layout found offline from 311 starting maps">Best of 311</button>
|
<button type="button" data-start="best" aria-pressed="false" title="The best layout found offline from 311 starting maps">Best of 311</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -177,8 +177,8 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<label class="rng" for="hi">to <input type="range" id="hi" min="100" max="150" step="5" value="110"><output id="hiv">110%</output></label>
|
<label class="rng" for="hi">to <input type="range" id="hi" min="100" max="150" step="5" value="110"><output id="hiv">110%</output></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="seg" role="group" aria-label="Signal speed for pings" id="light">
|
<div class="seg" role="group" aria-label="Signal speed for pings" id="light">
|
||||||
<button type="button" data-v="glass" aria-pressed="true" title="Pings travel at the speed of light in optical fibre">Pings at fibre speed</button>
|
<button type="button" data-v="glass" aria-pressed="true" title="Pings travel at the speed of light in optical fiber">Pings at fiber speed</button>
|
||||||
<button type="button" data-v="vacuum" aria-pressed="false" title="Pings travel at the speed of light in vacuum (hollow-core fibre or better)">Pings at vacuum speed</button>
|
<button type="button" data-v="vacuum" aria-pressed="false" title="Pings travel at the speed of light in vacuum (hollow-core fiber or better)">Pings at vacuum speed</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -219,7 +219,7 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<dl class="ro">
|
<dl class="ro">
|
||||||
<div><dt>Broken</dt><dd id="r3b">–</dd></div>
|
<div><dt>Broken</dt><dd id="r3b">–</dd></div>
|
||||||
<div><dt>Stage</dt><dd id="r3s">–</dd></div>
|
<div><dt>Stage</dt><dd id="r3s">–</dd></div>
|
||||||
<div><dt>Wraps round its centre</dt><dd id="r3w">–</dd></div>
|
<div><dt>Wraps around its center</dt><dd id="r3w">–</dd></div>
|
||||||
<div><dt id="r3rL">Best-fit sphere radius</dt><dd id="r3r">–</dd></div>
|
<div><dt id="r3rL">Best-fit sphere radius</dt><dd id="r3r">–</dd></div>
|
||||||
<div><dt id="r3oL">Median distance off it</dt><dd id="r3o">–</dd></div>
|
<div><dt id="r3oL">Median distance off it</dt><dd id="r3o">–</dd></div>
|
||||||
<div><dt>Broken on the plane</dt><dd id="r3f">–</dd></div>
|
<div><dt>Broken on the plane</dt><dd id="r3f">–</dd></div>
|
||||||
@@ -230,9 +230,9 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
|
|
||||||
<section class="wrap after">
|
<section class="wrap after">
|
||||||
<h2>Result</h2>
|
<h2>Result</h2>
|
||||||
<p>Best of 311 starting maps (North-pole and dual-pole AE, the layout of the flight times alone, and AE maps centred on 308 other points): <b>9 measurements broken</b>. The plane keeps almost the whole northern network, but it cannot close the ring of routes around the southern oceans: Auckland–Santiago ×2.07, Mauritius–Perth ×1.85, Santiago–Sydney ×1.84, Melbourne–Santiago ×1.77, São Paulo–Johannesburg ×1.72, Johannesburg–Perth ×1.64, Johannesburg–Sydney ×1.50, Johannesburg–Singapore ×1.22. Each of those needs its aircraft faster than it can fly. To keep the rest, the plane squeezes 254 flights below 80% of their timed length; on the globe 18 are.</p>
|
<p>Best of 311 starting maps (North-pole and dual-pole AE, the layout of the flight times alone, and AE maps centered on 308 other points): <b>9 measurements broken</b>. The plane keeps almost the whole northern network, but it cannot close the ring of routes around the southern oceans: Auckland–Santiago ×2.07, Mauritius–Perth ×1.85, Santiago–Sydney ×1.84, Melbourne–Santiago ×1.77, São Paulo–Johannesburg ×1.72, Johannesburg–Perth ×1.64, Johannesburg–Sydney ×1.50, Johannesburg–Singapore ×1.22. Each of those needs its aircraft faster than it can fly. To keep the rest, the plane squeezes 254 flights below 80% of their timed length; on the globe 18 are.</p>
|
||||||
<p>On the globe, by the same rules: 1 flight longer than its aircraft can fly (San Salvador–San José, a short hop where the 15-minute allowance for climb and descent is too generous), 0 limits broken, and 8 flights below 75%: detours around closed airspace, indirect airways, and short hops where climb and approach take most of the time (Istanbul–Moscow, Dubai–Baku, Kuala Lumpur–Singapore, Doha–Baku). Surveyed triangles do not depend on the layout: a plane gives every triangle exactly 180°, and 232 of the 935 measured triangles exceed that by more than four times their survey's angle noise (3 on the globe; <a href="https://distance.aethercosmology.com/#triangles">The Triangle Test</a>).</p>
|
<p>On the globe, by the same rules: 1 flight longer than its aircraft can fly (San Salvador–San José, a short hop where the 15-minute allowance for climb and descent is too generous), 0 limits broken, and 8 flights below 75%: detours around closed airspace, indirect airways, and short hops where climb and approach take most of the time (Istanbul–Moscow, Dubai–Baku, Kuala Lumpur–Singapore, Doha–Baku). Surveyed triangles do not depend on the layout: a plane gives every triangle exactly 180°, and 232 of the 935 measured triangles exceed that by more than four times their survey's angle noise (3 on the globe; <a href="https://distance.aethercosmology.com/#triangles">The Triangle Test</a>).</p>
|
||||||
<p>Released into 3D, the same cities and measurements close into a ball. The cities wrap 160° round its centre, with 0 measurements broken. Measured along a sphere instead, with the shape conceded and its size left free (<i>Measure along a sphere</i>, above), the flights fit a sphere of radius 6,452 km with 0 measurements broken, and the cities fall a median 346 km from their true places. Earth's mean radius is 6,371 km; routes flown run slightly longer than the shortest path.</p>
|
<p>Released into 3D, the same cities and measurements close into a ball. The cities wrap 160° around its center, with 0 measurements broken. Measured along a sphere instead, with the shape conceded and its size left free (<i>Measure along a sphere</i>, above), the flights fit a sphere of radius 6,452 km with 0 measurements broken, and the cities fall a median 346 km from their true places. Earth's mean radius is 6,371 km; routes flown run slightly longer than the shortest path.</p>
|
||||||
<h3>Wider tolerances</h3>
|
<h3>Wider tolerances</h3>
|
||||||
<p>The further short a flight may fall, the more of the network the plane can squeeze to make room for the southern routes. It keeps everything once flights may fall to 50% of their timed length, which means routes up to twice as long as its straight lines. That layout has 601 flights below 75% and 285 below 60%. The globe has 8 and 1.</p>
|
<p>The further short a flight may fall, the more of the network the plane can squeeze to make room for the southern routes. It keeps everything once flights may fall to 50% of their timed length, which means routes up to twice as long as its straight lines. That layout has 601 flights below 75% and 285 below 60%. The globe has 8 and 1.</p>
|
||||||
<div class="tw"><table class="res" id="bands"><thead><tr><th scope="col">Flights kept between</th><th scope="col">Plane: too long</th><th scope="col">Plane: too short</th><th scope="col">Plane: limits</th><th scope="col">Plane: below 75%</th><th scope="col">Globe: too long</th><th scope="col">Globe: too short</th><th scope="col">Globe: limits</th></tr></thead><tbody></tbody></table></div>
|
<div class="tw"><table class="res" id="bands"><thead><tr><th scope="col">Flights kept between</th><th scope="col">Plane: too long</th><th scope="col">Plane: too short</th><th scope="col">Plane: limits</th><th scope="col">Plane: below 75%</th><th scope="col">Globe: too long</th><th scope="col">Globe: too short</th><th scope="col">Globe: limits</th></tr></thead><tbody></tbody></table></div>
|
||||||
@@ -242,7 +242,7 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<h2 style="margin-top:14px">Method</h2>
|
<h2 style="margin-top:14px">Method</h2>
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt>Flights</dt><dd>From <a href="https://distance.aethercosmology.com/#sphere">The Measured Sphere</a> ("each flight's own speed"): routes flown both ways, each direction's median time from wheels-off to wheels-on over two weeks (FlightAware), less 15 minutes for climb and descent, times the aircraft type's cruise speed (Mach × 1,062 km/h). Averaging the two directions cancels the wind. Click a city for each route's flights, aircraft and track logs.</dd>
|
<dt>Flights</dt><dd>From <a href="https://distance.aethercosmology.com/#sphere">The Measured Sphere</a> ("each flight's own speed"): routes flown both ways, each direction's median time from wheels-off to wheels-on over two weeks (FlightAware), less 15 minutes for climb and descent, times the aircraft type's cruise speed (Mach × 1,062 km/h). Averaging the two directions cancels the wind. Click a city for each route's flights, aircraft and track logs.</dd>
|
||||||
<dt>Limits</dt><dd>A ping is a round trip: the signal goes out and comes back. A ping of <i>t</i> ms caps a distance at 102.1 km per ms (light in fibre; the vacuum option multiplies by 1.468), plus 25 km at each end and the distance from each server to its city's airport. Sources: WonderNetwork's 2020 archive and the live RIPE Atlas, Globalping and Vultr measurements on <a href="https://pingstats.aethercosmology.com/">pingstats</a>. 2 pings shorter than every surface allows were left out as mislocated servers. Rail and road: the straight line can be no longer than the published route. Satellite passes: two stations can be no farther apart than the two closest ranges plus the satellite's measured flight between them.</dd>
|
<dt>Limits</dt><dd>A ping is a round trip: the signal goes out and comes back. A ping of <i>t</i> ms caps a distance at 102.1 km per ms (light in fiber; the vacuum option multiplies by 1.468), plus 25 km at each end and the distance from each server to its city's airport. Sources: WonderNetwork's 2020 archive and the live RIPE Atlas, Globalping and Vultr measurements on <a href="https://pingstats.aethercosmology.com/">pingstats</a>. 2 pings shorter than every surface allows were left out as mislocated servers. Rail and road: the straight line can be no longer than the published route. Satellite passes: two stations can be no farther apart than the two closest ranges plus the satellite's measured flight between them.</dd>
|
||||||
<dt>Solver</dt><dd>First a least-squares fit of every flight's relative error. Then eight rounds of a reweighted, nearly linear penalty on how far each measurement falls outside its band, which gives up on as few measurements as it can instead of straining many (the layout with the fewest broken is kept). Limits count three times a flight. L-BFGS throughout. The page runs the same steps live. Offline, the same code (<code>fit.py</code>) ran from 311 starting maps and then refined the 20 best layouts with twelve rounds.</dd>
|
<dt>Solver</dt><dd>First a least-squares fit of every flight's relative error. Then eight rounds of a reweighted, nearly linear penalty on how far each measurement falls outside its band, which gives up on as few measurements as it can instead of straining many (the layout with the fewest broken is kept). Limits count three times a flight. L-BFGS throughout. The page runs the same steps live. Offline, the same code (<code>fit.py</code>) ran from 311 starting maps and then refined the 20 best layouts with twelve rounds.</dd>
|
||||||
<dt>Drawing</dt><dd>Coastlines (Natural Earth 1:110m) are projected on the starting map, then carried along by a thin-plate spline through the cities' starting and current positions. Land near the starting map's rim is outlined only. Land more than 900 km from every city is drawn faint, and beyond 1,500 km fainter still: no measurement fixes its shape. Each city's move from the starting map is drawn as a thin line.</dd>
|
<dt>Drawing</dt><dd>Coastlines (Natural Earth 1:110m) are projected on the starting map, then carried along by a thin-plate spline through the cities' starting and current positions. Land near the starting map's rim is outlined only. Land more than 900 km from every city is drawn faint, and beyond 1,500 km fainter still: no measurement fixes its shape. Each city's move from the starting map is drawn as a thin line.</dd>
|
||||||
<dt>Along a sphere</dt><dd>Optional, and it assumes the shape. The flat layout is laid on a spherical cap whose radius is a third of the layout's width; the cities are then held on a sphere and each distance is measured along its surface (radius × central angle, the haversine distance). The first stage fits the radius with the cities; the later stages hold it. Land is placed by the rotation or reflection that best lines the cities' true positions up with the solved ones (orthogonal Procrustes); the distance of each city from its true place is measured after it.</dd>
|
<dt>Along a sphere</dt><dd>Optional, and it assumes the shape. The flat layout is laid on a spherical cap whose radius is a third of the layout's width; the cities are then held on a sphere and each distance is measured along its surface (radius × central angle, the haversine distance). The first stage fits the radius with the cities; the later stages hold it. Land is placed by the rotation or reflection that best lines the cities' true positions up with the solved ones (orthogonal Procrustes); the distance of each city from its true place is measured after it.</dd>
|
||||||
@@ -438,7 +438,7 @@ function invT(M) { // inverse transpose of a 3 x 3 (row-major): cofactors over
|
|||||||
const C = [e * i - f * h, f * g - d * i, d * h - e * g, c * h - b * i, a * i - c * g, b * g - a * h, b * f - c * e, c * d - a * f, a * e - b * d];
|
const C = [e * i - f * h, f * g - d * i, d * h - e * g, c * h - b * i, a * i - c * g, b * g - a * h, b * f - c * e, c * d - a * f, a * e - b * d];
|
||||||
const det = a * C[0] + b * C[1] + c * C[2]; return Math.abs(det) < 1e-12 ? null : C.map(v => v / det);
|
const det = a * C[0] + b * C[1] + c * C[2]; return Math.abs(det) < 1e-12 ? null : C.map(v => v / det);
|
||||||
}
|
}
|
||||||
function bestTurn(X) { // rotation or reflection Q minimising the distance from Q·true to solved (orthogonal Procrustes, polar factor)
|
function bestTurn(X) { // rotation or reflection Q minimizing the distance from Q·true to solved (orthogonal Procrustes, polar factor)
|
||||||
let H = [0, 0, 0, 0, 0, 0, 0, 0, 0];
|
let H = [0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
for (let i = 0; i < N; i++) {
|
for (let i = 0; i < N; i++) {
|
||||||
const x = X[3 * i], y = X[3 * i + 1], z = X[3 * i + 2], n = Math.hypot(x, y, z), u = [x / n, y / n, z / n], t = TRUE_U[i];
|
const x = X[3 * i], y = X[3 * i + 1], z = X[3 * i + 2], n = Math.hypot(x, y, z), u = [x / n, y / n, z / n], t = TRUE_U[i];
|
||||||
@@ -610,12 +610,12 @@ function update(full) {
|
|||||||
$("#score").innerHTML =
|
$("#score").innerHTML =
|
||||||
row("Flights longer than the aircraft can fly", SC.long.length, GS.long, nf, "bad") +
|
row("Flights longer than the aircraft can fly", SC.long.length, GS.long, nf, "bad") +
|
||||||
row(`Flights below ${Math.round((1 - S.lo) * 100)}% of their length`, SC.short.length, GS.short, nf, "warn") +
|
row(`Flights below ${Math.round((1 - S.lo) * 100)}% of their length`, SC.short.length, GS.short, nf, "warn") +
|
||||||
row(`Pings faster than light in ${S.vac ? "vacuum" : "fibre"}`, SC.rt.length, GS.rt, nAct.rt, "bad") +
|
row(`Pings faster than light in ${S.vac ? "vacuum" : "fiber"}`, SC.rt.length, GS.rt, nAct.rt, "bad") +
|
||||||
row("Rail and road shorter than the straight line", SC.rr.length, GS.rr, nAct.rr, "bad") +
|
row("Rail and road shorter than the straight line", SC.rr.length, GS.rr, nAct.rr, "bad") +
|
||||||
row("Satellite passes", SC.sat.length, GS.sat, nAct.sat, "bad") +
|
row("Satellite passes", SC.sat.length, GS.sat, nAct.sat, "bad") +
|
||||||
`<tr><th scope="row">Surveyed triangles (any plane)</th><td class="bad">${fmt(D.stats.tri.flat)}<span class="of"> / ${fmt(D.stats.tri.n)}</span></td><td class="${D.stats.tri.globe ? "bad" : "ok"}">${fmt(D.stats.tri.globe)}</td></tr>`;
|
`<tr><th scope="row">Surveyed triangles (any plane)</th><td class="bad">${fmt(D.stats.tri.flat)}<span class="of"> / ${fmt(D.stats.tri.n)}</span></td><td class="${D.stats.tri.globe ? "bad" : "ok"}">${fmt(D.stats.tri.globe)}</td></tr>`;
|
||||||
const worst = [...SC.long.map(x => ["f", x[0], x[1]]), ...[...SC.rt, ...SC.rr, ...SC.sat].map(x => ["l", x[0], x[1]])].sort((p, q) => q[2] - p[2]).slice(0, 6);
|
const worst = [...SC.long.map(x => ["f", x[0], x[1]]), ...[...SC.rt, ...SC.rr, ...SC.sat].map(x => ["l", x[0], x[1]])].sort((p, q) => q[2] - p[2]).slice(0, 6);
|
||||||
$("#worst").innerHTML = worst.length ? worst.map(([t, x, r]) => `<li data-a="${x.a}" data-b="${x.b}"><b>${cityName(x.a)} – ${cityName(x.b)}</b><span style="color:${COL.bad}">${t === "f" ? "×" + r.toFixed(2) + " top speed" : "×" + r.toFixed(2) + " " + (x.kind === "rt" ? "light" : "limit")}</span></li>`).join("")
|
$("#worst").innerHTML = worst.length ? worst.map(([t, x, r]) => `<li data-a="${x.a}" data-b="${x.b}"><b>${cityName(x.a)} – ${cityName(x.b)}</b><span style="color:${COL.bad}">${t === "f" ? "×" + r.toFixed(2) + " cruise speed" : "×" + r.toFixed(2) + " " + (x.kind === "rt" ? "light" : "limit")}</span></li>`).join("")
|
||||||
: `<li><b>Nothing faster than possible</b><span></span></li>`;
|
: `<li><b>Nothing faster than possible</b><span></span></li>`;
|
||||||
drawHist();
|
drawHist();
|
||||||
}
|
}
|
||||||
@@ -843,7 +843,7 @@ function lift() {
|
|||||||
dots3At = -1; Q3At = -1; off3 = null; sph = null; $("#lift").textContent = "Release again";
|
dots3At = -1; Q3At = -1; off3 = null; sph = null; $("#lift").textContent = "Release again";
|
||||||
}
|
}
|
||||||
const NOTE3 = {
|
const NOTE3 = {
|
||||||
free: "No shape is assumed. The cities start from the flat map above, each nudged a few kilometres up or down, and each distance is a straight line through space. The dashed sphere is fitted afterwards to describe the result and plays no part in it. A long flight's straight line passes beneath the surface it follows, so the shape comes out larger and more open than the surface the flights describe.",
|
free: "No shape is assumed. The cities start from the flat map above, each nudged a few kilometers up or down, and each distance is a straight line through space. The dashed sphere is fitted afterwards to describe the result and plays no part in it. A long flight's straight line passes beneath the surface it follows, so the shape comes out larger and more open than the surface the flights describe.",
|
||||||
arc: "Assumes a sphere. The flat map above is laid on a spherical cap (radius a third of the map's width), the cities are held on a sphere of free radius, and each distance is measured along its surface with the haversine formula. It shows what size of sphere the flights describe and how well they fit it, not that the surface is a sphere. Land is placed by the rotation that best lines the cities' true positions up with the solved ones."
|
arc: "Assumes a sphere. The flat map above is laid on a spherical cap (radius a third of the map's width), the cities are held on a sphere of free radius, and each distance is measured along its surface with the haversine formula. It shows what size of sphere the flights describe and how well they fit it, not that the surface is a sphere. Land is placed by the rotation that best lines the cities' true positions up with the solved ones."
|
||||||
};
|
};
|
||||||
function mode3() {
|
function mode3() {
|
||||||
@@ -949,7 +949,7 @@ function caption(k) {
|
|||||||
else if (!sv.done && sv.total === 0 && !running)
|
else if (!sv.done && sv.total === 0 && !running)
|
||||||
t = `<b>${START_LABEL[S.start]}, as drawn: ${fmt(k)} measurements broken.</b> Red: a flight longer than its aircraft can fly, or (dashed) a ping faster than light. Amber: a flight far shorter than it takes to fly. Press <b>Solve</b> to let the cities move.`;
|
t = `<b>${START_LABEL[S.start]}, as drawn: ${fmt(k)} measurements broken.</b> Red: a flight longer than its aircraft can fly, or (dashed) a ping faster than light. Amber: a flight far shorter than it takes to fly. Press <b>Solve</b> to let the cities move.`;
|
||||||
else if (!sv.done)
|
else if (!sv.done)
|
||||||
t = `${running ? "Moving" : "Paused moving"} the cities to fit the measurements. Grey lines: each city's move from the starting map.`;
|
t = `${running ? "Moving" : "Paused moving"} the cities to fit the measurements. Gray lines: each city's move from the starting map.`;
|
||||||
else if (!S.fl)
|
else if (!S.fl)
|
||||||
t = `<b>Done: ${fmt(k)} measurements broken.</b> Without flight times, every measurement left is a maximum distance (no farther apart than this), and pulling cities closer always meets a maximum. These measurements can show that a map as drawn is wrong, but no flat map can fail them.`;
|
t = `<b>Done: ${fmt(k)} measurements broken.</b> Without flight times, every measurement left is a maximum distance (no farther apart than this), and pulling cities closer always meets a maximum. These measurements can show that a map as drawn is wrong, but no flat map can fail them.`;
|
||||||
else if (sel >= 0) {
|
else if (sel >= 0) {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 173 KiB |
+15
-15
@@ -7,7 +7,7 @@
|
|||||||
<meta name="description" content="{{N_CITIES}} cities, {{N_FLIGHTS}} timed flights and {{N_LIMITS}} measured limits laid out on a plane by a solver that keeps as many measurements as it can. The plane cannot close the southern routes; released into 3D, the same data closes into a ball.">
|
<meta name="description" content="{{N_CITIES}} cities, {{N_FLIGHTS}} timed flights and {{N_LIMITS}} measured limits laid out on a plane by a solver that keeps as many measurements as it can. The plane cannot close the southern routes; released into 3D, the same data closes into a ball.">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:title" content="The Best Flat Map">
|
<meta property="og:title" content="The Best Flat Map">
|
||||||
<meta property="og:description" content="Every measured flight, ping, rail line and satellite pass on one plane. Best of {{N_STARTS}} starts: {{WORST_PAIR}} would need its aircraft at {{WORST_X}}× its top speed.">
|
<meta property="og:description" content="Every measured flight, ping, rail line and satellite pass on one plane. Best of {{N_STARTS}} starts: {{WORST_PAIR}} would need its aircraft at {{WORST_X}}× its cruise speed.">
|
||||||
<meta property="og:url" content="https://fe-map.aethercosmology.com/">
|
<meta property="og:url" content="https://fe-map.aethercosmology.com/">
|
||||||
<meta property="og:image" content="https://fe-map.aethercosmology.com/og.png">
|
<meta property="og:image" content="https://fe-map.aethercosmology.com/og.png">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
@@ -147,7 +147,7 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<section class="wrap intro">
|
<section class="wrap intro">
|
||||||
<p><b>Rule.</b> The surface is a plane. Each of the {{N_CITIES}} cities may sit anywhere on it. No latitude, longitude, radius, projection or spherical formula enters the solver.</p>
|
<p><b>Rule.</b> The surface is a plane. Each of the {{N_CITIES}} cities may sit anywhere on it. No latitude, longitude, radius, projection or spherical formula enters the solver.</p>
|
||||||
<p><b>Measurements.</b> Flight times give lengths: {{N_FLIGHTS}} routes, cruise speed × time in the air, both directions. Pings ({{N_RT}}), rail and road lengths ({{N_RAIL}}) and satellite passes ({{N_SAT}}) give limits: no farther apart than this.</p>
|
<p><b>Measurements.</b> Flight times give lengths: {{N_FLIGHTS}} routes, cruise speed × time in the air, both directions. Pings ({{N_RT}}), rail and road lengths ({{N_RAIL}}) and satellite passes ({{N_SAT}}) give limits: no farther apart than this.</p>
|
||||||
<p><b>Tolerance.</b> A flight holds between {{LO_PCT}}% and {{HI_PCT}}% of its length. Shorter means a route over a third longer than the straight line; longer means an aircraft above its top speed the whole way.</p>
|
<p><b>Tolerance.</b> A flight holds between {{LO_PCT}}% and {{HI_PCT}}% of its length. Shorter means a route over a third longer than the straight line; longer means an aircraft averaging more than {{HI_PCT}}% of its cruise speed for the whole flight.</p>
|
||||||
<p><b>Solver.</b> The page opens on a starting flat map as drawn. <i>Solve</i> moves the cities to keep as many measurements as it can and marks the rest <span class="k-bad">red</span> (faster than possible) or <span class="k-warn">amber</span> (far off the straight line). Coastlines follow the cities like a rubber sheet.</p>
|
<p><b>Solver.</b> The page opens on a starting flat map as drawn. <i>Solve</i> moves the cities to keep as many measurements as it can and marks the rest <span class="k-bad">red</span> (faster than possible) or <span class="k-warn">amber</span> (far off the straight line). Coastlines follow the cities like a rubber sheet.</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -155,8 +155,8 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<div class="wrap barin">
|
<div class="wrap barin">
|
||||||
<span class="rowlab">Start from</span>
|
<span class="rowlab">Start from</span>
|
||||||
<div class="seg" role="group" aria-label="Starting map" id="starts">
|
<div class="seg" role="group" aria-label="Starting map" id="starts">
|
||||||
<button type="button" data-start="ae" aria-pressed="true" title="Azimuthal equidistant map centred on the North Pole">North-pole AE</button>
|
<button type="button" data-start="ae" aria-pressed="true" title="Azimuthal equidistant map centered on the North Pole">North-pole AE</button>
|
||||||
<button type="button" data-start="dp" aria-pressed="false" title="Azimuthal equidistant map centred on 0° N 0° E">Dual-pole AE</button>
|
<button type="button" data-start="dp" aria-pressed="false" title="Azimuthal equidistant map centered on 0° N 0° E">Dual-pole AE</button>
|
||||||
<button type="button" data-start="mds" aria-pressed="false" title="No existing map: the cities laid out from the flight times alone">No map</button>
|
<button type="button" data-start="mds" aria-pressed="false" title="No existing map: the cities laid out from the flight times alone">No map</button>
|
||||||
<button type="button" data-start="best" aria-pressed="false" title="The best layout found offline from {{N_STARTS}} starting maps">Best of {{N_STARTS}}</button>
|
<button type="button" data-start="best" aria-pressed="false" title="The best layout found offline from {{N_STARTS}} starting maps">Best of {{N_STARTS}}</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -177,8 +177,8 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<label class="rng" for="hi">to <input type="range" id="hi" min="100" max="150" step="5" value="{{HI_PCT}}"><output id="hiv">{{HI_PCT}}%</output></label>
|
<label class="rng" for="hi">to <input type="range" id="hi" min="100" max="150" step="5" value="{{HI_PCT}}"><output id="hiv">{{HI_PCT}}%</output></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="seg" role="group" aria-label="Signal speed for pings" id="light">
|
<div class="seg" role="group" aria-label="Signal speed for pings" id="light">
|
||||||
<button type="button" data-v="glass" aria-pressed="true" title="Pings travel at the speed of light in optical fibre">Pings at fibre speed</button>
|
<button type="button" data-v="glass" aria-pressed="true" title="Pings travel at the speed of light in optical fiber">Pings at fiber speed</button>
|
||||||
<button type="button" data-v="vacuum" aria-pressed="false" title="Pings travel at the speed of light in vacuum (hollow-core fibre or better)">Pings at vacuum speed</button>
|
<button type="button" data-v="vacuum" aria-pressed="false" title="Pings travel at the speed of light in vacuum (hollow-core fiber or better)">Pings at vacuum speed</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -219,7 +219,7 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<dl class="ro">
|
<dl class="ro">
|
||||||
<div><dt>Broken</dt><dd id="r3b">–</dd></div>
|
<div><dt>Broken</dt><dd id="r3b">–</dd></div>
|
||||||
<div><dt>Stage</dt><dd id="r3s">–</dd></div>
|
<div><dt>Stage</dt><dd id="r3s">–</dd></div>
|
||||||
<div><dt>Wraps round its centre</dt><dd id="r3w">–</dd></div>
|
<div><dt>Wraps around its center</dt><dd id="r3w">–</dd></div>
|
||||||
<div><dt id="r3rL">Best-fit sphere radius</dt><dd id="r3r">–</dd></div>
|
<div><dt id="r3rL">Best-fit sphere radius</dt><dd id="r3r">–</dd></div>
|
||||||
<div><dt id="r3oL">Median distance off it</dt><dd id="r3o">–</dd></div>
|
<div><dt id="r3oL">Median distance off it</dt><dd id="r3o">–</dd></div>
|
||||||
<div><dt>Broken on the plane</dt><dd id="r3f">–</dd></div>
|
<div><dt>Broken on the plane</dt><dd id="r3f">–</dd></div>
|
||||||
@@ -230,9 +230,9 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
|
|
||||||
<section class="wrap after">
|
<section class="wrap after">
|
||||||
<h2>Result</h2>
|
<h2>Result</h2>
|
||||||
<p>Best of {{N_STARTS}} starting maps (North-pole and dual-pole AE, the layout of the flight times alone, and AE maps centred on {{N_STARTS_AE}} other points): <b>{{BEST_BROKEN}} measurements broken</b>. The plane keeps almost the whole northern network, but it cannot close the ring of routes around the southern oceans: {{LONG_LIST}}. Each of those needs its aircraft faster than it can fly. To keep the rest, the plane squeezes {{BEST_B80}} flights below 80% of their timed length; on the globe {{GLOBE_B80}} are.</p>
|
<p>Best of {{N_STARTS}} starting maps (North-pole and dual-pole AE, the layout of the flight times alone, and AE maps centered on {{N_STARTS_AE}} other points): <b>{{BEST_BROKEN}} measurements broken</b>. The plane keeps almost the whole northern network, but it cannot close the ring of routes around the southern oceans: {{LONG_LIST}}. Each of those needs its aircraft faster than it can fly. To keep the rest, the plane squeezes {{BEST_B80}} flights below 80% of their timed length; on the globe {{GLOBE_B80}} are.</p>
|
||||||
<p>On the globe, by the same rules: {{GLOBE_LONG}} flight longer than its aircraft can fly (San Salvador–San José, a short hop where the 15-minute allowance for climb and descent is too generous), {{GLOBE_LIM}} limits broken, and {{GLOBE_SHORT}} flights below {{LO_PCT}}%: detours around closed airspace, indirect airways, and short hops where climb and approach take most of the time ({{GLOBE_SHORT_LIST}}). Surveyed triangles do not depend on the layout: a plane gives every triangle exactly 180°, and {{TRI_FLAT}} of the {{N_TRI}} measured triangles exceed that by more than four times their survey's angle noise ({{TRI_GLOBE}} on the globe; <a href="https://distance.aethercosmology.com/#triangles">The Triangle Test</a>).</p>
|
<p>On the globe, by the same rules: {{GLOBE_LONG}} flight longer than its aircraft can fly (San Salvador–San José, a short hop where the 15-minute allowance for climb and descent is too generous), {{GLOBE_LIM}} limits broken, and {{GLOBE_SHORT}} flights below {{LO_PCT}}%: detours around closed airspace, indirect airways, and short hops where climb and approach take most of the time ({{GLOBE_SHORT_LIST}}). Surveyed triangles do not depend on the layout: a plane gives every triangle exactly 180°, and {{TRI_FLAT}} of the {{N_TRI}} measured triangles exceed that by more than four times their survey's angle noise ({{TRI_GLOBE}} on the globe; <a href="https://distance.aethercosmology.com/#triangles">The Triangle Test</a>).</p>
|
||||||
<p>Released into 3D, the same cities and measurements close into a ball. The cities wrap {{WRAP3}}° round its centre, with {{BROKEN3}} measurements broken. Measured along a sphere instead, with the shape conceded and its size left free (<i>Measure along a sphere</i>, above), the flights fit a sphere of radius {{ARC_R}} km with {{ARC_BROKEN}} measurements broken, and the cities fall a median {{ARC_OFF}} km from their true places. Earth's mean radius is 6,371 km; routes flown run slightly longer than the shortest path.</p>
|
<p>Released into 3D, the same cities and measurements close into a ball. The cities wrap {{WRAP3}}° around its center, with {{BROKEN3}} measurements broken. Measured along a sphere instead, with the shape conceded and its size left free (<i>Measure along a sphere</i>, above), the flights fit a sphere of radius {{ARC_R}} km with {{ARC_BROKEN}} measurements broken, and the cities fall a median {{ARC_OFF}} km from their true places. Earth's mean radius is 6,371 km; routes flown run slightly longer than the shortest path.</p>
|
||||||
<h3>Wider tolerances</h3>
|
<h3>Wider tolerances</h3>
|
||||||
<p>The further short a flight may fall, the more of the network the plane can squeeze to make room for the southern routes. It keeps everything once flights may fall to {{FIT_LO}}% of their timed length, which means routes up to twice as long as its straight lines. That layout has {{FIT_B75}} flights below 75% and {{FIT_B60}} below 60%. The globe has {{GLOBE_B75}} and {{GLOBE_B60}}.</p>
|
<p>The further short a flight may fall, the more of the network the plane can squeeze to make room for the southern routes. It keeps everything once flights may fall to {{FIT_LO}}% of their timed length, which means routes up to twice as long as its straight lines. That layout has {{FIT_B75}} flights below 75% and {{FIT_B60}} below 60%. The globe has {{GLOBE_B75}} and {{GLOBE_B60}}.</p>
|
||||||
<div class="tw"><table class="res" id="bands"><thead><tr><th scope="col">Flights kept between</th><th scope="col">Plane: too long</th><th scope="col">Plane: too short</th><th scope="col">Plane: limits</th><th scope="col">Plane: below 75%</th><th scope="col">Globe: too long</th><th scope="col">Globe: too short</th><th scope="col">Globe: limits</th></tr></thead><tbody></tbody></table></div>
|
<div class="tw"><table class="res" id="bands"><thead><tr><th scope="col">Flights kept between</th><th scope="col">Plane: too long</th><th scope="col">Plane: too short</th><th scope="col">Plane: limits</th><th scope="col">Plane: below 75%</th><th scope="col">Globe: too long</th><th scope="col">Globe: too short</th><th scope="col">Globe: limits</th></tr></thead><tbody></tbody></table></div>
|
||||||
@@ -242,7 +242,7 @@ footer{padding-block:18px 30px;color:var(--faint);font-size:13px}
|
|||||||
<h2 style="margin-top:14px">Method</h2>
|
<h2 style="margin-top:14px">Method</h2>
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt>Flights</dt><dd>From <a href="https://distance.aethercosmology.com/#sphere">The Measured Sphere</a> ("each flight's own speed"): routes flown both ways, each direction's median time from wheels-off to wheels-on over two weeks (FlightAware), less 15 minutes for climb and descent, times the aircraft type's cruise speed (Mach × 1,062 km/h). Averaging the two directions cancels the wind. Click a city for each route's flights, aircraft and track logs.</dd>
|
<dt>Flights</dt><dd>From <a href="https://distance.aethercosmology.com/#sphere">The Measured Sphere</a> ("each flight's own speed"): routes flown both ways, each direction's median time from wheels-off to wheels-on over two weeks (FlightAware), less 15 minutes for climb and descent, times the aircraft type's cruise speed (Mach × 1,062 km/h). Averaging the two directions cancels the wind. Click a city for each route's flights, aircraft and track logs.</dd>
|
||||||
<dt>Limits</dt><dd>A ping is a round trip: the signal goes out and comes back. A ping of <i>t</i> ms caps a distance at {{KM_PER_MS}} km per ms (light in fibre; the vacuum option multiplies by 1.468), plus 25 km at each end and the distance from each server to its city's airport. Sources: WonderNetwork's 2020 archive and the live RIPE Atlas, Globalping and Vultr measurements on <a href="https://pingstats.aethercosmology.com/">pingstats</a>. {{N_DROPPED}} pings shorter than every surface allows were left out as mislocated servers. Rail and road: the straight line can be no longer than the published route. Satellite passes: two stations can be no farther apart than the two closest ranges plus the satellite's measured flight between them.</dd>
|
<dt>Limits</dt><dd>A ping is a round trip: the signal goes out and comes back. A ping of <i>t</i> ms caps a distance at {{KM_PER_MS}} km per ms (light in fiber; the vacuum option multiplies by 1.468), plus 25 km at each end and the distance from each server to its city's airport. Sources: WonderNetwork's 2020 archive and the live RIPE Atlas, Globalping and Vultr measurements on <a href="https://pingstats.aethercosmology.com/">pingstats</a>. {{N_DROPPED}} pings shorter than every surface allows were left out as mislocated servers. Rail and road: the straight line can be no longer than the published route. Satellite passes: two stations can be no farther apart than the two closest ranges plus the satellite's measured flight between them.</dd>
|
||||||
<dt>Solver</dt><dd>First a least-squares fit of every flight's relative error. Then eight rounds of a reweighted, nearly linear penalty on how far each measurement falls outside its band, which gives up on as few measurements as it can instead of straining many (the layout with the fewest broken is kept). Limits count three times a flight. L-BFGS throughout. The page runs the same steps live. Offline, the same code (<code>fit.py</code>) ran from {{N_STARTS}} starting maps and then refined the 20 best layouts with twelve rounds.</dd>
|
<dt>Solver</dt><dd>First a least-squares fit of every flight's relative error. Then eight rounds of a reweighted, nearly linear penalty on how far each measurement falls outside its band, which gives up on as few measurements as it can instead of straining many (the layout with the fewest broken is kept). Limits count three times a flight. L-BFGS throughout. The page runs the same steps live. Offline, the same code (<code>fit.py</code>) ran from {{N_STARTS}} starting maps and then refined the 20 best layouts with twelve rounds.</dd>
|
||||||
<dt>Drawing</dt><dd>Coastlines (Natural Earth 1:110m) are projected on the starting map, then carried along by a thin-plate spline through the cities' starting and current positions. Land near the starting map's rim is outlined only. Land more than 900 km from every city is drawn faint, and beyond 1,500 km fainter still: no measurement fixes its shape. Each city's move from the starting map is drawn as a thin line.</dd>
|
<dt>Drawing</dt><dd>Coastlines (Natural Earth 1:110m) are projected on the starting map, then carried along by a thin-plate spline through the cities' starting and current positions. Land near the starting map's rim is outlined only. Land more than 900 km from every city is drawn faint, and beyond 1,500 km fainter still: no measurement fixes its shape. Each city's move from the starting map is drawn as a thin line.</dd>
|
||||||
<dt>Along a sphere</dt><dd>Optional, and it assumes the shape. The flat layout is laid on a spherical cap whose radius is a third of the layout's width; the cities are then held on a sphere and each distance is measured along its surface (radius × central angle, the haversine distance). The first stage fits the radius with the cities; the later stages hold it. Land is placed by the rotation or reflection that best lines the cities' true positions up with the solved ones (orthogonal Procrustes); the distance of each city from its true place is measured after it.</dd>
|
<dt>Along a sphere</dt><dd>Optional, and it assumes the shape. The flat layout is laid on a spherical cap whose radius is a third of the layout's width; the cities are then held on a sphere and each distance is measured along its surface (radius × central angle, the haversine distance). The first stage fits the radius with the cities; the later stages hold it. Land is placed by the rotation or reflection that best lines the cities' true positions up with the solved ones (orthogonal Procrustes); the distance of each city from its true place is measured after it.</dd>
|
||||||
@@ -438,7 +438,7 @@ function invT(M) { // inverse transpose of a 3 x 3 (row-major): cofactors over
|
|||||||
const C = [e * i - f * h, f * g - d * i, d * h - e * g, c * h - b * i, a * i - c * g, b * g - a * h, b * f - c * e, c * d - a * f, a * e - b * d];
|
const C = [e * i - f * h, f * g - d * i, d * h - e * g, c * h - b * i, a * i - c * g, b * g - a * h, b * f - c * e, c * d - a * f, a * e - b * d];
|
||||||
const det = a * C[0] + b * C[1] + c * C[2]; return Math.abs(det) < 1e-12 ? null : C.map(v => v / det);
|
const det = a * C[0] + b * C[1] + c * C[2]; return Math.abs(det) < 1e-12 ? null : C.map(v => v / det);
|
||||||
}
|
}
|
||||||
function bestTurn(X) { // rotation or reflection Q minimising the distance from Q·true to solved (orthogonal Procrustes, polar factor)
|
function bestTurn(X) { // rotation or reflection Q minimizing the distance from Q·true to solved (orthogonal Procrustes, polar factor)
|
||||||
let H = [0, 0, 0, 0, 0, 0, 0, 0, 0];
|
let H = [0, 0, 0, 0, 0, 0, 0, 0, 0];
|
||||||
for (let i = 0; i < N; i++) {
|
for (let i = 0; i < N; i++) {
|
||||||
const x = X[3 * i], y = X[3 * i + 1], z = X[3 * i + 2], n = Math.hypot(x, y, z), u = [x / n, y / n, z / n], t = TRUE_U[i];
|
const x = X[3 * i], y = X[3 * i + 1], z = X[3 * i + 2], n = Math.hypot(x, y, z), u = [x / n, y / n, z / n], t = TRUE_U[i];
|
||||||
@@ -610,12 +610,12 @@ function update(full) {
|
|||||||
$("#score").innerHTML =
|
$("#score").innerHTML =
|
||||||
row("Flights longer than the aircraft can fly", SC.long.length, GS.long, nf, "bad") +
|
row("Flights longer than the aircraft can fly", SC.long.length, GS.long, nf, "bad") +
|
||||||
row(`Flights below ${Math.round((1 - S.lo) * 100)}% of their length`, SC.short.length, GS.short, nf, "warn") +
|
row(`Flights below ${Math.round((1 - S.lo) * 100)}% of their length`, SC.short.length, GS.short, nf, "warn") +
|
||||||
row(`Pings faster than light in ${S.vac ? "vacuum" : "fibre"}`, SC.rt.length, GS.rt, nAct.rt, "bad") +
|
row(`Pings faster than light in ${S.vac ? "vacuum" : "fiber"}`, SC.rt.length, GS.rt, nAct.rt, "bad") +
|
||||||
row("Rail and road shorter than the straight line", SC.rr.length, GS.rr, nAct.rr, "bad") +
|
row("Rail and road shorter than the straight line", SC.rr.length, GS.rr, nAct.rr, "bad") +
|
||||||
row("Satellite passes", SC.sat.length, GS.sat, nAct.sat, "bad") +
|
row("Satellite passes", SC.sat.length, GS.sat, nAct.sat, "bad") +
|
||||||
`<tr><th scope="row">Surveyed triangles (any plane)</th><td class="bad">${fmt(D.stats.tri.flat)}<span class="of"> / ${fmt(D.stats.tri.n)}</span></td><td class="${D.stats.tri.globe ? "bad" : "ok"}">${fmt(D.stats.tri.globe)}</td></tr>`;
|
`<tr><th scope="row">Surveyed triangles (any plane)</th><td class="bad">${fmt(D.stats.tri.flat)}<span class="of"> / ${fmt(D.stats.tri.n)}</span></td><td class="${D.stats.tri.globe ? "bad" : "ok"}">${fmt(D.stats.tri.globe)}</td></tr>`;
|
||||||
const worst = [...SC.long.map(x => ["f", x[0], x[1]]), ...[...SC.rt, ...SC.rr, ...SC.sat].map(x => ["l", x[0], x[1]])].sort((p, q) => q[2] - p[2]).slice(0, 6);
|
const worst = [...SC.long.map(x => ["f", x[0], x[1]]), ...[...SC.rt, ...SC.rr, ...SC.sat].map(x => ["l", x[0], x[1]])].sort((p, q) => q[2] - p[2]).slice(0, 6);
|
||||||
$("#worst").innerHTML = worst.length ? worst.map(([t, x, r]) => `<li data-a="${x.a}" data-b="${x.b}"><b>${cityName(x.a)} – ${cityName(x.b)}</b><span style="color:${COL.bad}">${t === "f" ? "×" + r.toFixed(2) + " top speed" : "×" + r.toFixed(2) + " " + (x.kind === "rt" ? "light" : "limit")}</span></li>`).join("")
|
$("#worst").innerHTML = worst.length ? worst.map(([t, x, r]) => `<li data-a="${x.a}" data-b="${x.b}"><b>${cityName(x.a)} – ${cityName(x.b)}</b><span style="color:${COL.bad}">${t === "f" ? "×" + r.toFixed(2) + " cruise speed" : "×" + r.toFixed(2) + " " + (x.kind === "rt" ? "light" : "limit")}</span></li>`).join("")
|
||||||
: `<li><b>Nothing faster than possible</b><span></span></li>`;
|
: `<li><b>Nothing faster than possible</b><span></span></li>`;
|
||||||
drawHist();
|
drawHist();
|
||||||
}
|
}
|
||||||
@@ -843,7 +843,7 @@ function lift() {
|
|||||||
dots3At = -1; Q3At = -1; off3 = null; sph = null; $("#lift").textContent = "Release again";
|
dots3At = -1; Q3At = -1; off3 = null; sph = null; $("#lift").textContent = "Release again";
|
||||||
}
|
}
|
||||||
const NOTE3 = {
|
const NOTE3 = {
|
||||||
free: "No shape is assumed. The cities start from the flat map above, each nudged a few kilometres up or down, and each distance is a straight line through space. The dashed sphere is fitted afterwards to describe the result and plays no part in it. A long flight's straight line passes beneath the surface it follows, so the shape comes out larger and more open than the surface the flights describe.",
|
free: "No shape is assumed. The cities start from the flat map above, each nudged a few kilometers up or down, and each distance is a straight line through space. The dashed sphere is fitted afterwards to describe the result and plays no part in it. A long flight's straight line passes beneath the surface it follows, so the shape comes out larger and more open than the surface the flights describe.",
|
||||||
arc: "Assumes a sphere. The flat map above is laid on a spherical cap (radius a third of the map's width), the cities are held on a sphere of free radius, and each distance is measured along its surface with the haversine formula. It shows what size of sphere the flights describe and how well they fit it, not that the surface is a sphere. Land is placed by the rotation that best lines the cities' true positions up with the solved ones."
|
arc: "Assumes a sphere. The flat map above is laid on a spherical cap (radius a third of the map's width), the cities are held on a sphere of free radius, and each distance is measured along its surface with the haversine formula. It shows what size of sphere the flights describe and how well they fit it, not that the surface is a sphere. Land is placed by the rotation that best lines the cities' true positions up with the solved ones."
|
||||||
};
|
};
|
||||||
function mode3() {
|
function mode3() {
|
||||||
@@ -949,7 +949,7 @@ function caption(k) {
|
|||||||
else if (!sv.done && sv.total === 0 && !running)
|
else if (!sv.done && sv.total === 0 && !running)
|
||||||
t = `<b>${START_LABEL[S.start]}, as drawn: ${fmt(k)} measurements broken.</b> Red: a flight longer than its aircraft can fly, or (dashed) a ping faster than light. Amber: a flight far shorter than it takes to fly. Press <b>Solve</b> to let the cities move.`;
|
t = `<b>${START_LABEL[S.start]}, as drawn: ${fmt(k)} measurements broken.</b> Red: a flight longer than its aircraft can fly, or (dashed) a ping faster than light. Amber: a flight far shorter than it takes to fly. Press <b>Solve</b> to let the cities move.`;
|
||||||
else if (!sv.done)
|
else if (!sv.done)
|
||||||
t = `${running ? "Moving" : "Paused moving"} the cities to fit the measurements. Grey lines: each city's move from the starting map.`;
|
t = `${running ? "Moving" : "Paused moving"} the cities to fit the measurements. Gray lines: each city's move from the starting map.`;
|
||||||
else if (!S.fl)
|
else if (!S.fl)
|
||||||
t = `<b>Done: ${fmt(k)} measurements broken.</b> Without flight times, every measurement left is a maximum distance (no farther apart than this), and pulling cities closer always meets a maximum. These measurements can show that a map as drawn is wrong, but no flat map can fail them.`;
|
t = `<b>Done: ${fmt(k)} measurements broken.</b> Without flight times, every measurement left is a maximum distance (no farther apart than this), and pulling cities closer always meets a maximum. These measurements can show that a map as drawn is wrong, but no flat map can fail them.`;
|
||||||
else if (sel >= 0) {
|
else if (sel >= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user