norikyu replied to the topic '"Aborting Autoguide" issue with Internal Guider' in the forum. 1 month ago

Hi.
I tested the sequence with the latest Ekos.
The auto guide using external lin_guider worked perfectly and dithering was successful.
The sequence was not aborted and worked Great!
thank you!

Read More...

norikyu replied to the topic '"Aborting Autoguide" issue with Internal Guider' in the forum. 1 month ago

Hi. knro.
I'm in trouble.
I think this problem is similar to the problem of the following thread.

indilib.org/forum/ekos/2254-aborting-aut...rnal-lin-guider.html

Is the total time of the guide capture timeout including the delay incorrect?
Is it the same when dithering is used with external lin_guider?

Read More...

norikyu replied to the topic '"Aborting Autoguide" issue with external lin_guider' in the forum. 1 month ago

Hi kcobby. thank you for advice.

I know at OAG that a small communication delay over the network worsens the guide.
Therefore, I use external lin_guider.

I would suggest turning OFF the dithering to measure the capture peculiarity.


I turned off dithering and tried it.
The sequence ended normally without being aborted.

I think that it is strange what to shoot a 128 pixel image.
I do not know what is the correct behavior.
Is this a bug?

Read More...

norikyu replied to the topic '"Aborting Autoguide" issue with external lin_guider' in the forum. 1 month ago

thank you for the advice.
It helps me a lot.

Sequence aborting still occurs.

  • Set to use external lin_guider.Internal guider is not used.
  • Make a shooting sequence. (Ex. Exposure 15 sec, Count 5, Delay 5 sec)
  • Start autoguide and sequence.
  • First shot. success.
  • Dithering execution. success.
  • Suddenly, an image of 128 pixels is taken.
  • Guide is aborted.
  • An image of 128 pixels and a full size image are taken.
  • The sequence is aborted.
why?
What is a 128 pixel imagese?

Read More...

norikyu created a new topic ' "Aborting Autoguide" issue with external lin_guider' in the forum. 1 month ago

Hello.
I am using the latest Ekos by "apt-get upgrade".
When guiding with the external lin_guider, shooting aborts every single shot.

It is a guide log right after aborting.

2017-05-23T12:33:10 Autoguiding aborted.
2017-05-23T12:33:09 Exposure timeout. Aborting Autoguide.
2017-05-23T12:33:06 Exposure timeout. Restarting exposure...
2017-05-23T12:33:04 Exposure timeout. Restarting exposure...
2017-05-23T12:33:01 Guiding resumed.
2017-05-23T12:33:01 Dithering completed successfully.
2017-05-23T12:32:06 Autoguiding started.

Exposure processing is running in the external guide.
Is this a correct process?

Read More...

Jasem Mutlaq thanked norikyu in topic SkySafari middleware? 1 month ago
norikyu replied to the topic 'SkySafari middleware?' in the forum. 1 month ago

Hi.
I made a patch corresponding to commands <SG>, <SL>, <SC> from SkySafari.
This patch can set the time information from SkySafari to the corresponding mount.
Turn on "Set Time & Location" of SkySafari.
You will be able to set the latitude, longitude and time using the GPS of the smartphone.

It worked with Celestron AVX and SkySafari 5 Plus (Android).
Someone please test this patch.

Read More...

norikyu replied to the topic 'SkySafari middleware?' in the forum. 2 months ago

I tested it with RPi3 INDI server and celestron AVX.
I could use SkySafari 5. Great!

Does "Set Time & Location" in "Common Setting" of SkySafari work?
This option is useful for initial setting to AVX.

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 3 months ago

Hello rumen.
Thank you for the new lin_guider announcement.

I tried dithering with a combination of lin_guider 4.2.0 and kstars 2.7.6.
It worked so perfectly!
I appreciate lin_guider and ekos, two great software.
Thank you.

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 4 months ago

Hi, knro.
You are welcome. Thanks for the hint.
I modified it using raw data as you suggested.
This is going very well.

The patch is as follows.
/kstars/ekos/guide/externalguide/linguider.h

 private:
     void sendCommand(LinGuiderCommand command, const QString &args = QString());
     void processResponse(LinGuiderCommand command, const QString &reply);

     QTcpSocket *tcpSocket;
+    QByteArray rawBuffer;

