# Hayden Project

Hayden Project is a MATLAB 3DOF interceptor-versus-target engagement simulation repository for the AERO 3220 Spring 2026 coursework. The project is driven by the PDFs in [`docs/`](./docs) and implemented through the MATLAB files in [`code/`](./code).

## What The Docs Define

- [`docs/AERO 3220 3DOF Information Spring 26.pdf`](./docs/AERO%203220%203DOF%20Information%20Spring%2026.pdf) defines the assignment, required plots, and evaluation settings.
- [`docs/Atmosphere Model SI Units.pdf`](./docs/Atmosphere%20Model%20SI%20Units.pdf) provides the SI-unit atmosphere equations for temperature, pressure, density, acoustic speed, and Mach number.
- [`docs/Missile and Target Data for 3DOF Spring 26.pdf`](./docs/Missile%20and%20Target%20Data%20for%203DOF%20Spring%2026.pdf) is the source packet for the missile and target geometry, propulsion, and drag data that must be transcribed into the simulation.

## Assignment Baseline

The course handout specifies these evaluation values:

- Velocity pursuit guidance gain: `0.5`
- Blind range: `2 m`
- Acquisition range: `5000 m`
- Lateral acceleration limit: `40 g`
- Time after missile launch to initiate velocity-pursuit guidance: `0.5 s`
- Terminal proportional-navigation gain: `4`
- Commit time: `50 s`
- Missile initial elevation angle: `40 deg`

The required outputs are:

- Target and missile trajectories in the vertical plane (`x` vs `z`)
- Target speed versus time
- Missile speed versus time
- Missile Mach number versus time
- Missile acceleration magnitude versus time since missile launch

## Current Code State

- [`code/Interceptor_3DOF.m`](./code/Interceptor_3DOF.m) is the top-level driver script and writes `Ttrajectory.csv` and `Mtrajectory.csv`.
- [`code/T3dxdt.m`](./code/T3dxdt.m) and [`code/M3dxdt.m`](./code/M3dxdt.m) contain the target and interceptor dynamics models.
- [`code/getGuidance.m`](./code/getGuidance.m) holds the guidance-law logic.
- [`code/getMD.m`](./code/getMD.m) computes miss distance near the point of closest approach.

At the moment, the repository is a partially completed assignment skeleton rather than a finished simulation:

- Multiple required values are still marked as `XX`.
- `getRho.m` is referenced by the code but is not present in the repository.
- The missile/target data packet still needs to be fully transcribed into MATLAB arrays and constants.

## Working Expectations

- Keep units in SI unless a source document explicitly states otherwise.
- Treat `/docs` as the authoritative source for assignment requirements and parameter values.
- Record assumptions, extracted tables, unresolved issues, and verification status in [`MEMORY.md`](./MEMORY.md).

## For AI Agents

Read [`MEMORY.md`](./MEMORY.md) before making changes. Use it as the project's durable handoff for assumptions, sourced values, open work, and guardrails, and update it after any meaningful change so the next agent can continue without re-discovering context.
