So, as it turns out, both Haskell and space stuff are hard. It's been quite a while since I've done any serious math, so all of the nitty gritty calculus details are long gone from my head - not great for when you're talking about physics. Add a new programming language with a whole boatload of archaea to wade through and progress through the Space Operations course is going to be slow... and that's not even including the time diverted because of Kerbal Space Program (which is significant).
Anyways, I've updated my iHaskell notebook to include definitions for most of the basic physics covered in Unit 1 of Space Operations; feel free to go check it out if you're curious.
A note on units
One of the draws of using Haskell for this project was that the type system is powerful enough to express units of measure. There's several packages for doing that, but the one I wanted to try out was the conveniently named
units which has been used in astrophysics papers. I was particularly inspired by another iHaskell notebook which used the package, and thought it would help to verify the correctness of my functions while also giving some more flavor to the results.
Oh boy. As it turns out, it's a lot of work to get things working.
If you liked Haskell's often obscure type error messages, you're going to love
units. Most functions work ok, but some like the magnitude function just don't want to play ball at all:
As much as I'd love to have it working, I have other things I need to do in my life. That said, if you're a Haskell pro and think you can figure it out, my attempt at converting my notebook to use
units is available here. If you figure it out, leave a comment!