The advanced stellar compass (ASC) star tracker installed onboard the Danish Oersted satellite designed to map the earth's magnetic vector field is presented. The ASC instrument will provide attitude data for the satellite and its payload. It consists of a CCD camera connected to a microcomputer, and operates by comparing star images from camera frames with its internal star catalogs. The instrument design is detailed, considering its key parameters, operating principles, and the different types of noise and error sources. A ground-based real sky evaluation and the calibration of the ASC are reported.