You don't actually say so but from your username I am guessing you are interested in stratospheric balloon flights.
If so, the following may be of interest.
It is being tested now for a flight next week.
First the script and then (as an attachment) a log produced by the test that was 5x shorter duration than the real flight :-
@title Stratosphere
@param i interval time unit
@default i 5
@param n numerator
@default n 1
@param b beep Interval
@default b 10
@param o ISO max
@default o 400
rem -----------------------------
rem High altitude balloon project
rem -----------------------------
flash_off
sync_off
enable_logging
rem Wait for lens cap removal
gosub "phaseA"
line_1 "phaseA finished"
rem Liftoff movie
M=5
log "Liftoff movie"
gosub "phaseB"
rem Low altitude shots
D = 25
log "Low altitude fast shots"
gosub "phaseC"
rem Higher altitude movie
M=3
log "Higher altitude ascent movie"
gosub "phaseB"
rem Higher altitude shots
D = 30
log "Higher altitude fast shots"
gosub "phaseC"
rem Compute Bv from meter readings
gosub "phaseD"
rem High altitude shots, computed Bv
D = 25
gosub "phaseF"
rem High altitude Shoot movie
M=3
log "High altitude movie"
gosub "phaseB"
rem Descent,continually computed
D = 20
gosub "phaseE"
:loop
rem High altitude Shoot movie
M=2
gosub "phaseB"
rem Descent, continually computed
D = 35
gosub "phaseE"
goto "loop"
end
:phaseA
sync_off
flash_off
beep 10
log "------------------------------------------------"
log " Stratospheric Balloon Mission "
log "------------------------------------------------"
log ""
log "phaseA: Script started, wait for lens cap removal"
line_1 " Script started"
line_2 " pauses until"
line_3 " lens cap removed"
sleep_for_seconds 5
turn_backlight_off
log "Backlight turned off"
C = 15/i
sleep_for_minutes C
cover_lens 10
log "Lens cap removed"
turn_backlight_on
log "Backlight turned on"
log "------------------------------------------------"
log ""
beep_off
start_clock
return
:phaseB
line_1 "#Shooting movie"
line_2 "#"
line_3 "#"
C= M*60/i
log elapsed_time, "phaseB: Recording movie for",C," seconds"
shoot_movie_for C
sleep_for_seconds 5
flash_off
log "Flash off"
log "------------------------------------------------"
log ""
return
:phaseC
line_1 "!Fast shooting"
line_2 "!at low altitude"
line_3 "!metered brightness"
T = get_day_seconds
sleep_for_seconds 3
set_max_iso_to o
log elapsed_time,"phaseC: Fast shots every 30 seconds for",(D * 60 / i)," seconds"
log "Maximum ISO set to",o
log "Target shutter speed =",n,"/4000"
do
shoot_fast_at n/2000,z
I = image_number
if z < 0 then gosub "fast" else gosub "slow"
sleep_for_seconds 30
S = get_day_seconds
until (S - T) >= (D * 60 / i)
sleep_for_seconds 3
log "------------------------------------------------"
log ""
return
:phaseD
line_1 " Filling buffer"
line_2 " for brightness"
line_3 " at 60 minutes"
log elapsed_time,"Taking 100 brightness readings"
meter_brightness 1
sleep_for_seconds 3
log "------------------------------------------------"
log ""
return
rem ----------------------------
rem Descent,fast shots computed
rem ----------------------------
:phaseE
line_1 "#Descent"
line_2 "#Bv continuously"
line_3 "#updated"
log elapsed_time,"phaseE: Descent,exposure computed every 20 shots"
log "Fast shots every 3 seconds for",(D * 60 / i)," seconds"
N = 0
T = get_day_seconds
do
do
shoot_fast_at n/2000,z,1
I = image_number
if z < 0 then gosub "fast" else gosub "slow"
sleep_for_seconds 3
N = N+1
until N = 20
N = 0
meter_brightness
S = get_day_seconds
until (S - T) >= (D * 60 / i)
log "------------------------------------------------"
log ""
return
:phaseF
line_1 "!Using fixed"
line_2 "!Computed exposure"
line_3 "!at high altitude"
log elapsed_time,"Fast shots using computed exposure"
T = get_day_seconds
set_max_iso_to o
log "phaseF: Fast shots every 30 seconds for",(D * 60 / i)," seconds"
log "Maximum ISO set to",o
log "Target shutter speed =",n,"/4000"
do
shoot_fast_at n/4000,z,1
I = image_number
if z < 0 then gosub "fast" else gosub "slow"
sleep_for_seconds 30
S = get_day_seconds
until (S - T) >= (D * 60 / i)
sleep_for_seconds 3
log "------------------------------------------------"
log ""
return
:fast
log elapsed_time,"IMG_";I,"Fast shoot at",-z,"ISO"
return
:slow
log elapsed_time,"IMG_";I,"shutter was 1/",z,"at max ISO"
return
:interrupted
beep
turn_backlight_on
line_1 " restore"
line_2 "!restore"
line_3 "#restore"
sleep_for_seconds 5
end
and the logfile below :-