My rudimentary DragScript to check for clouds

Hi all

tonight I gave DragScript a first go. My needs are quite simple, I usually (for now) shoot one target per night. But I want to be able to leave things outside at dusk, aligned and focused, and pick it up following morning parked with some sky flats done as well.

Living in the UK it means weather can be tricky, I have a simple rain/wind sensor outside that alerts me if it rains for emergency, so only problem are clouds.

I wanted a script that somehow tries to guess if there are clouds, it waits, start the sequence if it’s clear (I manage everything from the pointing/guiding to meridian flip -forced- within the sequence), ends it at end of night, does as well some flats (using the flats sequencer) and then park.

The way I thought about checking for clouds at start of the session (the most important part as I think the sequence keeps trying if guide fails??) is to point roughly where it is my target, check if it can find a guide star, check if it can plate solve, and if both these are ok then it assumes there are no clouds…if any of the previous checks fails, it assumes there are clouds, and keeps trying every 10 minutes.

All the rest of failsafes are in the sequence I think, that it keeps trying on errors (unless I miss something!).

Sorry for the lack of Remarks/comments that might make it easier to read, but for me was more urgent to start testing it in the field (tonight is clear and it worked so far!) and most of all be alerted in Telegram more than in the console (see my other post to check my script to send Telegram notifications). Once I make it more final, will add Remarks so I can share it and can be more readable to others.

Do you have any suggestions? Improvements and other things I could introduce/try? I’m no expert just started, but would like to build a “default dragscript” to use with my “default sequence” and simply change the target(s) via Roboclip (like I did tonight).

Looking forward to comments/suggestions!

1 Like

I haven’t done this myself but thought about this; Do you have access to OpenWeatherMap? You can create an account/API key with them, then you can set it up in “Observation Condition” in Voyager; Once you do that you will get updated (every 15 min I believe?) weather condition at your location, including cloud coverage; After that in DragScript you can create an variable to read from “CloudCover”, and you can build your logic from that variable… I think that’s easier.

1 Like

I wasn’t aware of that! I’m surely going to try it and see how reliable it is…I never found a reliable cloud cover service…Clear Skies and the others often say cloud coverage and is perfectlt clear, so i’ll check if this service is another one that predicts or is one instead telling me what’s the actual situation (that’s what I need).

I would probably anyway just add it as a check, till now letting my system check for cloud coverage has worked VERY WELL.

It helped both at start and during session after restart on guide failing to hold the sequence till the sky was clear again.

I’ll post updated version of the script and will try this, thanks a lot!

Ok, OpenWeatherMap works VERY WELL! I added it to Weather Conditions and most of all to SQM, because via SQM and Update Decimal from SQM is possible in Dragscript to get all I need.

@yzhzhang thanks for the tip, implemented in my Dragscript for now just as Telegram warning, but depending on how it works I might add it to the variables of the decision process for weather. I actually think checking guidestar+solve+openweather is a really nice way to check for weather.

I do have a question: is there any way, during a sequence launched from within a Dragscript, to have a watchdog that for example checks every X poses (or every pose) how’s the weather executing another Block from the same Dragscript?

You can probably break your sequence to fewer frames but make it a large-number loop in DragScript, and insert a variable update/check as I described earlier before calling up the sequence in a loop?

Yeah I thought about it but the Sequence is a very convenient and safe way to let Voyager deal with things like problems, flips etc., so I could break it in smaller chunks and repeat the block checking every time, but I’m not sure at that point is worth doing it.

Sequence works reliably for me and it handled nicely clouds, so I’d rather keep it like that.

Will see if there’s a way and will report back!

Sure, but just to clarify, what’s in my mind is: you still use sequence to manage all of those, but just limit your sequence to like 6 exposures only, and repeat that sequence all the time after a cloudcheck in DragScript (not in Sequence repeat setup). I don’t think you lose any native management Sequence provide.

1 Like

Actually is not a bad idea…I wouldn’t want to rely only on OpenWeather or only on my homemade system as one is not local and the other is, well, homemade solution, BUT having both checking every now and then and alerting me would be great.

I have anyway a weather station/sensor outside so if it rains that will alert me quickly!