The determination of the rotational state of solar system bodies from orbit