Tags
arduino, astronomy, coding, math, programming, taylor series
I’ve been thinking of writing an astronomical toolkit for Arduino, to help users build their own go-to telescope mounts, satellite trackers, heliostats, and other cool amateur astronomy equipment. As anyone who has ever worked with astronomical coordinate systems know, since astronomers treat the sky as a 2 dimensional spherical surface, most calculations involving positions on this surface involve a good deal of trigonometry. While the Arduino library includes built-in functions for sine and cosine, it lacked the inverse trigonometric functions arcsine and arccosine. These are necessary if you ever need to convert a length ratio into an angle. It is impossible to convert between different sky coordinate systems (like Horizontal and Equatorial, the two most common) without access to these functions. In today’s post, I’ll show you how I wrote my own arcsin() and arccos() functions using Taylor polynomials.