Chapter 10 of 22 Part II: Networks and Communication

Finding Yourself on Planet Earth

Each project below is tailored to a specific algorithm and scientific question from Chapter 10, with concrete inputs, verifiable numerical outputs, boundary cases, and links to the related lab and pioneer.

Project 1 of 3 · v1-c10-p01 Foundational · ~20 min

Speed-of-Light Time-of-Flight Ruler

Lab activity: A. Turn a clock into a ruler · Related code: block-01.js · Pioneer: View profile

Real-World Problem: GPS satellites orbit 20,200 km above Earth, so measuring distance requires turning nanoseconds into meters.
Scientific Question: How sensitive is a light-speed distance measurement to microsecond and nanosecond timing errors?

Objective: Convert radio travel times into orbital distances using c = 299,792,458 m/s and compute clock-error drift.

Hypothesis to Test: A 1-microsecond clock offset causes ~299.79 meters of range error, while 1 nanosecond causes ~0.30 meters.

Step-by-Step Implementation

  1. Define exact speed of light c = 299792458 m/s.
  2. Compute range d = c * travelTime for satellite travel times around 67–85 ms.
  3. Compute distance error for 1 ns, 1 μs, and 1 ms clock offsets.
  4. Compute daily drift if Einstein's ~38 μs/day relativistic correction were omitted.
Concrete Input: Signal travel time = 0.06738 seconds; test clock bias Δt = 1 μs, 10 ns, and 38 μs/day (relativity).
Expected Output: Distance = 20,199,996 m; 1 μs error = 299.79 m; 38 μs relativistic drift = 11,392 m/day.

Test Cases: Δt = 1e-6 s -> 299.792458 m; Δt = 38e-6 s -> ~11.39 km.

Boundary Condition: Negative travel time indicates receiver clock is lagging behind satellite clock (negative bias).

Common Mistake to Avoid: Using km/s instead of m/s without converting units consistently.

Interpreting Results: Extreme precision in timing is what makes satellite navigation physically possible.

Show Hint, Extension Challenge & Reflection

Hint: Review the worked example and equation in Chapter 10 before testing the boundary case: Negative travel time indicates receiver clock is lagging behind satellite clock (negative bias).

Extension Challenge: Calculate how many milliseconds a signal takes from a satellite directly overhead (20,200 km) vs. near the horizon (~25,800 km).

Reflection Question: Why is GPS one of the most direct everyday verifications of Einstein's general and special relativity?

Project 2 of 3 · v1-c10-p02 Applied · ~30 min

Iterative 2D/3D GPS Trilateration Solver

Lab activity: B. Find the mystery point · Related code: block-02.js · Pioneer: View profile

Real-World Problem: Intersecting multiple satellite spheres numerically requires solving nonlinear distance equations.
Scientific Question: How does iterative refinement converge on an unknown receiver position from noisy satellite ranges?

Objective: Solve for a mystery receiver point from simulated satellite coordinates and measure residual error.

Hypothesis to Test: Minimizing the sum of squared range residuals converges to the true receiver coordinates when satellite geometry is spread across the sky.

Step-by-Step Implementation

  1. Start from an initial guess (0, 0) and compute predicted distances to each satellite.
  2. Compute residuals (predicted − measured) and step opposite the gradient.
  3. Log position error at each iteration until residual < 0.001.
  4. Test clustering all satellites in one quadrant and observe slower/noisier convergence.
Concrete Input: 4 simulated satellites with exact ranges to hidden receiver (12, -5).
Expected Output: Converges within < 0.01 units of (12, -5) in under 20 iterations.

Test Cases: Exact ranges -> residual < 1e-4; Noisy ranges (±5 m) -> bounded least-squares estimate.

Boundary Condition: Too-large step sizes diverge; normalize step size by satellite count.

Common Mistake to Avoid: Forgetting to handle zero distance (division by zero when guess lands exactly on a satellite).

Interpreting Results: Real GNSS chips run linearized least-squares (Gauss-Newton) or Kalman filters continuously.

Show Hint, Extension Challenge & Reflection

Hint: Review the worked example and equation in Chapter 10 before testing the boundary case: Too-large step sizes diverge; normalize step size by satellite count.

Extension Challenge: Add a 3rd coordinate (altitude z) and verify convergence with 4 satellites.

Reflection Question: How did Gladys West's geodetic Earth-shape modeling make accurate global GPS coordinates possible?

Project 3 of 3 · v1-c10-p03 Applied · ~30 min

Four-Unknown Clock-Bias Eliminator

Lab activity: C. Fix an imperfect clock · Related code: block-03.js · Pioneer: View profile

Real-World Problem: Smartphones contain inexpensive quartz clocks that drift by milliseconds, yet GPS needs nanosecond accuracy.
Scientific Question: How does adding a 4th satellite allow the receiver to solve for both position AND its own clock error Δt?

Objective: Introduce an unknown clock bias into simulated pseudoranges and recover both exact position and Δt.

Hypothesis to Test: A constant clock bias shifts all pseudoranges equally; adjusting Δt until all circles meet at one point recovers both true position and exact clock error.

Step-by-Step Implementation

  1. Add a hidden constant offset b = c * Δt to all simulated satellite distances.
  2. Observe that naive trilateration fails to intersect cleanly when b != 0.
  3. Include b as an unknown variable in the solver and adjust (x, y, b) together.
  4. Confirm both true coordinates and exact clock offset b are recovered.
Concrete Input: True position (10, 15), unknown receiver clock bias equivalent to +4.0 distance units on all 4 pseudoranges.
Expected Output: Recovered position = (10.00, 15.00) and clock bias = +4.00 units.

Test Cases: b = +4.0 -> recovered within 0.01; b = -2.5 -> recovered within 0.01.

Boundary Condition: With only 2 satellites in 2D (or 3 in 3D), position and clock bias cannot be separated uniquely.

Common Mistake to Avoid: Applying random independent errors instead of a shared clock bias across all satellites.

Interpreting Results: Because all satellites synchronize to GPS system time, one extra measurement turns a cheap phone clock into an atomic-grade reference.

Show Hint, Extension Challenge & Reflection

Hint: Review the worked example and equation in Chapter 10 before testing the boundary case: With only 2 satellites in 2D (or 3 in 3D), position and clock bias cannot be separated uniquely.

Extension Challenge: Sweep b from -10 to +10 and plot the minimum residual curve to visualize the unique global minimum.

Reflection Question: How did Roger Easton and Bradford Parkinson's atomic-clock architecture make passive consumer receivers possible?