Positions come from an ephemeris, and the corrections cost more than the lookup
Reading a planetary longitude out of a numerical ephemeris and interpolating it is the easy part. The corrections are not: civil time converted to the ephemeris time scale, position adjusted for the observer, then the sidereal shift. Sidereal systems subtract an ayanamsa from the tropical longitude, and the common variants disagree by around a degree. That is enough to move a planet across a sign boundary, so the ayanamsa is a stored input, never a constant.



