The GLAS Algorithm Theoretical Basis Document for Precision Attitude Determination (PAD)