The Optical Navigation System (ONS) is a flexible navigation system for deep space operations that does not require GPS measurements. The navigation solution is computed using an Unscented Kalman Filter (UKF) that can accept any combination of range, range-rate, planet chord width, landmark and angle measurements using any celestial object. The UKF employs a full nonlinear dynamical model of the orbit including gravity models and disturbance models. The ONS package also includes attitude determination algorithms using the UKF algorithm with the Inertial Measurement Unit (IMU). The IMU is used as the dynamical base for the attitude determination algorithms. That is, the gyros model is propagated, not the spacecraft model. This makes the sensor a more capable plug-in replacement for a star tracker, thus reducing the integration and test cost of adding this sensor to a spacecraft. The linear accelerometers are used to measure forces on the spacecraft. This permits accurate measurement of the accelerations applied by thrusters during maneuvers. The paper includes test results from three cases: a geosynchronous satellite, the New Horizons spacecraft and the Messenger spacecraft. The navigation accuracy is limited by the knowledge to the ephemerides of the measurement targets but is sufficient for the purposes of orbit maneuvering.