Tag Archives: Celestial Coordinate System

Slow Progress Is Still Progress

Impatient
Impatient… BTW – Not my dinosaur gif!

Eeep! Not much since last update… a week ago. I had to clear something off my ToDoList. Well at least I can say I got the driver connected and talking to the Arduino.

Part 1 : Arduino Code

– This code will blink the onboard LED (pin13) however many times the length of the command string that is being read on Serial, whose command string is terminated by a ‘#’ character

String temp;

void setup() {
    // put your setup code here, to run once:
    Serial.begin(19200);
    pinMode(13, OUTPUT);
    digitalWrite(13,LOW);
}

void loop() {
    // put your main code here, to run repeatedly: 

    if (Serial.available())
    {
        //readStringUntil will consume the '#' character
        temp = Serial.readStringUntil('#');

        for (int i = 0; i < temp.length(); i++) {
            digitalWrite(13,HIGH);
            delay(200);
            digitalWrite(13,LOW);
            delay(100);
        }
        delay(1);
    }
    delay(100);
}

Part 2 : Telescope Driver Code

– This code snippet belongs to the Connected member object, which includes get() and set() functions. The get() just returns whether or not the driver already established a connection to the hardware. The set() checks if we’re already connected, and if not, then we establish a serial connection to the Arduino over the ASCOM.Utilities.Serial Library. Common serial parameters I use are port 26 and baud 19200. It also sends a text message to the Arduino to confirm that it’s established a connection. The next step would be to have the Arduino send back an acknowledgement text message.

private ASCOM.Utilities.Serial objSerial;

public bool Connected
{
    get
    {
        tl.LogMessage("Connected Get", IsConnected.ToString());
        return IsConnected;
    }
    set
    {
        tl.LogMessage("Connected Set", value.ToString());
        if (value == IsConnected)
        return;

        if (value)
        {
            connectedState = true;
            tl.LogMessage("Connected Set", "Connecting to port " + comPort);
            // TODO connect to the device
            objSerial = new ASCOM.Utilities.Serial();
            objSerial.Port = 26;
            objSerial.Speed = SerialSpeed.ps19200;
            objSerial.Connected = true;
            objSerial.Transmit("Hello Arduino#");
        }
        else
        {
            connectedState = false;
            tl.LogMessage("Connected Set", "Disconnecting from port " + comPort);
            // TODO disconnect from the device
            objSerial.Connected = false;
        }
    }
}

Soo yeah. That’s all I’ve accomplished for now. I’m considering writing the MoveAxis method, and the SlewToAltAz method. Eventually, I’ll be able to move the telescope by sending it a text command, such as “SlewToAltAz(123.45678, 98.76543)#” or “MoveAxis(0,0.01234)#”, with each command ending in ‘#’ character. I’m not sure how to invoke those functions through the driver test app yet, but I might have to make a form in Visual Studio. I’m thinking something like a simple CNC manual Jog feature interface.

After I can get those two functions working, then we’ll figure out how to translate between the telescope’s machine coordinates and the coordinate based on planet earth…

I’ll leave you with one of my favorite comic strips:

John Heeris http://heeris.id.au/
John Heeris http://heeris.id.au/

 

Until next time

-david

Plate-solving : What is it good for?

Wikipedia
Wikipedia

Ok – so let’s assume we have a functioning, working telescope. This telescope has it’s own set of coordinates in relation to it’s location on planet earth, and the exact time of day. These coordinates in theory should work with the World Coordinate System on which numerous star databases are built upon. If we want to use other star catalogs, we have to be very confident in our telescope’s coordinate system. If we direct our telescope to a known stellar object, and we see that our telescope fails to point at that object, then we have a misalignment somewhere. There are several reasons our telescope could be out of alignment : poor polar alignment, unbalanced mount, misalignment of the optical tube assembly, etc.

So, how do we correctly and accurately compensate for these errors? We use plate-solving. Plate solving is best described somewhere else. What plate solving entails is :

  1. Pointing the telescope at a visible, known celestial body
  2. Taking a digital photograph of what is visible
  3. Making note of the exact time and ‘intended coordinates’
  4. Connecting to an online star database
  5. Finding a match for that photograph using some fancy open source computer vision software
Unimap, one of the plate solving softwares we want to try.
Unimap, one of the plate solving softwares we want to try.

What follows next is we compare that match’s coordinates to the telescope’s coordinates, and apply some error correction techniques so that in the future, our telescope will point more accurately.

There are numerous plate solving softwares. Not all of them require an ASCOM driven telescope. But the fancy ones do. That’s what I’m building at the moment – the ASCOM-compliant hardware driver. (I’m actually quite busy this week, so don’t expect it to get done any time soon.)

We don’t necessarily have to write the fancy computer vision software, or dig through an online database – those parts are already done for us. But we could try to make those, if we could develop something EVEN better…

Sorry, that’s all for now. Next post ought to be better after I make some progress.

-david

Upcoming astronomical events, from Sea and Sky Astronomical Reference Guide

  • April 13 – 18International Dark Sky Week
  • April 18New Moon
  • April 22, 23Lyrids Meteor Shower
  • April 25International Astronomy Day