The theory and practice of great circle sailing, under one general rule