Archive for May 2nd, 2009

Introducing SolarBeam

Saturday, May 2nd, 2009

I don’t usually code gui. It takes too much work to do it right and I can generally get a perfectly usable interface on the cli with much less effort. But exceptions can be made. These past few months I’ve been busy with a c# project written in Windows Forms. It’s not a big application, but it’s bigger than the kind of stuff I do most of the time, about 10kloc. I did quite relish this opportunity to try out Mono, which I’ve been meaning to do for some time.

solarbeam_diagrampane

The subject matter is solar diagrams. I guess there is no precise meaning for this phrase but I use it to talk about charts of the Sun’s trajectory over the Earth. You have to be able to compute where the Sun is at any given time, and then you can draw these charts. Here’s one for Utrecht.

solarbeam_diagram

The axis along the radius is the elevation. The other axis, along the circumference, is called the azimuth. With those two facts you can express where the Sun is in the sky. And the diagram depicts that trajectory with you, the observer, standing in the center. The application also tells you a few other related details, like the time of sunrise and sunset, dawn and dusk.

Technically speaking, it’s a portable app, so you can plop it down anywhere on the file system and it runs. This was one of the key requirements actually, so that people can run it on their work machines or in labs, which tend to be restricted environments.

Diagrams can also be saved to image and scaled. Considering how much computation is going on there, I’m quite pleased with how responsive it turned out. There’s also a funky clickable map and a collection of 2000 predefined locations, complete with timezone information.

solarbeam_map

Visit the project: