Calculations
Last checked ·
These scripts reproduce the measurements listed below. The geometry checks use controlled scenes and take sea level as the WGS84 ellipsoid surface. The spec and decision record also cite SDK readbacks, public viewer observations and other calculations. The scripts need Node.js and no other packages. Run them from this folder. Each prints one JSON object per line.
node camera-precision.mjsnode camera-precision-vertical.mjsnode map-scale-and-framing.mjsnode url-carrier.mjsnode roll-from-up.mjsnode link-shapes.mjs| Script | What it checks | Where the numbers appear |
|---|---|---|
| camera-precision.mjs | Checks projected polar captures for rotation caused by coordinate rounding. Rounds the tilted Wildspitz camera to the default precision. Measures eye and direction change and landmark movement at 100 m and 2,654.9 m. Converts 68.4f to horizontal and vertical angles at both screen sizes. Gives the top-view spans, scales and map-to-camera eye distances. Shows how far a flat map is out when the receiver assumes the ground at sea level. Gives the cases where extra digits would show. |
Wildspitz precision check · Lens and viewport · Top view conversion · Camera position decision |
| camera-precision-vertical.mjs | The trade-off with a vertical lens. Compares three angle decimals, the default of one and a coarse profile by length and landmark movement. Add --fields to round one field at a time. |
Wildspitz precision check · Precision decision |
| map-scale-and-framing.mjs | Derives the Wildspitz reference zoom from its ground scale. Compares zoom rounding and link length with the ground-resolution field. Checks the Rigi conversion in both directions, its scale at 60° N, and finite screen samples on a coarse Web Mercator view. Applies the same zoom at 60° N. Compares three portrait framing rules. Rounds a close and a broad flat map. Measures a rotated geographic grid at 60° N. | Map precision · Flat map scale and framing · Precision decision |
| roll-from-up.mjs | Reads a camera that is level against the line from the Earth’s center in the specification’s frame, which measures up at right angles to the ellipsoid. Compares the resulting roll with the one the viewer comparison recorded for the tilted camera and gives the corner movement on screen. Gives the corner movement from rounding roll to one decimal and from leaving out a roll under half a degree. Shows how that roll grows as the camera tilts toward straight down. | A roll nobody chose |
| link-shapes.mjs | Reads the links of the viewer comparison and counts where each carries its view, in what shape, with which separators and under which keys. | The link around a shared view |
| url-carrier.mjs | Checks all six URL length examples in the spec, including the raw and escaped CRS tags. Tests each value in the query and fragment with conflicting sibling sr and crs parameters and checks what the server receives and what the browser side recovers. |
URL carrier · Carrier decision |
camera-precision.mjs reads the unrounded reference camera from the specification. It fails if the rounded example is no longer in that file.
The close and broad map checks round ground resolution to five significant digits, the default for g. At six coordinate decimals the coordinate rounding accounts for most of the movement they report.
The browser readbacks record the extent fit, ground-scale and scale-bar samples, and the camera and lens results. The calculation scripts do not open a viewer. External link survey · Viewer comparisons