methods of calculating cosmic distances