Skunk Werks · Design Doc · Rev A

Local Reference Network

Survey your own ground. Let the data choose the shape.

A self-surveyed network of stations, located with Giga Ranger time-of-flight ranges, tied to mountain peaks by star occultations, and fitted with zenith cameras that record where “straight up” points at each site. The output is a local map of the vertical: whether plumb lines stay parallel, converge, or lean.

At a glance

4–6
Stations (phase 2–3)
15–55 km
Station spacing
32.4″/km
Vertical turn if curved (R = 6,371 km)
~10″
Vertical precision per station
~1 m
Range precision after air correction
5–20″
Expected local deflections (foothills)

Purpose

Every published map rests on a reference model chosen by someone else. This project builds a small one from scratch: station positions from radio timing, landmarks from star occultations, and the direction of gravity at each station from the stars overhead. Nothing comes from GPS coordinates or a map projection.

With the network in one 3D frame, the plumb lines can be extended downward and compared. The pattern they make is the result. A smooth fit gives the local curvature, and what's left over at each station is its deflection of the vertical, the small lean caused by nearby mountains and dense rock.

Hypotheses, stated before data

H₀ · flat
κ = 0

Plumb lines stay parallel. The vertical does not turn with distance.

H₁ · convex
κ > 0

Plumb lines converge below ground. Their meeting depth is the radius R the network measures.

H₂ · concave
κ < 0

Plumb lines converge above ground. A station's zenith tilts back toward its neighbour.

Decision rule: per test, z = κ̂ / σκ. Curved if z > 3.3, concave if z < −3.3, otherwise not distinguishable from flat at this precision (report the bound).

Architecture

1 · RangingGiga Ranger TOF chords + met 2 · Landmarkspeak occultations (az, el) 3 · Star verticalszenith camera + tilt sensor 4 · Sightline verticalsreciprocal zenith angles Fusion (least squares) • station XYZ in own frame • peak XYZ by intersection • vertical per station • smooth fit: κ, R, residuals Local mapstations + peaks, own frame Curvature verdictκ̂ ± σ, R̂, z per test Deflection mapξ, η per station (″)
Layers 1–3 build the map. Layer 4 is the cross-check that doesn't use stars (see Limits).

Network layout

peak P1peak P2peak P3 A B C D A · reference (valley) B · ~40 km N (ridge) C · ~30 km E D · hilltop, height leverage N ≈ 20 km TOF range (all pairs) occultation sightline
Phase 2: four stations with every pair ranged and at least two stations seeing each peak. Mixing valley and ridge sites gives the network vertical leverage, so heights come out of the ranging instead of being assumed.
Flat (H₀) Curved (H₁) parallel, apart from small local leans converge toward depth R; leans are residuals
Each station's vertical is measured against the stars (layer 3) and, at some stations, against the sightlines to other stations (layer 4). Curvature is the smooth trend; deflections are what's left at each station after the fit. Angles exaggerated.

Measurement layers

LayerInstrumentMeasuresOutputPrecision target
1 · RangingGiga Ranger (SX1280, 13 dBi Yagi), BME280 at both endsStraight-line distance between antennasrange_m, σ, P/T/RH, epoch~1 m (air index to ~1 ppm)
2 · LandmarksSeestar S30 video, GPS-timedTime a star touches a peak → direction to that peakaz, el per peak per station~10″ on steep summit contacts
3 · Star verticalsPi 4, HQ camera + 25 mm f/1.8, ADXL355, worm-drive turntableZenith position among the stars (0°/180° ABBA reversal)astronomic lat/lon, σ~5–10″
4 · Sightline verticalsTwo theodolites or lamp + zenith-angle sighting, synced clocksSimultaneous reciprocal zenith angles over ranged lines, many epochsθ per line (refraction removed by fit to k = 0)~2–5″ after fit
5 · Magnetic azimuth3-axis magnetometer (e.g. PNI RM3100) tilt-compensated by the ADXL355; base magnetometer at station AHeading to each peak and station relative to magnetic north; live declinationraw field vector (nT), heading, declination log~0.1–0.3° heading; declination tracked to ~1′

Fusion outputs

Data policy: raw first

Every measurement is recorded raw, exactly as the instrument produced it, before any model or correction touches it. Corrections live in a separate, versioned processing step that can be rerun, swapped or removed without touching the original record.

Deflections of the vertical: taken as is

