Introducing SolarBeam

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:

:: random entries in this category ::

3 Responses to "Introducing SolarBeam"

  1. piyo says:

    Thank you for this program and even including my location (Kobe JAPAN). I'm not even an astronomy amateur but I wanted something like this. Is this first program of its kind or are there others?

    The next pie in the sky idea would be to integrate your favorite picture of your position or even with Google Maps Street View. Haha.

    BTW, you should emphasize that you can "animate" the picture by simply holding down on the date picker. Using day or hour was educational.

    Nitpick: About the date picker, I wish it was in YYYY MM DD order. As a USian I was confused by the "natural" DD MM YYYY order. Putting the year first probably alerts the user better on how to use the date picker.

    Nitpick: On my 1024 x 600 pixel screen on Windows, the bottom part of the window is not visible and there is no way to scroll to see it. Is it really important?

    BTW, I got to your blog by way of GitHub.
    http://github.com/blog/429-github-rebase-20

  2. numerodix says:

    > Is this first program of its kind or are there others?

    As far as I know there aren't. At least I haven't found any. There is this website http://gaisma.com/ that has some of the same information for various locations, but it's a completely static site and the diagrams don't have the same level of detail.

    > The next pie in the sky idea would be to integrate your favorite picture of your position or even with Google Maps Street View. Haha.

    Yeah, the whole "web enabled" thing. But I actually would not really want to do that, because it's supposed to be a standalone app that works just fine offline.

    > BTW, you should emphasize that you can “animate” the picture by simply holding down on the date picker. Using day or hour was educational.

    I mention this on the website, saying that you can interactively trace paths on the diagram. I guess that's not entirely clear but that's the terminology that's on my calculator w.r.t. to graphing, so I thought that would be the thing to call it.

    > Nitpick: About the date picker, I wish it was in YYYY MM DD order. As a USian I was confused by the “natural” DD MM YYYY order. Putting the year first probably alerts the user better on how to use the date picker.

    Well, you may know that there is some amount of friction about this between our continents. The format I used is the one that people use everyday in Europe, and in particular in Norway, which is where the app was written and the main audience is expected to be. So that's reasonable under the circumstances. Anyway, if you hover over the controls there are supposed to be tooltips that tell you what's what :)

    > Nitpick: On my 1024 x 600 pixel screen on Windows, the bottom part of the window is not visible and there is no way to scroll to see it. Is it really important?

    The original "spec" for SolarBeam was to run on 800x600, but that turned out to be not quite enough space. So that's why I said on the website the minimum requirement is 1024x768. You could of course move the window so that you can see the lower part without the upper, but that's not exactly convenient. If you're wondering what there is to see at the bottom, then have a look at the screenshots: http://solarbeam.sourceforge.net/screenshots.php

    > BTW, I got to your blog by way of GitHub.
    http://github.com/blog/429-github-rebase-20

    That's cool, I didn't know they had this kind of thing.

  3. [...] is the first time I’ve used gtk. I’ve written one program in the past using winforms and it was quite painful, so I wanted to try [...]