Regression in 3.0: Wait Until Time = Sunrise Exits immediately

Issue #1299 resolved
Oleg Ignat created an issue

Hi,

I upgraded NINA to 3.0 yesterday and noticed that my sequence that used to work flawlessly in 2.0 is now broken. I use advanced sequencer to control my remote setup. Here’s what my sequence start looks like:

Notice that the top condition is Loop Until Time - Sunrise. This used to work and it is now broken.

Here’s the log sequence:

2024-04-02T18:28:32.1963|INFO|Sequence2VM.cs|StartSequence|480|Advanced Sequence started
2024-04-02T18:28:32.2163|INFO|SequenceItem.cs|Run|206|Starting Category: * Instruction Set *, Container: NINA.Sequencer.Container.SequenceRootContainer, Strategy: SequentialStrategy, Items[CREATED]: 3, Triggers: Category: Ground Station, Item: Failures to Email, Recipient: scottless@gmail.com
2024-04-02T18:28:32.2164|INFO|SequenceItem.cs|Run|206|Starting Category: * Instruction Set *, Container: NINA.Sequencer.Container.StartAreaContainer, Strategy: SequentialStrategy, Items[CREATED]: 1
2024-04-02T18:28:32.2165|INFO|SequenceItem.cs|Run|206|Starting Category: * Instruction Set *, Container: NINA.Sequencer.Container.SequentialContainer, Strategy: SequentialStrategy, Items[CREATED]: 4, Conditions: Condition: TimeCondition, Time: 7:16:15h, Condition: LoopCondition, Iterations: 0/1,
2024-04-02T18:28:32.2166|INFO|TimeCondition.cs|Check|235|No more time remaining. Remaining: -11:12:17.2166521, Next Item Wait for Time, Next Item Estimated Duration 01:30:43.7833517, Next Item Attempts: 1
2024-04-02T18:28:32.2167|INFO|TimeCondition.cs|Check|244|TimeCondition finished.
2024-04-02T18:28:32.2167|INFO|SequenceItem.cs|Run|224|Finishing Category: * Instruction Set *, Container: NINA.Sequencer.Container.SequentialContainer, Strategy: SequentialStrategy, Items[SKIPPED]: 4, Conditions: Condition: TimeCondition, Time: 18:28:32h, Condition: LoopCondition, Iterations: 0/1,
2024-04-02T18:28:32.2169|INFO|SequenceItem.cs|Run|224|Finishing Category: * Instruction Set *, Container: NINA.Sequencer.Container.StartAreaContainer, Strategy: SequentialStrategy, Items[FINISHED]: 1
2024-04-02T18:28:32.2169|INFO|SequenceItem.cs|Run|206|Starting Category: * Instruction Set *, Container: NINA.Sequencer.Container.TargetAreaContainer, Strategy: SequentialStrategy, Items[CREATED]: 2
2024-04-02T18:28:32.2170|INFO|SequenceItem.cs|Run|206|Starting Category: * Instruction Set *, Container: NINA.Sequencer.Container.DeepSkyObjectContainer, Strategy: SequentialStrategy, Items[CREATED]: 8, Conditions: Condition: TimeCondition, Time: 4:59:54h, Condition: AltitudeCondition, Altitude >= 13, , Target: NGC 3628 RA: 11:20:17; Dec: 13° 35' 22"; Epoch: J2000 268
2024-04-02T18:28:32.2201|INFO|SequenceItem.cs|Run|206|Starting Category: Utility, Item: WaitUntilAboveHorizon
2024-04-02T18:28:36.1630|INFO|Sequencer.cs|Start|85|Sequence run was cancelled
2024-04-02T18:28:36.1638|INFO|Sequence2VM.cs|StartSequence|484|Advanced Sequence finished

When I run the sequence I get this state in the UI. Notice the time changed to my current time, instead of the sunrise.

Please fix this.

Comments (22)

  1. Stefan B repo owner
    • changed status to open

    Please attach the full log file and sequence that was used.

    Also I don't understand the steps to reproduce the problem. Does the time change to your current time on load of the sequence or at the start or when does it happen?

  2. Oleg Ignat reporter

    Attached the full log. The steps to reproduce are the following:

    1. Load the sequence (drag and drop)
    2. Run the sequence.

    That’s it. It immediately exits. The time changes after the sequence runs.

  3. Oleg Ignat reporter

    Added the template. Important to note - I ran the session yesterday, so there is an in-memory state. Somehow TimeCondition.CalculateRemainingTime() calculates negative value.

  4. Stefan B repo owner

    I still can’t see this behavior. I’ve executed the sequence, set the time to the next day in my system and all was updated properly.

  5. Stefan B repo owner

    The snippet you’ve sent is an outdated snipped. But i can check on the latest code in which case this would be possible.

  6. Dale Ghent

    This may sound silly, but what is your latitude as entered in NINA’s Options → General → Astrometry area?

  7. Oleg Ignat reporter

    Ok, this is really strange. I restarted NINA and loaded my sequence, connected all devices. There is no way to make it work…

  8. Stefan B repo owner

    Not sure why it would update to your current time - i cannot reproduce this issue.

    However the time conditions changed in 3.0 and the roll over time is no longer at noon. So your sequence won’t work either way, as the loop condition would run, as it has to be sunset first for it to roll over to the next day.

  9. Stefan B repo owner

    So you’ll need to just remove the Outermost Loop Until Time. As the Wait for Sunset rolls over at Sunrise and not at noon anymore. Change was done for it to be easier to use.

  10. Oleg Ignat reporter

    There is 1.5 hours left to sunset. Is this what’s doing it? I was hoping to kick off the session and go mind my own business. Do I now need to sit and wait for sunset before I kick off the session?

  11. Stefan B repo owner

    Just remove the outermost loop until sunrise. This workaround that you’ve done there is no longer required.

  12. Stefan B repo owner

    In the meantime i think i have found a way to reproduce your problem that the instruction time was overridden.

  13. Oleg Ignat reporter

    Ok, this is good. I removed that condition and now waiting for the sunset to check if the rest of my time wizardry works as it used to. In 28 minutes we should know.

  14. Stefan B repo owner

    The original problem of the condition being overwritten with current time is resolved in 3.1 nightly

  15. Log in to comment