Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rainbow Astro Simulate Pier Side not changing Pier Side on Meridian Flip #1932

Closed
gordoabc opened this issue Sep 8, 2023 · 11 comments
Closed
Labels

Comments

@gordoabc
Copy link

gordoabc commented Sep 8, 2023

Describe the bug
When Simulate Pier Side is selected in the driver control panel it correctly indicates current setting of pier side. When Meridian Flip or a boot on the opposite side of the sky is executed the Pier Side is not changed. This causes the mount to stop moving if an HA limit is set and Guiding doesn't work once the flip has happened

To Reproduce
Select "Simulate Pier Side" in the Rainbow Astro telescope driver control panel
Execute a goto to the other side of the pier
check pier side variable in the telescope control panel

Expected behavior
The Pier Side variable should change when the pier side changes

Desktop (please complete the following information):

  • OS: Ubuntu LTS 22.05
  • Version kstars/ekos 3.6.6

Log Files
log_18-59-34.txt

@gordoabc gordoabc added the bug label Sep 8, 2023
@knro
Copy link
Contributor

knro commented Sep 10, 2023

I contacted Rainbow to ask them about this. Maybe they can natively report pier side now and no need for simulation? Let's see. If you can ask them the same question that would be great.

@gordoabc
Copy link
Author

gordoabc commented Sep 10, 2023 via email

@gordoabc
Copy link
Author

I found the email on the rainbow astro website. Here is what I got back:

Hi. I'm Byoungjun Jeong from RainbowAstro.
I was asked the same question by someone else and answered as follows.

=======================================================================

Please see the attached PDF file first.
This is a file included with the ASCOM platform and I read it and decided it was correct to return "side of pier" according to the rotation angle of the physical "DEC" axis.
So we only need to know how much the DEX axis is rotated from its home position and the offset of the DEC axis calculated by the star alignment.

Through the " :CY# " protocol, you can know the rotation angle of the two axes of the mount.
If you send " :CY# " at home position, " :CY+000.00/-000.00# " will be returned.
The first is the DEC axis and the second is the RA axis.
The units are degrees.
If you rotate the DEC axis clockwise to make the OTA face north, " :CY+090.00/+000.00# " will be returned.

And you can find out the offset of the DEC axis calculated through star alignment through the " :CG3# " protocol.
Its return form is " :CG3+000.0000# " and the unit is degrees.

My Ascom driver has the following code for side of pier. You should be able to read and understand this.

               else if (strReceivedData.Contains("CG3")) //Dec Axis Alignment Offset
                {
                    strReceivedData = strReceivedData.Replace("CG3", "");
                    dbDecAxisAlignmentOffset = double.Parse(strReceivedData.Substring(0, 9), providerRB);
                }
                else if (strReceivedData.Contains("CY")) //Side of pier
                {
                    strReceivedData = strReceivedData.Replace("CY", "");
                    double dbDecAxis = double.Parse(strReceivedData.Substring(0, 7), providerRB);
                    double dbDecAxisForSideOfPier = dbDecAxis - dbDecAxisAlignmentOffset;

                    if (dbDecAxisForSideOfPier > 90)
                        SharedResources.nPierSide = 1; // pierWest
                    else
                        SharedResources.nPierSide = 0;  // pierEast (Normal)
                }

=======================================================================================================================================

@knro
Copy link
Contributor

knro commented Sep 12, 2023

Ok I pushed preliminary implementation for this but it's completely untested. Please try it out.

@gordoabc
Copy link
Author

gordoabc commented Sep 12, 2023 via email

@knro
Copy link
Contributor

knro commented Sep 13, 2023

You can test indoors

@gordoabc
Copy link
Author

OK - must be doing something stupid - when I switched to the nightly repository it doesn't pull the new version:

thomas@mele:$ sudo apt-get upgrade indi-full
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
indi-full is already the newest version (2.0.3+202308010715
ubuntu22.04.1).
Calculating upgrade... Done
The following packages have been kept back:
gjs libgjs0g openssh-client openssh-server openssh-sftp-server thermald
The following packages will be upgraded:
fxload kstars-bleeding kstars-bleeding-data kstars-bleeding-dbg
libomegonprocam libstellarsolver
6 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 211 MB of archives.
After this operation, 2,802 kB of additional disk space will be used.

