%RWR_COLLECTION_SIM  Simulated B-21 RWR bearing collection along a flight path.
%   meas = RWR_COLLECTION_SIM(acN_km, acE_km) returns the noisy bearing the
%   RWR measures to every IADS emitter from every waypoint of your path.
%
%   Inputs
%     acN_km, acE_km  waypoint North and East coordinates [km]: equal-length
%                     vectors in the local North/East frame of
%                     IADS_Scenario.csv (defended target area at the origin)
%
%   Output: a table with one row per waypoint per emitter
%     wp          waypoint index into acN_km / acE_km
%     emitter_id  cell array of char, 'E1' | 'E2' | 'E3'. Select rows with
%                 strcmp(meas.emitter_id, 'E3') or meas.emitter_id == "E3";
%                 == 'E3' (char) errors on a cell array.
%     az_deg      measured bearing [deg] from North toward East, in
%                 (-180, 180]. Unwrap bearings that straddle +/-180 (an
%                 emitter roughly due south of the aircraft) before you
%                 average them.
%
%   Noise: zero-mean Gaussian, 1-sigma = 0.5 deg, independent on every row
%   and fresh on every call. It draws from MATLAB's global random stream, so
%   rng(seed) before the call makes a run reproducible.
%
%   Cut budget: the RWR delivers one independent bearing per 4 km of track
%   (a notional update rate at cruise), so a design may claim at most one
%   cut per 4 km of path flown -- a 60 km leg is 15 cuts. The simulator
%   accepts denser waypoints and repeat calls; the budget is a design
%   constraint you must honor and state.
%
%   Keep-outs: any waypoint is accepted, even one inside a keep-out circle.
%   The keep-out check is yours, along every segment of the path, not only
%   at the waypoints.
%
%   The true emitter positions are hidden inside the p-coded simulator;
%   IADS_Scenario.csv holds only the coarse prior. Estimating the positions
%   from your bearings is the project.
%
%   Example
%     meas = rwr_collection_sim([-80 -80], [-15 15]);
%     az   = meas.az_deg(strcmp(meas.emitter_id, 'E3'));
%
%   This .m file holds help text only. The simulator is rwr_collection_sim.p,
%   which must sit in the same folder; MATLAB runs the .p and reads this file
%   for help.
%
%   See also L19_Project2Starter.
