I'm trying to understand how star trackers on satellites work and what math they use to determine attitude. For example, is there any trigonometry involved with the stars and how specifically does that work? Or do star trackers use other forms of math?
Think of a large telescope mounted on the surface of the Earth. To see a certain star, you need to rotate the telescope around the vertical axis (azimuth) and to lift it above the horizon (altitude). If both angles are correct, you see that star in the center of the telescope.
So if the star tracker locates a certain star, two angels of the satellites coordinate system are known. But the rotation around the axis of the star tracker telescope is still unknown. A second star is needed to determine the rotation around this axis. Imagine another star close to the first one. Rotate until the second star is on the Y axis of the star tracker camera while the first star is at the origin. Now you have aligned all three axis of the satellite using two stars at well known positions.