tags: C#, JavaScript, TypeScript

Some years ago I started a little library written in F# to perform calculations for astronomy. This was published on an open source platform hosted by Microsoft of which the name escapes me it was that long ago. I never did much maintenance with it for many years and it was just for learning about functional programming. Since then I have created the ObsPlanner website for astronomy which uses many hand written JavaScript routines as well as lots of C# code that do similar things to the JavaScript ones. Because of this I have created a repository on GitHub which I aim to build up over the coming months that is a cross language astronomical library for performing basic functions such as:-

  • calculating Julian dates
  • sun rise/sun set
  • moon rise/moon set
  • moon phases
  • conversions between different times (Local Sidereal Time to Universal Time etc)
  • conversions between different positional systems (Right Ascension and Declination to Altitude Azimuth and vice versa)
  • and many more

I plan on writing this library using TypeScript and C#, so JavaScript can easily be created by simply compiling the TypeScript files. Also I am taking a TDD approach using Jasmine, for JavaScript and MSTest for the C# code.

It is early days, and there is not much there at the moment, in fact I am not even sure how to structure the whole thing, but anyway keep an eye on the repo if you want to be kept up to date with it.

https://github.com/asteropesystems/AstroLib

Happy coding