An investigation of the constant of refraction from observations at Leiden and at the Cape