Optical Navigation For A Spacecraft In A Planetary System