Sines and cosines are commonly introduced as ratios of sides of a triangle with its hypotenuse and attributed to ancient Indian scholars. However, I've never actually thought of the reason for introducing sine/cosine to mathematical analysis. What exactly led to the need for sines and cosines? What were the Indian astronomers trying to compute that necessitated the existence of such trigonometric functions?
The closest I've come is this lecture by an Indian professor who explains it as follows:
The derivation below has a few odd symbols, not in the diagram above, but it's easy to verify this by hand. The basic premise is that the orbit of planets isn't purely circular and thus a correction needs to be applied to compute its true position. This computation necessitates the need for sines and cosines.
The calculation above depends on the existence of $sin$ and $sin^{-1}$ functions "proving" their need, so to speak.
This was the first time I've come across something like this. Are there any other references anywhere in existing math literature? Is this accurate?