# RideForm

Native iPhone torso-motion research logger for stationary motorcycle drills. Records Core Motion evidence in immutable local sessions, with calibration, event markers, speech cues, exact master/CSV export and reproducible candidate analysis. No composite rider score. Original brief: [ios-v0-brief.txt](docs/requirements/ios-v0-brief.txt).

Current handoff state and verification evidence: [execution-state.md](docs/execution-state.md). Build 0.1 (7) is installed on James's iPhone 16 Pro with corrected Core Motion validation, spoken calibration retries and shareable logs. The final return to center is guidance, not another pose test. Current verification receipts are recorded there. Physical mounting/sign checks, matched sampling trials and approximately50 garage transitions remain human verification.

## Install and open

On this Mac, open `RideForm.xcodeproj` with `/Applications/Xcode-beta.app`. Select scheme **RideForm** and the USB-connected iPhone. In target **Signing & Capabilities**, use your Apple Development team (the project currently selects James's available team), keep automatic signing enabled, and choose a unique bundle identifier if another account needs it. Press **Run**. Allow Xcode account/device prompts if shown. The deployment target is iOS17+; the current machine uses Xcode27 beta and iOS27 SDK. Optional fields are availability gated.

For the already installed preview, open **RideForm** on the phone. If iOS reports an untrusted developer, go to **Settings → General → VPN & Device Management**, select your developer app profile and tap **Trust**, then reopen RideForm. Keep Internet available for Apple's verification. Developer Mode is already enabled on James's connected phone; other devices may require **Settings → Privacy & Security → Developer Mode**, restart and confirmation. [Apple developer trust instructions](https://help.apple.com/xcode/mac/current/en.lproj/dev96a12fb84.html).

Grant Motion & Fitness permission when requested. Keep the app in the foreground while recording. Interruption stops capture and saves an interrupted session; it does not promise background recording. Updating the app with the same bundle identifier preserves sessions; do not uninstall it while retaining local research data.

The installed preview's development profile expires **2026-10-08 at15:46UTC**. Run the app from Xcode again to refresh signing when it expires; preserve the same bundle identifier and local sessions.

## Garage workflow

1. Fix the phone rigidly at the sternum. Select fused-only or fused+raw before calibration.
2. Leave spoken calibration on, set volume, and tap Calibrate. Follow the countdown and LEFT → CENTER → FORWARD → CENTER prompts without tapping Continue. Breathe normally. Optionally enable automatic recording after calibration. Verify physical signs before trusting relative angles.
3. Run stationary/movement diagnostics and matched stream-mode trials in the updated build.
4. Record deliberate transitions with neutral holds; optionally enable audible drill prompts and add LEFT/CENTER/RIGHT/GOOD/BAD markers.
5. Stop, wait for saved status, review evidence and quality flags, reopen after relaunch, and export master ZIP/CSV to Files or AirDrop.

Full protocol and return evidence: [garage-experiment.md](docs/garage-experiment.md). Coordinate definitions: [coordinate-systems.md](docs/coordinate-systems.md). Sampling/API limits: [sensor-api-decisions.md](docs/sensor-api-decisions.md). Storage/export: [storage-export.md](docs/storage-export.md). Candidate metric formulas and limitations: [analysis-metrics.md](docs/analysis-metrics.md). Watch follow-up: [watch-readiness.md](docs/watch-readiness.md).

## Build and verify

```sh
./scripts/test-core.sh
DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild \
  -project RideForm.xcodeproj -scheme RideForm \
  -destination 'platform=iOS Simulator,id=2315A3BD-AC4F-46A2-89E3-2C96AD7B1A37' test
python3 scripts/verify-export.py --help
```

Choose a locally installed simulator for other Macs. Deterministic core tests use actual timestamps and analytic fixtures; simulator acquisition is explicitly synthetic workflow evidence. No requested rate, simulator result or speech cue establishes physical sensor latency, achieved hardware rate, mounting stability or rider quality. The full experiment is complete only after the required physical dataset and independent labels exist.
