If the true longtitude of the planets (grahaspasta) is greater than the longtitude of the sun (suryaspasta), Jupiter, Mars and Saturn sets in the west. If their longtitude is less than that of the sun, they rise in the east. Similar is the case with retrograde Venus and Mercury.