The main objective of this paper is to develop and simulate a nonlinear attitude tracking control algorithm. In this research, the designed controller is supposed to track the desired time varying attitude of a satellite in the presence of inertia uncertainties and external disturbances. Another restriction for this novel controller is that it should be implementable and more applicable for implementation in a real-time situation. In order to have an accurate and thorough model, the actuators are reaction wheels and the actuator dynamics are modeled in addition to spacecraft dynamics. By modeling actuator dynamics, the control signal is direct current motor voltage, which is the most fundamental control variable, and can be generated easily by a motor driver in practical cases. To achieve a robust tracking of the desired time varying attitude, a sliding mode controller is designed and adaptive techniques are developed based on sliding mode control to overcome the inertia uncertainties and to estimate and compensate for external disturbances. Since the quaternion illustration of equations makes it more straightforward to deal with the mathematical operation in three dimensions, and there are advantages such as singularity rejection, the kinematic equations of the satellite are parameterized using quaternion parameters and a novel control law will be derived by using a new facilitating approach to controller design, which is based on quaternion algebra. Using this approach, it will be easier to deal with tedious mathematical operations and, in contrast with most of the previous studies, the terms corresponding to derivatives of the desired attitude are not neglected and the tracking capability is retained. The global stability of both methods is investigated and proved using the Lyapunov stability theorem.