it chanced that the moon was so situated at this time as to be nearly in a line between the earth and mars , which latter was in opposition to the sun , and consequently as favourably situated as possible for the purposes of the voyage .