# MEMORY

This file is the durable handoff for AI agents working in this repository. Keep it short, factual, and current. If it ever drifts from the source docs or code, update this file to match the real source of truth.

## Working With the Operator

The operator has ADHD. This means:

They may squirrel down tangential paths — if the conversation drifts far from the task at hand, gently reframe by summarizing where we started, what we've done, and what's still open.
Periodic big-picture reviews help — when a session gets deep into details, proactively offer a summary of the larger context (current priorities, what's in-flight, what's blocked).
Keep TODO.md and this file updated — these are the external memory that bridges sessions. If something important is discussed but not captured, it's lost.
Be direct about scope creep — if a "quick fix" is turning into a multi-file refactor, flag it. Help them decide: do it now, or capture it and come back.

## Guardrails

- Treat `/docs` as authoritative for assignment requirements and parameter values.
- Do not invent missile or target thrust, mass, drag, or geometry tables. Transcribe them from the source packet and note what was extracted.
- Preserve SI units unless a document explicitly states otherwise.
- Keep [`code/Interceptor_3DOF.m`](./code/Interceptor_3DOF.m) as the primary entry point unless there is an intentional repo-wide refactor.
- Do not describe the model as runnable until all `XX` placeholders are replaced and `getRho.m` exists.
- Record every meaningful assumption, extracted constant, unresolved issue, and verification result here.
- Use exact dates in status notes.
- Do not store secrets, tokens, or personal data in this file.

## Current Snapshot

- Date: `2026-03-28`
- Project: MATLAB 3DOF interceptor-versus-target engagement assignment for AERO 3220 Spring 2026.
- Source docs reviewed:
  - `docs/AERO 3220 3DOF Information Spring 26.pdf`
  - `docs/Atmosphere Model SI Units.pdf`
  - `docs/Missile and Target Data for 3DOF Spring 26.pdf`
- Assignment baseline confirmed from the handout:
  - Velocity pursuit guidance gain = `0.5`
  - Blind range = `2 m`
  - Acquisition range = `5000 m`
  - Lateral acceleration limit = `40 g`
  - Velocity-pursuit guidance start delay = `0.5 s` after missile launch
  - Terminal proportional-navigation gain = `4`
  - Commit time = `50 s`
  - Missile initial elevation angle = `40 deg`
- Required plots confirmed:
  - Target/missile vertical-plane trajectories
  - Target speed versus time
  - Missile speed versus time
  - Missile Mach number versus time
  - Missile acceleration magnitude versus time since missile launch

## Code Status

- [`code/Interceptor_3DOF.m`](./code/Interceptor_3DOF.m) drives the integration loop, plotting, and CSV export.
- [`code/T3dxdt.m`](./code/T3dxdt.m), [`code/M3dxdt.m`](./code/M3dxdt.m), and [`code/getGuidance.m`](./code/getGuidance.m) still contain `XX` placeholders.
- `getRho.m` is referenced by the driver and both dynamics functions, but the file is missing.
- [`code/getMD.m`](./code/getMD.m) exists and computes miss distance at the point of closest approach.
- The missile/target data PDF appears image-based; a future agent should log the extraction method used when those tables are transcribed.

## Next Actions

1. Implement `getRho.m` from the atmosphere-model PDF.
2. Transcribe missile and target geometry, thrust, mass, and drag data from the missile/target packet.
3. Replace all remaining `XX` placeholders with sourced values.
4. Run the MATLAB model and verify the required plots and CSV outputs.

## Update Protocol For Agents

After any meaningful change, update:

- `Current Snapshot` if assumptions, sourced values, or operating context changed.
- `Code Status` if files were added, edited, or made runnable.
- `Next Actions` so the current critical path stays accurate.
- `Change Log` with a short dated note.

## Change Log

- `2026-03-28`: Created `README.md` and `MEMORY.md` from the `/docs` PDFs and current MATLAB code. Confirmed the repo is still an incomplete assignment skeleton with unresolved placeholders and a missing `getRho.m`.