The plumb line at each station is accepted as measured. Its local lean, usually attributed to gravity from nearby mountains and dense rock, is noted and recorded, not removed. No geoid or gravity model is applied to "correct" a station's vertical. In the fused map each station carries its own measured vertical, and any lean shows up as a mapped residual (ξ, η) after the smooth fit, labelled as observed rather than explained.

Why raw: a correction applied at capture time can't be audited or undone, and it quietly imports someone else's model into the data. Keeping the raw record lets anyone rerun the analysis with different assumptions, including assumptions that disagree with this one.

Azimuth reference: magnetic north

Directions to mountain peaks and to other stations are referenced to magnetic north. Magnetic north moves: the declination (the angle between magnetic and true north) drifts over years, swings by several arcminutes through each day, and jumps during geomagnetic storms. So declination is monitored live and the map grid is updated to match, with every map version stamped with the declination it used.

How declination is tracked

EffectTypical sizeHandling
Secular drift of declinationa few ′ per yearlive tracking; map grid re-stamped
Daily variation~5–15′base magnetometer at A, same-time correction
Geomagnetic stormsup to ≥1°flag and exclude, or correct from base station
Local anomalies (iron-rich rock, vehicles, rebar, the rig itself)up to several °keep magnetometer away from steel; measure rig deviation by rotating it (compass swing)
Heading noise after tilt compensation~0.1–0.3°average many samples

Scale of the effect: a 0.1° azimuth error is about 96 m sideways at 55 km. Magnetic azimuth sets the orientation of the map. It does not enter the curvature result: κ depends on distances and on the angles between verticals, which don't change when the whole map is rotated.

Simulation: flat world vs curved world

Synthetic data for a line of stations in either a flat world or a curved one, with realistic noise: range error, star-vertical error, local deflections, and refraction that changes every epoch. The same analysis then runs blind on both. Switch worlds and see whether it picks the right one, and how much noise it takes before it can't.

Side view (angles exaggerated)

Test A · star verticals: γ vs distance

Test B · sightlines: excess E vs k (farthest line)

Test A · star verticals
Test B · sightline verticals
Agreement A vs B

Numerics check · same baseline, different arithmetic

Single-precision arithmetic (as on an ESP32 or a float32 LoRa frame) loses the signal when two nearly equal numbers are subtracted. See Numerical hygiene.

Model notes: stations sit on a north–south line at random heights of 1,000–1,800 m. Refraction is the same physics in both worlds (ray curvature = k / 6,371 km). Deflections are random per station and shared by both tests, because both are levelled to the same local plumb line. The analysis never sees the world setting.

Limits: what this system cannot prove about itself

Gödel's incompleteness theorems are about formal mathematical systems, not field instruments, but their lesson carries over as an engineering rule: a measuring system cannot certify its own foundations from inside. Every layer rests on assumptions (axioms) that the layer itself can't test. What the network can do is test whether its measurements are consistent with each other, and arrange the tests so that no single axiom carries the result.

AxiomRangingLandmarksStar verticals (A)Sightline verticals (B)How it's checked
Radio TOF × c/n gives distancerelies———closure of all-pairs network; repeat over weather
Plumb line = local gravity direction——reliesreliesreversal (0°/180°) removes sensor offset; physics of levels
Stars are effectively infinitely far—reliesrelies—A vs B agreement; same γ from every star
Refraction follows measured air (k from dT/dh)smallreliestiny (zenith)reliesfit to k = 0; sign of excess; two-colour check
Clocks agree to ~0.1 s—reliesE–W onlyreliesGPS PPS or NTP logs
Ephemeris (star positions) is right—reliesrelies—catalog cross-check; plate-solve residuals
Magnetic north tracked by base station—orientation——star-vs-magnetic azimuth to the same peak; observatory data

Design rule: no conclusion should depend on one column. Test A (stars) and Test B (sightlines) share only the plumb-line axiom. If they agree, the star-distance axiom and the refraction axiom are each checked by the other test. If they disagree, the disagreement tells you which axiom to examine. The simulation shows this in the “Agreement” panel.

Some things stay outside the system no matter what: the clocks, the speed of light, the laws of optics. These are tested elsewhere, in laboratories and by other people, and this project inherits them. The fair claim is conditional: given these stated axioms, the network's data prefer this geometry by this many standard deviations.

Numerical hygiene: catastrophic cancellation

