Welcome Guest. [Log In / Register]

The Moon Application

Large mobile app tile


  • Where’s that darn moon?
  • Am I in danger from lycanthropes?
  • If I go down on one knee will she be able to see the romantic moon behind me?
  • If this only happens once in a blue moon then when will it happen again?




The answers to these and many other lunar questions can be in the palm of your hand with the Moon application from CherSoft. This is a Windows Phone Application which we have just launched.

We’ve had fun building this application. The core code is the same astronomical algorithms as used in Nuno™. With these we can calculate the relative positions of the earth, the sun and the moon. And with that we can calculated what the moon will look like, when sunrise will be and a bunch of other useful things. The algorithms are based on the work of Jean Meeus, a Belgian Astronomer specializing in celestial mechanics. In particular his book ‘Astronomical Algorithms’, first published in 1991, was a great guide to getting the code right.

First problem was that the code is in C++ and we really needed C# for the Windows Phone. It may be possible to use C++ on a phone but it did not seem a natural fit so we decided to bite the bullet and port it into C#. This actually proved to be reasonably painless. C++ and C# are really quite similar. Not so close that we could do a mechanical translation but not so far that we couldn’t use the same basic approach and organization.

The way to create User Interfaces on a Windows Phone is with XAML. As you can probably guess this is a type of XML. That is just a mechanism. The import concept is that the visual aspects can be developed almost independently of the underlying code. It is really quite clever, and powerful, and fast. We found we could really concentrate a lot more on getting the appearance just right without having to spend a lot of time messing with code. Of course being programmers we did mess with the code if only to see what was going on. But not as much as we usually do.



End result is our shiny new application, cunning titled ‘Moon’ and available in the Windows App Store right now. Moon application can tell you exactly where the moon is:

  • Altitude, Azimuth, Distance, Illumination
  • Next phases
  • Rise and Set times




This is one end result. Another is that we have been looking at ways that we can use some of this stuff in Nuno™. First off we could have a phone app associated with Nuno™. What would this do? I am not sure. The screen is a bit small for viewing charts but that is a possibility. How about an app which would act as a route monitor? It would warn you of the next approaching waypoint and tell you about the course to steer. What would you want on a phone?

wp7_152x50_greenYet another end result is that we may start using XAML in Nuno™. You might not actually be able to spot this but watch out for some niftier bits of UI and controls. In the meantime go and check out the Moon app. It only costs $0.99, it has a trial mode if you don’t want to pay anything and it does Blue Moons.

Comments are closed