# Directions, orientation and brightness

Run `python generate.py` with numpy and matplotlib. Exports six known synthetic directions, 300 seeded trials, three summaries and 303 magnitude rows, with two original PNG/SVG/PDF figures. This is not star recognition or a real catalogue experiment.

Six camera directions normalize [u,v,1], for (u,v)=(-0.20,-0.12),(-0.12,0.15),(0,-0.18),(0.08,0.10),(0.18,-0.04),(0.22,0.17). Focal length is 800 pixels, principal point (640,480), image dimensions 1280×960 and positive image y points upward. The known inertial-to-camera rotation is Rz(7 degrees)*Ry(-5 degrees)*Rx(3 degrees). Inertial vectors are constructed by applying its inverse to the six camera directions. Thus all points are deliberately in view.

Known-correspondence equal-weight Wahba fitting uses the proper-rotation SVD solution. Independent Gaussian x/y centroid errors have standard deviations 0, 0.1 or 1 pixel, with 100 trials per level and numpy default_rng seed 20260927. Pixels are converted back into normalized unit directions before fitting. Rotation error uses atan2 of the antisymmetric rotation norm and trace to avoid acos precision loss near identity. An independent trace/acos calculation checks a finite test rotation.

Checks confirm unit-vector dot products/pair angles remain invariant under rotation, exact identity and zero-noise recovery, invariance when both correspondence lists are shuffled identically, and a wrong estimate when only one list is shuffled. One direction or repeated collinear directions returns no full attitude. Near-parallel conditioning and incorrect matches remain limitations. No recognition rejection policy or real-star identification rate is claimed.

The observed synthetic rotation error distributions depend on this fixed geometry and exact camera calibration. With 0.1 pixel noise mean/P95 error is approximately 0.01193/0.02597 degrees; with 1 pixel it is 0.12067/0.24555 degrees. These are empirical summaries of 100 simulated trials, not guaranteed accuracy or confidence intervals. Zero-noise error is numerical precision (about 9.1e-14 degrees). Orientation is not absolute location.

Relative magnitude uses delta_m=−2.5*log10(F/Fref) for 101 positive same-band ratios from 0.01 to 100. Assigned extinctions 0, 1 and 2 magnitudes produce attenuation 10^(−0.4*A) and add A to magnitude, giving 303 rows. A 100-fold brightness increase corresponds to −5 magnitudes. Zero, negative or nonfinite flux ratios return unavailable rather than a clamped number. No distance, luminosity or cross-band zero-point equivalence follows.

Official context in the chapter coverage review: NASA COTS Star Tracker repository describes a real detection/calibration/catalogue/attitude chain; the NASA Exoplanet Archive SuperWASP processing documentation gives the conventional logarithmic flux relation. Neither supplies performance parameters for these synthetic trials.