The signals here are small differences between large numbers. 55 km of curvature is a 0.17 m difference between an arc and a chord, a 237 m drop computed from radii of 6.37 million metres, and a 30′ excess in a sum of two angles near 90°. Subtracting nearly equal floating-point numbers throws away most of their significant digits. In single precision (float32, about 7 digits) that can erase the entire signal and make curved data look flat.

QuantityFragile formStable form
Angle between two sitesacos(sinφ₁sinφ₂ + cosφ₁cosφ₂cosΔλ): cos γ ≈ 1haversine: 2·asin(√(sin²(Δφ/2) + cosφ₁cosφ₂sin²(Δλ/2)))
Drop below tangent√(R²+d²) − Rd² / (√(R²+d²) + R) or d²/2R
Height on a circleR·cos(s/R) − R−2R·sin²(s/2R)
Zenith-angle excessstore zA, zB in degrees, then add and subtract 180record each as a small offset from 90° in arcseconds, then add
Network coordinatesabsolute coordinates in metres (10⁶–10⁷ m)subtract a local origin first; solve for small corrections
Firmware / LoRa framesfloat32 degrees (~0.4 m step at 50° latitude)int32 in milli-arcseconds or millimetres; double on the analysis side

Example: computing the angle between two sites 1 km apart with float32 acos returns exactly 0: cos γ rounds to 1.0, so the arithmetic itself reports a flat Earth. The live numerics table in the simulation shows this for whatever baseline is selected.

Scenario: cancellation that invents curvature

The error can also run the other way. The radio-only test asks whether a middle station M sits above the straight line between A and B, using only the three ranged distances. The textbook route is Heron's formula for the triangle's area, then height = 2×area / AB. For three stations in a line, that triangle is a needle: s − c is the difference of two numbers near 55,000 m, and the true answer is zero.

Fix: never take the square root of a quantity that can legitimately be zero or negative. Keep the signed product s(s−a)(s−b)(s−c) (computed with Kahan's ordering so rounding stays small), average the signed h² across measurement sets, and report it with its uncertainty. Negative results are data, not errors. Then flat data average to zero, and only a real bulge survives.

Error budget (per 55 km line)

SourceSizeEffect on γ or θMitigation
Tilt sensor after reversal5–15″≤0.8%ABBA sequence, insulation, quick pairs
Plate-solve centroiding<1″<0.1%hundreds of stars per frame
Deflection of the vertical5–20″≤1%mapped as residuals, not removed
Range (air index 1 ppm)~5 cm<0.001%P/T/RH at both ends
Refraction on sightlinesk 0.05–0.35–30% rawfit to k = 0 over a day (Test B)
Clock (E–W lines)10 ms0.15″NTP/PPS logged per frame
Magnetic azimuth (orientation only)0.1–0.3°0% on κbase magnetometer; star cross-check
Float32 arithmeticup to 100%signal losssee Numerical hygiene

Phases & hardware

PhaseStationsNew hardwareResult
12Zenith rig: Pi 4, HQ Camera CS, 25 mm f/1.8 CS lens, EVAL-ADXL355-PMDZ, NEMA17 + 20:1 worm turntable, hall sensor; RM3100-class magnetometer, plus a second one as the base station at AFirst γ on the 55 km line
24+2 Giga Ranger nodes (T3-S3 SX1280, Yagi, BME280)3D frame from ranges, peaks placed by intersection, κ along two directions
35–6Theodolite pair (rented 1″) or lamp + zenith-angle sighting; mast temperature sensorsStar-free verticals (Test B), deflection map

Data formats

station_frames.csv   utc, station, pos_cmd_deg, roll_deg, ra_deg, dec_deg, n_stars, fit_rms_as, tilt_x_as, tilt_y_as, temp_c
ranges.csv           utc, from, to, range_m, sigma_m, P_hPa, T_C, RH_pct (both ends)
occultations.csv     utc, station, star, peak, event(D/R), frame_ref, P_hPa, T_C
reciprocal.csv       utc, from, to, zA_offset_as, zB_offset_as, dTdh_A, dTdh_B, k
magnetics.csv        utc, station, Bx_nT, By_nT, Bz_nT, tilt_x_as, tilt_y_as, heading_mag_deg, target
declination.csv      utc, source(base|observatory|star), declination_deg, sigma_arcmin
raw/                 original frames, videos and timer counts (read-only, checksummed)
network_result.json  stations{xyz}, peaks{xyz}, kappa_ns, kappa_ew, R_km, z, deflections{xi,eta}

All angles stored as integers or doubles in arcseconds relative to a nearby reference (90°, local origin), never as float32 degrees.

Open items