/kstars/ekos/guide/externalguide/linguider.cpp
 LinGuider::LinGuider()
 {
+    rawBuffer.clear();
     tcpSocket = new QTcpSocket(this);



 bool LinGuider::Connect()
 {
     if (connection == DISCONNECTED)
     {
+        rawBuffer.clear();
         connection = CONNECTING;


 bool LinGuider::Disconnect()
 {  
+    rawBuffer.clear();
     connection = DISCONNECTED;
     tcpSocket->disconnectFromHost();



void LinGuider::readLinGuider()
{
    while (tcpSocket->atEnd() == false )
    {
        rawBuffer += tcpSocket->readAll();

        while(1)
        {
            if (rawBuffer.count() < 8)
                break;

            if (Options::guideLogging())
                qDebug() << "Guide:" << rawBuffer;

            qint16 magicNumber = *(reinterpret_cast<qint16*>(rawBuffer.data()));
            if (magicNumber != 0x02)
            {
                emit newLog(i18n("Invalid response."));
                rawBuffer = rawBuffer.mid(1);
                continue;
            }

            qint16 command = *(reinterpret_cast<qint16*>(rawBuffer.data()+2));
            if (command < GET_VER || command > GET_RA_DEC_DRIFT)
            {
                emit newLog(i18n("Invalid response."));
                rawBuffer = rawBuffer.mid(1);
                continue;
            }

            qint16 datalen = *(reinterpret_cast<qint16*>(rawBuffer.data()+4));
            if (rawBuffer.count() < datalen + 8)
                break;

            QString reply = rawBuffer.mid(8, datalen);
            processResponse(static_cast<LinGuiderCommand>(command), reply);
            rawBuffer = rawBuffer.mid(8+datalen);
        }
    }
}

To solve multiple command responses and fragments, I added a buffer using QByteArray as a private member of the LinGuider class.
And, I rewrote LinGuider::readLinGuider().

Also, I modified LinGuider::processResponse ().
 void LinGuider::processResponse(LinGuiderCommand command, const QString &reply)
 {
 :
     case DITHER:
-        if (reply == "OK")
+        if (reply == "Long time cmd finished")
            emit newStatus(GUIDE_DITHERING_SUCCESS);
        else
            emit newStatus(GUIDE_DITHERING_ERROR);
This fix is not the best, but it is necessary for dithering to work for the time being.
A better answer is as proposed by rumen.

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 4 months ago

I looked at the debug output of Ekos.

When I dumped the response from lin_guider I noticed that I was receiving an irregular data stream.
A sample of the received data stream is as follows.

Guide: "\u0002\u0000\u000E\u0000\u000B\u0000\u0000\u0000-0.43 -0.02"
Guide: "\u0002\u0000\u000E\u0000\u0000\u0000\u0000-0.37 0.51"
Guide: "\u0002\u0000\r\u0000\u0002\u0000\u0000\u0000OK"
Guide:  "LinGuider::processResponse SET_DITHERING_RANGE"
Guide: "\u0002\u0000\u000E\u0000\u000B\u0000\u0000\u0000-1.37 -0.32"
Guide: "\u0002\u0000\u0004\u0000\u0002\u0000\u0000\u0000OK"
Guide:  "LinGuider::processResponse DITHERING"
Guide:  "Dithering completed successfully."
Guide:  "Guiding resumed."
Guide: Capturing frame...
Guide: "\u0002\u0000\u000E\u0000\t\u0000\u0000\u00000.03 0.87"
Guide: "\u0002\u0000\u000E\u0000\t\u0000\u0000\u00000.49 0.85"
Guide: "\u0002\u0000\r\u0000\u0002\u0000\u0000\u0000OK\u0002\u0000\u000E\u0000"
Guide:  "LinGuider::processResponse SET_DITHERING_RANGE"
Guide:  "Failed to set dither range."
Guide: "\u0000\u0000\u0000-0.27 0.64"
Guide:  "Invalid response."
Guide: "\u0002\u0000\u000E\u0000\t\u0000\u0000\u00000.14 0.63"
Guide: "\u0002\u0000\u000E\u0000\u000B\u0000\u0000\u0000-0.19 -0.86"
Guide: "\u0002\u0000\u000E\u0000\u000B\u0000\u0000\u0000-0.31 -0.49\u0002\u0000\r\u0000\u0002\u0000\u0000\u0000OK"
Guide: "\u0002\u0000\u000E\u0000\u000B\u0000\u0000\u0000-0.31 -0.49"

A normal response is:
Guide: "\u0002\u0000\u000E\u0000\u000B\u0000\u0000\u0000-0.43 -0.02"
Convert to byte sequence:
0x02 0x00 0x0e 0x00 0x0b 0x00 0x00 0x00 "-0.43 -0.02"
It has an 8-byte header and text data.


It shows a pattern of irregular response.
Guide: "\u0002\u0000\u000E\u0000\u000B\u0000\u0000\u0000-0.31 -0.49\u0002\u0000\r\u0000\u0002\u0000\u0000\u0000OK"
Convert to byte sequence:
0x02 0x00 0x0e 0x00 0x0b 0x00 0x00 0x00 "-0.31 -0.49" 0x02 0x00 0x0d 0x00 0x02 0x00 0x00 0x00 "OK"
The two command responses are consecutive.

Another pattern is:
Guide: "\u0002\u0000\r\u0000\u0002\u0000\u0000\u0000OK\u0002\u0000\u000E\u0000"
Convert to byte sequence:
0x02 0x00 0x0d 0x00 0x02 0x00 0x00 0x00 "OK" 0x02 0x00 0x0e 0x00
After the normal command response, the next command response fragment "0x02 0x00 0x0e 0x00" is attached.


Responses from lin_guider are handled by LinGuider::readLinGuider().
The response is read and processed from the socket using QTextStream, but it is assumed that it receives one command response from lin_guider.
It can not be handled correctly if multiple command responses receive consecutive data streams or responses with fragments.

This problem is unlikely to occur in high-speed network, high-speed CPU environment.
However, there is a possibility of occurrence in any network.

There is also a command response in which the header is broken.
For example,
Guide: "\u0002\u0000\u000E\u0000\u0000\u0000\u0000-0.02 0.90"
Convert to byte sequence:
0x02 0x00 0x0e 0x00 0x00 0x00 0x00 "-0.02 0.90"

There is only 7 bytes of header, and there is no length of text data.
Is the CRLF code (0x0d / 0x0a) automatically removed by QTextStream?

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 4 months ago

Thanks for your advice.It will be helpful.
Lin_guider is very lightweight and easy to use, so I like it very much.
I am looking forward to the new version.

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 4 months ago

Hi, rumen.
Thank you for detailed explanation.
I understood the specification of lin_guider.
It is said that the response of the DITHER command does not inform of the success of dithering.
I will undo my modifications.
Then fix it so that Ekos ignores the response of the DITHER command and try it.

I am debugging Kstars on communication with lin_guider.
I will report when I found something.

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 4 months ago

For problem #14929, I fixed lin_guider.

Line 996 of lin_guider_pack / lin_guider / src / lin_guider.cpp.

-         answer_sz = snprintf (answer, answer_sz_max, "Long time cmd finished");
+         answer_sz = snprintf (answer, answer_sz_max, "OK");
Lin_guider will now return "OK" after dithering.
I will wait for the correct fix by rumen.

However, the problem of #14978 has not been solved yet.
My Ekos sometimes stops as "Dither ...".
This does not always happen, it seems to be caused by bad timing.

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 4 months ago

Hi, rumen.
I tried lg_tool.pl after doing the calibration.

$ tools/lg_tool.pl guider start
GUIDER -> OK
$ tools/lg_tool.pl dither
DITHER -> Long time cmd finished
$ tools/lg_tool.pl guider stop
GUIDER -> OK

"Long time cmd finished" will be returned.

I have found another problem.
When dithering is executed from Ekos, the status will be displayed as "Dither ..." and the sequence may stop.
In normal operation, Ekos first sends the SET_DITHERING_RANGE command to the external lin_guider and then the DITHER command.
However, after SET_DITHERING_RANGE is sent, there seems to be a case where DITHER is not sent.
When lin_guider receives SET_DITHERING_RANGE, it returns "OK".
This "Dither ..." problem does not always occur.

knro wrote:

I changed the behavior in Ekos to resume capture even in case of dither failure since it is not usually detrimental to the capture process, but will make this configurable later.

Thanks for the update.
I will also test it.

Read More...

norikyu replied to the topic 'Dithering is not executed with external lin_guider' in the forum. 4 months ago

Hello.
Thanks for the advice.
I performed a calibration before the guide.
I will check for calibration errors. And I will try lg_tool.pl tonight.

Read More...

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!