Meridian flip

Questions, tips, information and discussions about using the SharpCap Sequencer and Sequence Planner tools
cyrille.de.brebisson
Posts: 68
Joined: Sun Oct 01, 2023 4:42 pm

Re: Meridian flip

#11

Post by cyrille.de.brebisson »

Hello,

I am trying to create a sequence that will image all targets in a target file, while handling dawn, horizon issues, and meridian flip.

My main issue is of course meridian flip.
What is the best way to handle it?

Note: My mount is configured to allow up to 30 minutes past the meridian and any goto to an area that would cause passing the meridian within 15 minutes will cause a flip.

I thought about 2 different approaches.
I first wanted to use STOP AT 0 FROM MERIDIAN.
But, after the END STOP AT, how can I tell that the reason for being there was a meridian issue and do the flip and finish the capture?

Then I thought about a "periodic" test of mount position that will test if flipping is an option and perform it if possible.
But once again, I could not find how to do it...
Can you help?
Thanks.

Code: Select all

SEQUENCE

    DEF SUB "MeridianFlip"
        # Can I test for meridian and do a flip if needed?
        IF 0 FROM MERIDIAN
                MOUNT FLIP # What will this do exactly? will it just do a goto to the current coordinate hopping for the mount to flip?
                MOUNT SOLVEANDSYNC
        ENDIF
    END SUB
    
    GUIDING CONNECT
    PERIODIC "MeridianFlip" EVERY 60

    STOP AT CivilDawn
        LOOP EACH RADEC IN C:\Users\cydeb\Desktop\share\targets.txt
        # The file can contain the name and coordinates. Would it be possible to add "variables" such as exposure times and frame count?
            STOP AT 15 FROM HORIZON
                SET EXPOSURE TO 1
                MOUNT SOLVEANDSYNC
                SAVE MOUNT COORDINATES
                SET EXPOSURE TO 120
                GUIDING START
                GUIDING WAIT
                STOP AT 0 FROM MERIDIAN
                    CAPTURE 11 FRAMES
                END STOP AT
                GUIDING STOP
                
                IF 0 FROM MERIDIAN # How do I do that?
                    MOUNT FLIP # What will this do exactly? will it just do a goto to the current coordinate hopping for the mount to flip?
                    MOUNT SOLVEANDSYNC
                    GUIDING START
                    GUIDING WAIT
                    CAPTURE ??? FRAMES # How can I tell it how many frames???
                    GUIDING STOP
                ENDIF
                    
            END STOP AT
        END LOOP
    END STOP AT
    
    END PERIODIC
    GUIDING DISCONNECT
    MOUNT PARK
END SEQUENCE
User avatar
admin
Site Admin
Posts: 17344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Meridian flip

#12

Post by admin »

Hi,

so, basically your aim is to have a long 'to do' list of things to capture and to handle the meridian wherever it happens to occur within that list - that is probably the hardest to get working, certainly harder than the simpler case of a single target and dealing with the meridian flip occurring sometime during the imaging of that target.

The only way to try to deal with the more complex problem in the sequencer is to use the step

'Run the contained steps when the mount is within <x> minutes of the meridian'

Put that step near the start of your sequence after all the setup stuff. The code inside doesn't run straight away, instead, every time SharpCap reaches a point where the sequence can be interrupted safely, the sequencer code will check if the mount has moved within the specified target distance of the meridian, and if so the steps contained inside the block will be run before the normal sequence code continues. So, if you can get all the steps required to actually do the flip, get back on target, etc, inside that block then you should have something that works...

What do I mean by 'can be interrupted safely'? Basically that means either between other sequencer steps (after one step finished, but before the next starts), or in between still frames being captured in the 'capture still frames' step.

cheers,

Robin
cyrille.de.brebisson
Posts: 68
Joined: Sun Oct 01, 2023 4:42 pm

Re: Meridian flip

#13

Post by cyrille.de.brebisson »

Hello,

Thanks for the pointer. Here is the revised code. But I still do have some questions:

1: Am I correct in assuming that "LOOP EACH RADEC IN C:\Users\cydeb\Desktop\share\targets.txt"
will, for each line, change the target name, slew to the coordinates, and wait for the slew to complete before moving on?

2: Am I correct in assuming that the "PERIODIC "MeridianFlip" WHEN WITHIN 0 MINUTES OF MERIDIAN" will ONLY run when the scope is on the west side of the pier? I mean, just after the meridian flip is completed, the scope will also be within 0 minutes of meridian, just on the other side... I would not want the periodic to run again and again.. or should I add a "PERIODIC "MeridianFlip" STOP" within the periodic?

3: In the PERIODIC, I try to use the coordinates saved at the start of the loop. Will this work ok?

4: Would it be possible to encode the exposure time in the text file in the same way that the target name is encoded (in addition to coordinates)?

Thanks,
Cyrille

Code: Select all

SEQUENCE

    GUIDING CONNECT

    STOP AT CivilDawn
        LOOP EACH RADEC IN C:\Users\cydeb\Desktop\share\targets.txt
            STOP AT 15 FROM HORIZON
                SAVE MOUNT COORDINATES
                
                PRESERVE CAMERA SETTINGS
                    SET EXPOSURE TO 1
                    MOUNT SOLVEANDSYNC
                END PRESERVE
                
                SET EXPOSURE TO 120
                GUIDING START
                GUIDING WAIT
                
                PERIODIC "MeridianFlip" WHEN WITHIN 0 MINUTES OF MERIDIAN
                    PRESERVE CAMERA SETTINGS
                        SET EXPOSURE TO 1
                        GOTO SAVED COORDINATES
                        MOUNT SOLVEANDSYNC
                    END PRESERVE
                END PERIODIC

                CAPTURE 11 FRAMES
                
                PERIODIC "MeridianFlip" STOP
                
                GUIDING STOP
            END STOP AT
        END LOOP
    END STOP AT
    
    GUIDING DISCONNECT
    MOUNT PARK
END SEQUENCE
User avatar
admin
Site Admin
Posts: 17344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Meridian flip

#14

Post by admin »

Hi Cyrille,

let's see...

1) Yes - this will do the GOTO movement and set the target name if there is a target name in with the co-ordinates. It should also set the 'Target' co-ordinates on the ASCOM telescope driver to the co-ordinates read from the file (or at least those from the file converted J2000->JNOW). That means that the 'Target' co-ordinates should remain set throughout the contained imaging steps and can be used in steps like 'Goto mount target co-ordinates'

2) It should flip either when approaching the 180 degrees meridian with the mount on the west side of the pier looking east, or the rarer case of approaching the meridian at zero degrees (below the pole) with the mount on the east side of the pier looking west. Once it has moved to the correct side of the pier to continue imaging, it shouldn't move again until either 12 hours later or you change to a different target which might be approaching the meridian.

3) Yes, since it reads the co-ordinates from the mount, but see the note in 1) about the target co-ordinate also being set

4) No, sadly there is no option for this at the moment - I think that would be stretching the co-ordinate list idea too far, sorry.

cheers,

Robin
Post Reply