Simple algorithms for relative motion of satellites