Do I have to compile the driver instead?

@gordoabc
Copy link
Author

I compiled to driver and this got me to version 1.3 of the driver. IT does not seem to be getting a Pier Side:

[2023-09-14T20:48:32.825 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:CG3-000.8580> "
[2023-09-14T20:48:32.826 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:CY#> "
[2023-09-14T20:48:32.841 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:CY+141.14/-061.96> "
[2023-09-14T20:48:33.092 MDT DEBG ][ org.kde.kstars.ekos.mount] - Ha: -1.86925 haLimit 0.3 "Pier Side: Unknown" haLimitReached false lastHa -1.88406
[2023-09-14T20:48:33.092 MDT DEBG ][ org.kde.kstars.ekos.mount] - Mount status changed from "Slewing" to "Tracking"
[2023-09-14T20:48:33.095 MDT DEBG ][ org.kde.kstars.ekos.mount] - Slew finished, MFStatus "MOUNT_FLIP_NONE"
[2023-09-14T20:48:33.841 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GR#> "
[2023-09-14T20:48:33.847 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GR21:12:12.7> "
[2023-09-14T20:48:33.847 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GD#> "
[2023-09-14T20:48:33.863 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GD+3759'05.9> "
[2023-09-14T20:48:33.863 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GZ#> "
[2023-09-14T20:48:33.879 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GZ075
44'52.9> "
[2023-09-14T20:48:33.879 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GA#> "
[2023-09-14T20:48:33.896 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GA+6729'10.5> "
[2023-09-14T20:48:33.897 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:CG3#> "
[2023-09-14T20:48:33.911 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:CG3-000.8580> "
[2023-09-14T20:48:33.911 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:CY#> "
[2023-09-14T20:48:33.930 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:CY+141.14/-061.97> "
[2023-09-14T20:48:34.093 MDT DEBG ][ org.kde.kstars.ekos.mount] - Ha: -1.86881 haLimit 0.3 "Pier Side: Unknown" haLimitReached false lastHa -1.86925
[2023-09-14T20:48:34.927 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GR#> "
[2023-09-14T20:48:34.934 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GR21:12:12.7> "
[2023-09-14T20:48:34.934 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GD#> "
[2023-09-14T20:48:34.949 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GD+37
59'05.9> "
[2023-09-14T20:48:34.950 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GZ#> "
[2023-09-14T20:48:34.965 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GZ07544'54.6> "
[2023-09-14T20:48:34.966 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:GA#> "
[2023-09-14T20:48:34.982 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:GA+67
29'23.2> "
[2023-09-14T20:48:34.982 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:CG3#> "
[2023-09-14T20:48:34.998 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:CG3-000.8580> "
[2023-09-14T20:48:34.999 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] CMD <:CY#> "
[2023-09-14T20:48:35.013 MDT DEBG ][ org.kde.kstars.indi] - Rainbow RST-135 : "[DEBUG] RES <:CY+141.14/-061.97> "
[2023-09-14T20:48:35.092 MDT DEBG ][ org.kde.kstars.ekos.mount] - Ha: -1.86853 haLimit 0.3 "Pier Side: Unknown" haLimitReached false

I homed it and drove around a bit. Tried meridian flip calibrate in PHD2 but it also flags Pier Side Unknown.

@gordoabc
Copy link
Author

log_18-47-13.txt

@knro knro closed this as completed in f821d7f Sep 15, 2023
@knro
Copy link
Contributor

knro commented Sep 15, 2023

Please try to compile again and report back

@gordoabc
Copy link
Author

Still reports Pier Side unknown in log and PHD2 meridian flip calibrate
log_05-32-49.txt

knro added a commit to knro/indi that referenced this issue Sep 21, 2023
knro added a commit to knro/indi that referenced this issue Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants