## Exercise 09: GPS Time (L76K + UBLOX)

This exercise boots the T-Beam Supreme and verifies GPS behavior at startup.

Important sequence note:

- Exercise 10 (`10_Simple_GPS`) should be completed before this exercise.
- Exercise 10 README contains the detailed pin-configuration explanation and troubleshooting rationale for why explicit GPS pin mapping is critical on this hardware.
- If GPS behavior is unexpected here, review Exercise 10 README first, then return to Exercise 9.

Implemented behavior:

1. Initializes PMU, OLED, and SD startup watcher (same startup SD path used in Exercise 08).
2. Probes GPS at startup for NMEA traffic, module identity, satellite count, and UTC time availability.
   - Uses explicit GPS UART pins and an active startup probe (multi-baud + common GPS query commands), aligned with the approach validated in Exercise 10.
3. Supports both module profiles via `platformio.ini` build flags:
   - `node_a` / `node_b`: `GPS_L76K`
   - `node_c`: `GPS_UBLOX`
4. If detected module data conflicts with the selected node profile, OLED shows a `GPS module mismatch` error.
5. Every minute:
   - If GPS UTC is valid: shows GPS UTC time and satellites on OLED.
   - If satellites are seen but UTC is not valid yet: shows that condition and RTC time.
   - If no satellites: shows:
     - "Unable to acquire"
     - "satellites"
     - "Take me outside so I"
     - "can see satellites"
     - plus current RTC time.

Notes:

- GPS time displayed is UTC from NMEA RMC with valid status.
- Satellite count uses best available from GGA/GSA/GSV.
- RTC fallback reads PCF8563 via Wire1.
- For UBLOX hardware use `-e node_c`.
- The UBLOX MAX-M10S path is given a longer startup window than L76K because cold starts are slower, especially if backup power/orbit data are unavailable.
- On T-Beam Supreme, `GPS_WAKEUP_PIN=7` is relevant for the L76K variant; the UBLOX MAX-M10S does not use that wake pin in the same way.
- For fastest UBLOX reacquisition, test with the 18650 attached so the GNSS backup domain can preserve assistance state across resets/power cycles.

## Build

```bash
source /home/jlpoole/rnsenv/bin/activate
pio run -e node_a
```

## Upload

```bash
source /home/jlpoole/rnsenv/bin/activate
pio run -e node_a -t upload --upload-port /dev/ttyACM0
```
