An optimal smoothing algorithm for Viking spacecraft attitude determinationA fundamental requirement for ground analysis of onboard attitude control systems is the determination of the time evolution of spacecraft angular orientation and velocity, and of external torques acting on the spacecraft. However, at times, there are limitations on the data received on the ground, and essential but missing variables must be estimated. This paper contains a description of the design and implementation of an algorithm for angular position, velocity, and torque estimation. The algorithm has been used to analyze the performance of the Viking Orbiter attitude control system. Typical results of this analysis are presented.