The word planet comes from Greek planetes, wanderers, because the planets appear to wander across the celestial sphere, contrary to the fixed stars. This thesis presents several methods for using this motion to distinguish between stars and solar system objects in order to detect and track NEOs, Near Earth Objects: Asteroids and comets following paths that bring them near the Earth. NEOs have collided with the Earth since its formation, some causing local devastation, some causing global climate changes, yet the threat from a collision with a near Earth object has only recently been recognised and accepted. The European Space Agency mission Gaia is a proposed space observatory, designed to perform a highly accurate census of our galaxy, the Milky Way, and beyond. Through accurate measurement of star positions, Gaia is expected to discover thousands of extra-solar planets and follow the bending of starlight by the Sun, and therefore directly observe the structure of space-time. This thesis explores several aspects of the observation of NEOs with Gaia, emphasising detection of NEOs and the quality of orbits computed from Gaia observations. The main contribution is the work on motion detection, comprising a comparative survey of five different motion detection tests, one of which is proved to be optimal among all translation invariant and symmetric tests.