As i wrote some days ago, I planned on doing some hack so control KStars with a Wiimote.

It turned out KStars isn’t the right target, as it seems to have no plug-in support (and I don’t want to modify core yet, as i’m still in an experimental phase).
But reading data from wiimote and correctly interpreting was already done some days ago, thought it was a little bit hard, so I switched to Stellarium instead.

This is the result:

Of course it’s just experimental code, it’s barely usable.. but it’s a start.
Source is here:

Now some technical stuff:
The Wiimote gyro sensors aren’t easy to read, as they don’t send you current angle, but only
It doesn’t report current angle, instead it does report angular speed.
But afterall you can deduce current angle just dividing speed by elapsed time between each message report.
I had to do some tries before finding the proper way of “moving view window” on Stellarium.
It’s not so well documented, and i’m not exactly happy about current solution, but it works, and i’ll ask some help in their mailing list soon.
This solution anyway is easier than i thought, as it only receives as input angles delta, meaning it’s also easy to “align” your telescope to stellarium (just point an object with telescope, then manually point stellarium to that object).
What’s missing:

  • better calibration (angles “seem” correct, but i’m not entirely sure…)
  • better movement translation (i’m ignoring one axis, they should be all taken into account, and compensate misalignment).
  • Maybe some alternative way of displaying wiimote data in stellarium, such as a “virtual” object in sky. this way you can see how close is your telescope to a desired object.
  • Equatorial mount support (currently if there is an axis rotation it’s not detected and properly corrected, and it’s interpreted the wrong way).
  • ….many other stuff, but it’s too early to get a detailed list 😛