Astronomy examines the position of the planets and other heavenly bodies. It does not concern itself with how they affect the life of the world or the individual. It is not its function to find out how far the celestial bodies are beneficial to us or how they may be made favourable to us. Such functions belong to astrology. Jyotisa includes both astronomy and astrology.
Telling us about the results of performing a ritual at a given time, keeping in mind the position of the planets, the sun and the moon and the naksatras ( asterisms ), comes under the purview of astrology. The hours favourable to the performance of Vedic rites are determined according to calculations based on the movement of planets. All this entails mathematical work.
The measurements of the place where a sacrifice is to be conducted (yajnabhumi) are based on certain stipulations. These must be strictly adhered to if the sacrifices is to yield the desired benefits. Mathematics developed in this way as a handmaid to the Vedic dharma.
For a general background, please see here