Line -... |
Line 1... |
- |
|
1 |
; Skript pro SpectrumLab pro automatickou detekci meteoru pro projekt Bolidozor |
1 |
;ver. 2.0 - 23. 11. 2013 |
2 |
; ver. 2.0 - 23. 11. 2013 |
- |
|
3 |
|
2 |
;PODMÍNKA JEN 80 ZNAKŮ |
4 |
;PRIKAZY JEN 255 ZNAKU |
3 |
;PŘÍKAZY JEN 255 ZNAKŮ |
5 |
;PODMINKY JEN 80 ZNAKU |
4 |
|
6 |
|
5 |
;Časovače |
7 |
;Casovace |
6 |
;timer0 - časovač maximální mezery mezi 2 meteory K_max_time_btw_met |
8 |
;timer0 - casovac maximalni mezery mezi 2 meteory K_max_time_btw_met |
7 |
;timer3 - časovač pro odpočet screenshotu bez meteoru K_max_time_to_scr |
9 |
;timer3 - casovac pro odpocet screenshotu bez meteoru K_max_time_to_scr |
8 |
;timer4 - časovač pro odečet screenshotu s meteorem po odvalení několika málo sekund aby nebyl meteor moc nahoře |
10 |
;timer4 - csovac pro odecet screenshotu s meteorem po odvaleni nekolika malo sekund aby nebyl meteor moc nahore |
9 |
|
11 |
|
10 |
;Proměnné: |
12 |
;Promenne: |
11 |
;n noise background šum pozadí |
13 |
;n noise background |
12 |
;n_1 šum v okamžiku detekce meteoru |
14 |
;n_1 sum v okamziku detekce meteoru |
13 |
;f frequency of maximum amplitude frekvence na které se nachází maximum |
15 |
;f frequency of maximum amplitude |
14 |
;aver_amp average amplitude +- 100 Hz průměrná aplituda v rozsahu +- 100Hz od maxima |
16 |
;aver_amp average amplitude +- 100 Hz |
15 |
;aver_amp_1 je average amplitude aktualizovaná v průběhu měření meteoru |
17 |
;aver_amp_1 je average amplitude aktualizovana v prubehu mereni meteoru |
16 |
;aver_amp_max je maximální hodnota z hodnot v průběhu měření meteoru |
18 |
;aver_amp_max je maximalni hodnota z hodnot v prubehu mereni meteoru |
17 |
;mag magnitude |
19 |
;mag magnitude |
18 |
;hour_count count of meteors in hour |
20 |
;hour_count count of meteors in hour |
19 |
;dur_count maximální délka meteoru (count po dobu existence meteoru) |
21 |
;dur_count délka meteoru (count po dobu retekce meteoru) |
20 |
;T_0 cas posledniho vypoctu FFT v internim formatu SpectrumLabu (aktualizace každých 50ms) |
22 |
;T_0 cas posledniho vypoctu FFT v internim formatu SpectrumLabu (aktualizace kazdych 50ms) |
21 |
;T cas posledniho vypoctu FFT v textove forme ve formatu "YYYYMMDDhhmmss.sss" |
23 |
;T cas posledniho vypoctu FFT v textove forme ve formatu "YYYYMMDDhhmmss.sss" |
22 |
;t3 aktualni hodina a minuta |
24 |
;t3 aktualni hodina a minuta |
23 |
;id_met identifikátor meteoru do screenshotu |
25 |
;id_met identifikator meteoru do screenshotu |
24 |
|
26 |
|
25 |
;Konstanty: |
27 |
;Konstanty: |
26 |
;K_station_name="JOSY-A" station name (device code - 20 characters maximum, get your unique station code on http://home.robozor.cz) |
28 |
;K_station_name="JOSY-A" station name (device code - 20 characters maximum, get your unique station code on http://home.robozor.cz) |
27 |
;K_path_scr vložit lokální adresář pro screenshoty |
- |
|
28 |
;K_path_audio vložit lokální adresář pro audio soubory |
29 |
;K_path lokalni adresar pro ukladane soubory |
29 |
;K_path_RMOB vložit lokální adresář textové soubory RMOB |
- |
|
30 |
;K_path_SDR vložit lokální adresář textové soubory RMOB |
- |
|
31 |
;K_max_time_btw_met=2 minimalni doba mezi 2 meteory v sekundachjsou (nižší se počítá jako 1 meteor) |
30 |
;K_max_time_btw_met=2 minimalni doba mezi 2 meteory v sekundach (pokud po tuto dobu proleti dva, tak se pocitaji jako jeden) |
32 |
;K_max_time_to_scr=100 maximální doba bez meteoru, která pokud vyprší, udělá screenshot (max doba za kterou odroluje waterfall) |
31 |
;K_max_time_to_scr=100 maximalni doba bez meteoru, ktera pokud vyprsi, udela se screenshot (max doba za kterou odroluje cely waterfall) |
33 |
;K_init_cond=50 interval pro nastavení vyhodnocení scriptu 50ms Evaluate SpectrumLab condition interval (50ms) |
32 |
;K_init_cond=50 SpectrumLab evaulation interval (50ms) |
34 |
;K_time_to_start_up_waterf=4 vteřiny od okraje screenshot Kolik sekund se má počkat do screenshotu po detekci metreoru (jak daleko od okraje) |
33 |
;K_time_to_start_up_waterf=4 vteřiny od okraje screenshot Kolik sekund se má počkat do screenshotu po detekci metreoru (jak daleko od okraje) |
35 |
;K=7 - citlivost detekce meteoru |
34 |
;K=7 - citlivost detekce meteoru |
36 |
;K_min_dur_count_bolid=50 detekce bolidu pro audio (2,5 vteřiny) |
35 |
;K_min_dur_count_bolid=50 detekce bolidu pro audio (2,5 vteriny) |
37 |
|
36 |
|
38 |
;Události |
37 |
;Udalosti |
39 |
;A_init (inicializace) |
- |
|
40 |
;A_measurement (kdykoliv po 50 ms) |
38 |
;A_measurement (kdykoliv po 50 ms) |
41 |
;A_still_detect (událost trvání meteoru nebo bolidu) - průběžně |
39 |
;A_still_detect (udalost trvani meteoru nebo bolidu) |
42 |
;A_start_detect (událost detekce začátku meteoru nebo bolidu) |
40 |
;A_start_detect (udalost detekce zacatku meteoru nebo bolidu) |
43 |
;A_start_detect_bolid (událost 2,5 vteřiny od detekce meteoru) |
41 |
;A_start_detect_bolid (udalost 2,5 vteriny od detekce meteoru) |
44 |
;A_end_detect (událost detekce konce meteoru nebo bolidu) |
42 |
;A_end_detect (udalost detekce konce meteoru nebo bolidu) |
45 |
;A_end_detect_end (konec cyklu události detekce konce meteoru nebo bolidu) |
43 |
;A_end_detect_end (konec cyklu udalosti detekce konce meteoru nebo bolidu) |
46 |
;A_write_waterf (událost záznamu popisu detekce do waterfallu) |
44 |
;A_write_waterf (udalost zaznamu popisu detekce do waterfallu) |
47 |
;A_update_SDR_data_file (událost generování souboru SDR screenshot při záznamu meteoru) |
45 |
;A_update_SDR_data_file (udalost generovani datoveho souboru pri zaznamu meteoru) |
48 |
;A_update_RMOB_Dur_file (událost generování souborů RBOB) |
- |
|
49 |
;A_met_screenshot (událost generování screenshotu waterfallu pokud je zaznamenán meteor) |
46 |
;A_met_screenshot (udalost generovani screenshotu waterfallu pokud je zaznamenan meteor) |
50 |
;A_no_met_screenshot (událost generování screenshotu waterfallu pokud není dlouho zaznamenán meteor) |
47 |
;A_no_met_screenshot (udalost generovani screenshotu waterfallu pokud neni dlouho zaznamenan meteor) |
51 |
;A_once_hour_20s_before (událost 1x za hodinu před ukončením hodiny 20 vteřin) |
48 |
;A_once_hour_20s_before (udalost 1x za hodinu pred ukoncenim hodiny 20 vterin) |
52 |
;A_once_hour |
49 |
;A_once_hour |
53 |
;A_once_hour_10s_before (událost 1x za hodinu před ukončením hodiny 10 vteřin) |
50 |
;A_once_hour_10s_before (udalost 1x za hodinu pred ukoncenim hodiny 10 vterin) |
54 |
;A_once_hour_30s_after (událost 1x za hodinu po ukončení hodiny 30 vteřin) |
51 |
;A_once_hour_30s_after (udalost 1x za hodinu po ukonceni hodiny 30 vterin) |
55 |
|
52 |
|
56 |
|
53 |
|
57 |
;-----------------A_init - Inicializace proměnných a konstant-------------------- |
54 |
;-----------------A_init - Initialisation of variables and constants-------------------- |
58 |
if( initialising ) then A_init=1:A_still_detect=0:n=0:n_1=0:f=0:f_1=0:aver_amp=0:a=0:mag=0:mag_max=0:hour_count=0:dur_count=0:aver_amp_1=-999:aver_amp_max=-999:T="0000":T_0=0:t1_0=0:t3=0:bolide=0:bolide2=0 |
55 |
if( initialising ) then A_still_detect=0:n=0:n_1=0:f=0:f_1=0:aver_amp=0:a=0:mag=0:mag_max=0:hour_count=0:dur_count=0:aver_amp_1=999:aver_amp_max=999:T="0000":T_0=0:t1_0=0:t3=0:bolide=0:bolide2=0 |
59 |
if( A_init = 1 ) then A_init=2:id_met="no":id_met2="no":K_station_name="SVAKOV-R2":K_path_scr="/media/sd/meteors/capture/":K_path_audio="/media/sd/meteors/audio/":K_path_SDR="/media/sd/meteors/data/" |
56 |
if( initialising ) then id_met="no":id_met2="no":K_station_name="SVAKOV-R2":K_path="/media/sd/meteors/" |
60 |
if( A_init = 2 ) then A_init=3:K_max_time_btw_met=2:K_max_time_to_scr=100:K_init_cond=50:K_time_to_start_up_waterf=4:K=7:K_min_dur_count_bolid=50 |
57 |
if( initialising ) then K_max_time_btw_met=2:K_max_time_to_scr=100:K_init_cond=50:K_time_to_start_up_waterf=4:K=7:K_min_dur_count_bolid=50 |
61 |
if( A_init = 3 ) then A_init=4:A_measurement=0:A_start_detect=0:A_end_detect=0:A_end_detect_end=0:A_write_waterf=0:A_update_SDR_data_file=0:A_update_RMOB_Dur_file=0:A_met_screenshot=0 |
58 |
if( initialising ) then A_measurement=0:A_start_detect=0:A_end_detect=0:A_end_detect_end=0:A_write_waterf=0:A_update_SDR_data_file=0:A_update_RMOB_Dur_file=0:A_met_screenshot=0 |
62 |
if( A_init = 4 ) then A_init=5:A_no_met_screenshot=0:A_once_hour_2s_before=0:A_once_hour=0:A_once_hour_1s_before=0:timer3.restart(K_max_time_to_scr):dur2=0:dur3=0 |
59 |
if( initialising ) then A_no_met_screenshot=0:A_once_hour_2s_before=0:A_once_hour=0:A_once_hour_1s_before=0:timer3.restart(K_max_time_to_scr):dur2=0:dur3=0 |
63 |
if( A_init = 5 ) then A_init=6 |
60 |
if( initialising ) then K_path_data=K_path+"/"+K_station_name+"/data/":K_path_audio=K_path+"/"+K_station_name+"/audio/":K_path_scr=K_path+"/"+K_station_name+"/capture/" |
- |
|
61 |
if( initialising ) then fopen1(K_path+"/"+K_station_name+"/"+"station.cfg",w):fp1("K_station_name="+K_station_name):fp1("K_max_time_btw_met="+str(K_max_time_btw_met)):fp1("K_max_time_to_scr="+str(K_max_time_to_scr)):fp1("K_init_cond="+str(K_init_cond)) |
- |
|
62 |
if( initialising ) then fp1("K_time_to_start_up_waterf="+str(K_time_to_start_up_waterf)):fp1("K="+str(K)):fp1("K_min_dur_count_bolid="+str(K_min_dur_count_bolid):fp1("#end") |
64 |
if( A_init = 6 ) then A_init=0 |
63 |
if( initialising ) then fclose1 |
65 |
|
64 |
|
66 |
;----------------A_measurement - (po 50 ms)------------------------------------- |
65 |
;----------------A_measurement - (po 50 ms)------------------------------------- |
67 |
;n=noise(9800,10200) aktualizace a výpočet hodnoty šumu (záleží na nastavení FFT) |
66 |
;n=noise(9800,10200) aktualizace a výpočet hodnoty šumu (záleží na nastavení FFT) |
68 |
;f=peak_f(10300,10900) max intenzita signálu v daném intervalu frekvencí |
67 |
;f=peak_f(10300,10900) max intenzita signálu v daném intervalu frekvencí |
69 |
;aver_amp=avrg(f-100,f+100) vrací prům. intenzitu signálu 100 Hz kolem maxima |
68 |
;aver_amp=avrg(f-100,f+100) vrací prům. intenzitu signálu 100 Hz kolem maxima |
Line 75... |
Line 74... |
75 |
|
74 |
|
76 |
;-----------------A_still_detect (an event of meteor or bolide continue)----------- |
75 |
;-----------------A_still_detect (an event of meteor or bolide continue)----------- |
77 |
if( aver_amp>a ) then A_still_detect=A_still_detect+1:timer0.restart(K_max_time_btw_met):timer3.restart(K_max_time_to_scr):dur_count=dur_count+1:aver_amp_1=a-aver_amp:dur3=dur2 |
76 |
if( aver_amp>a ) then A_still_detect=A_still_detect+1:timer0.restart(K_max_time_btw_met):timer3.restart(K_max_time_to_scr):dur_count=dur_count+1:aver_amp_1=a-aver_amp:dur3=dur2 |
78 |
|
77 |
|
79 |
;-----------------A_aver_amp (maximal amplitude calculation)--- |
78 |
;-----------------A_aver_amp (maximal amplitude calculation)--- |
80 |
if( aver_amp_1>aver_amp_max ) then aver_amp_max=aver_amp_1 |
79 |
if( aver_amp_1<aver_amp_max ) then aver_amp_max=aver_amp_1 |
81 |
|
80 |
|
- |
|
81 |
;-----------------Some characteristics 100, 400, 800 ms after detection--- |
82 |
if(dur2=2) then aCt1=round(a-avrg(f-10,f+10)):aRt1=round(a-avrg(f+20,f+50)):aLt1=round(a-avrg(f-50,f-20)) |
82 |
if(dur2=2) then f=peak_f(10300,10900):aCt1=round(a-avrg(f-10,f+10)):aRt1=round(a-avrg(f+20,f+50)):aLt1=round(a-avrg(f-50,f-20)):f_1=round(f) |
83 |
if(dur2=8) then aCt2=round(a-avrg(f-10,f+10)):aRt2=round(a-avrg(f+20,f+50)):aLt2=round(a-avrg(f-50,f-20)) |
83 |
if(dur2=8) then f=peak_f(10300,10900):aCt2=round(a-avrg(f-10,f+10)):aRt2=round(a-avrg(f+20,f+50)):aLt2=round(a-avrg(f-50,f-20)):f_2=round(f) |
84 |
if(dur2=16) then aCt3=round(a-avrg(f-10,f+10)):aRt3=round(a-avrg(f+20,f+50)):aLt3=round(a-avrg(f-50,f-20)) |
84 |
if(dur2=16) then f=peak_f(10300,10900):aCt3=round(a-avrg(f-10,f+10)):aRt3=round(a-avrg(f+20,f+50)):aLt3=round(a-avrg(f-50,f-20)):f_3=round(f) |
85 |
|
85 |
|
86 |
;-----------------A_start_detect (an event of begining of meteor)---------------------- |
86 |
;-----------------A_start_detect (an event of begining of meteor)---------------------- |
87 |
if( never ) then REM --- A_start_detect (an event of begin of meteor) -------------- |
87 |
if( never ) then REM --- A_start_detect (an event of begin of meteor) -------------- |
88 |
if( A_still_detect=1 ) then A_still_detect=2:A_start_detect=1:id_met=(t1+"_"+K_station_name):id_met0=t1:sp.print("` ^ t+"+str("ss",time)) |
88 |
if( A_still_detect=1 ) then A_still_detect=2:A_start_detect=1:id_met=(t1+"_"+K_station_name):id_met0=t1:sp.print("` ^ t+"+str("ss",time)) |
89 |
if( A_start_detect=1 ) then A_start_detect=2:n_1=n:f_1=f |
89 |
if( A_start_detect=1 ) then A_start_detect=2:n_1=n:f_0=round(f) |
90 |
if( A_start_detect=2 ) then A_start_detect=0 |
90 |
if( A_start_detect=2 ) then A_start_detect=0 |
91 |
|
91 |
|
92 |
;------------A_end_detect (an event of detection meteor or fireball----------- |
92 |
;------------A_end_detect (an event of detection meteor or fireball----------- |
93 |
if( never ) then REM --- A_end_detect (end of meteor) --- |
93 |
if( never ) then REM --- A_end_detect (end of meteor) --- |
94 |
if( timer0.expired(1) ) then A_end_detect=1:id_met2=id_met:hour_count=hour_count+1:timer4.restart(K_time_to_start_up_waterf) |
94 |
if( timer0.expired(1) ) then A_end_detect=1:id_met2=id_met:hour_count=hour_count+1:timer4.restart(K_time_to_start_up_waterf) |
95 |
if( A_end_detect=1 ) then A_end_detect=2:s1="` "+id_met0+" hCnt"+str(hour_count)+" nb"+str(round(n_1))+" f"+str(f_1)+" hit"+str(dur_count*K_init_cond)+" dur"+str(dur3*K_init_cond)+" mag"+str(round(aver_amp_max))) |
95 |
if( A_end_detect=1 ) then A_end_detect=2:s1="` "+id_met0+" hCnt"+str(hour_count)+" nb"+str(round(n_1))+" f"+str(f_0)+" hit"+str(dur_count*K_init_cond)+" dur"+str(dur3*K_init_cond)+" mag"+str(round(aver_amp_max))) |
96 |
if( A_end_detect=2 ) then A_end_detect=3:s2=" 1L"+str(aLt1)+" 1C"+str(aCt1)+" 1R"+str(aRt1)+" 2L"+str(aLt2)+" 2C"+str(aCt2)+" 2R"+str(aRt2)+" 3L"+str(aLt3)+" 3C"+str(aCt3)+" 3R"+str(aRt3) |
96 |
if( A_end_detect=2 ) then A_end_detect=3:s2=" 1f"+str(f_1)+" 1L"+str(aLt1)+" 1C"+str(aCt1)+" 1R"+str(aRt1)+" 2f"+str(f_2)+" 2L"+str(aLt2)+" 2C"+str(aCt2)+" 2R"+str(aRt2)+" 3f"+str(f_3)+" 3L"+str(aLt3)+" 3C"+str(aCt3)+" 3R"+str(aRt3) |
- |
|
97 |
if( A_end_detect=3 ) then A_end_detect=4: |
97 |
if( A_end_detect=3 ) then A_end_detect=4:sp.print(s1+s2) |
98 |
if( A_end_detect=4 ) then A_end_detect=5:sp.print(s1+s2) |
98 |
if( A_end_detect=4 ) then A_end_detect=5:A_update_SDR_data_file=1:fft.export.close |
99 |
if( A_end_detect=5 ) then A_end_detect=6:A_update_SDR_data_file=1:fft.export.close |
99 |
if( A_end_detect=5 ) then A_end_detect=0 |
100 |
if( A_end_detect=6 ) then A_end_detect=0 |
100 |
|
101 |
|
101 |
;-----------------A_update_SDR_data_file---------------------------------------- |
102 |
;-----------------A_update_SDR_data_file---------------------------------------- |
102 |
;Record to a data file (*.dat) (project Bolidozor) |
103 |
;Record to a data file (*.dat) (project Bolidozor) |
103 |
if( never ) then REM --- write data to the file .dat --- |
104 |
if( never ) then REM --- write data to the file .dat --- |
104 |
if( A_update_SDR_data_file=1 ) then A_update_SDR_data_file=2:fopen1(K_path_SDR+str("YYYYMMDDhh",T_0)+"_"+K_station_name+".dat",a) |
105 |
if( A_update_SDR_data_file=1 ) then A_update_SDR_data_file=2:fopen1(K_path_data+str("YYYYMMDDhh",T_0)+"_"+K_station_name+".dat",a) |
105 |
if((A_update_SDR_data_file=2)&&(bolide2=1)) then A_update_SDR_data_file=3:fw1(id_met2+"_fb;"+str(round(n_1))+";"+str(f_1)+";"+str(dur_count*K_init_cond)+";"+str(dur3*K_init_cond)+";"+str(round(aver_amp_max)) ):bolide2=0 |
106 |
if((A_update_SDR_data_file=2)&&(bolide2=1)) then A_update_SDR_data_file=3:fw1(id_met2+"_fb;"+str(round(n_1))+";"+str(f_0)+";"+str(dur_count*K_init_cond)+";"+str(dur3*K_init_cond)+";"+str(round(aver_amp_max)) ):bolide2=0 |
106 |
if( A_update_SDR_data_file=2 ) then A_update_SDR_data_file=3:fw1(id_met2+"_met;"+str(round(n_1))+";"+str(f_1)+";"+str(dur_count*K_init_cond)+";"+str(dur3*K_init_cond)+";"+str(round(aver_amp_max)) ) |
107 |
if( A_update_SDR_data_file=2 ) then A_update_SDR_data_file=3:fw1(id_met2+"_met;"+str(round(n_1))+";"+str(f_0)+";"+str(dur_count*K_init_cond)+";"+str(dur3*K_init_cond)+";"+str(round(aver_amp_max)) ) |
107 |
if( A_update_SDR_data_file=3 ) then A_update_SDR_data_file=4:fp1(";"+str(aLt1)+";"+str(aCt1)+";"+str(aRt1)+";"+str(aLt2)+";"+str(aCt2)+";"+str(aRt2)+";"+str(aLt3)+";"+str(aCt3)+";"+str(aRt3)) |
108 |
if( A_update_SDR_data_file=3 ) then A_update_SDR_data_file=4:fp1(";"+str(f_1)+";"+str(aLt1)+";"+str(aCt1)+";"+str(aRt1)+";"+str(f_2)+";"+str(aLt2)+";"+str(aCt2)+";"+str(aRt2)+";"+str(f_3)+";"+str(aLt3)+";"+str(aCt3)+";"+str(aRt3)) |
108 |
if( A_update_SDR_data_file=4 ) then A_update_SDR_data_file=5:fclose1:A_end_detect_end=1 |
109 |
if( A_update_SDR_data_file=4 ) then A_update_SDR_data_file=5:fclose1:A_end_detect_end=1 |
109 |
if( A_update_SDR_data_file=5 ) then A_update_SDR_data_file=0 |
110 |
if( A_update_SDR_data_file=5 ) then A_update_SDR_data_file=0 |
110 |
|
111 |
|
111 |
;--------------A_end_detect_end------------------------------------------------- |
112 |
;--------------A_end_detect_end------------------------------------------------- |
112 |
;zametení |
113 |
;zametení |
113 |
if( never ) then REM --- Cleaning ---------------------------------------------- |
114 |
if( never ) then REM --- Cleaning ---------------------------------------------- |
114 |
if( A_end_detect_end=1 ) then A_end_detect_end=2:dur_count=0:aver_amp_1=-999:aver_amp_max=-999:rec.trigger=0:A_still_detect=0 |
115 |
if( A_end_detect_end=1 ) then A_end_detect_end=2:dur_count=0:aver_amp_1=999:aver_amp_max=999:rec.trigger=0:A_still_detect=0 |
115 |
if( A_end_detect_end=2 ) then A_end_detect_end=3:a1m=-999:a5m=-999:a10m=-999 |
- |
|
116 |
if( A_end_detect_end=3 ) then A_end_detect_end=0 |
116 |
if( A_end_detect_end=2 ) then A_end_detect_end=0 |
117 |
|
117 |
|
118 |
;-----------------A_start_detect_bolid (událost start bolidu)------------------- |
118 |
;-----------------A_start_detect_bolid (událost start bolidu)------------------- |
119 |
if( never ) then REM --- A_start_detect_bolid (begin of fireball) -------------- |
119 |
if( never ) then REM --- A_start_detect_bolid (begin of fireball) -------------- |
120 |
if( dur_count=K_min_dur_count_bolid ) then id_met_bolide=id_met:rec.filename=K_path_audio+id_met_bolide+".wav":rec.trigger=1:bolide=1:bolide2=1 |
120 |
if( dur_count=K_min_dur_count_bolid ) then id_met_bolide=id_met:rec.filename=K_path_audio+id_met_bolide+".wav":rec.trigger=1:bolide=1:bolide2=1 |
121 |
|
121 |
|
Line 124... |
Line 124... |
124 |
if( timer4.expired(1) ) then A_met_screenshot=1 |
124 |
if( timer4.expired(1) ) then A_met_screenshot=1 |
125 |
if((A_met_screenshot=1)&&(bolide=1)) then capture (K_path_scr+id_met_bolide+"_fb.jpg"):A_met_screenshot=2 |
125 |
if((A_met_screenshot=1)&&(bolide=1)) then capture (K_path_scr+id_met_bolide+"_fb.jpg"):A_met_screenshot=2 |
126 |
if( A_met_screenshot=1 ) then capture (K_path_scr+id_met2+"_met.jpg"):A_met_screenshot=2 |
126 |
if( A_met_screenshot=1 ) then capture (K_path_scr+id_met2+"_met.jpg"):A_met_screenshot=2 |
127 |
if( A_met_screenshot=2 ) then A_met_screenshot=0:bolide=0 |
127 |
if( A_met_screenshot=2 ) then A_met_screenshot=0:bolide=0 |
128 |
|
128 |
|
129 |
;---A_no_met_screenshot (událost generování screenshotu waterfallu pokud není dlouho zaznamenán meteor)--- |
129 |
;---A_no_met_screenshot (udalost generovani screenshotu waterfallu pokud neni dlouho zaznamenan meteor)--- |
130 |
if( never ) then REM --- A_no_met_screenshot (capture a screenshot without meteor) --- |
130 |
if( never ) then REM --- A_no_met_screenshot (capture a screenshot without meteor) --- |
131 |
if( timer3.expired ) then A_no_met_screenshot=1:capture (K_path_scr+t1+"_"+K_station_name+"_none.jpg") |
131 |
if( timer3.expired ) then A_no_met_screenshot=1:capture (K_path_scr+t1+"_"+K_station_name+"_none.jpg") |
132 |
if( A_no_met_screenshot=1 ) then A_no_met_screenshot=2:fopen1(K_path_SDR+str("YYYYMMDDhh",T_0)+"_"+K_station_name+".dat",a) |
132 |
if( A_no_met_screenshot=1 ) then A_no_met_screenshot=2:fopen1(K_path_data+str("YYYYMMDDhh",T_0)+"_"+K_station_name+".dat",a) |
133 |
if( A_no_met_screenshot=2 ) then A_no_met_screenshot=3:fp1(t1+"_"+K_station_name+"_none;"+str(round(n))+";;;;;;;;;;;;;") |
133 |
if( A_no_met_screenshot=2 ) then A_no_met_screenshot=3:fp1(t1+"_"+K_station_name+"_none;"+str(round(n))+";;;;;;;;;;;;;;;;") |
134 |
if( A_no_met_screenshot=3 ) then A_no_met_screenshot=4:fclose1 |
134 |
if( A_no_met_screenshot=3 ) then A_no_met_screenshot=4:fclose1 |
135 |
if( A_no_met_screenshot=4 ) then A_no_met_screenshot=5 |
- |
|
136 |
if( A_no_met_screenshot=5 ) then A_no_met_screenshot=0:timer3.restart(K_max_time_to_scr) |
135 |
if( A_no_met_screenshot=4 ) then A_no_met_screenshot=0:timer3.restart(K_max_time_to_scr) |
137 |
|
136 |
|
138 |
;-A_once_hour_2s_before - |
137 |
;-A_once_hour_2s_before - |
139 |
if( never ) then REM --- A_once_hour_20s_before (an event 1x per hour - 2 seconds) --- |
138 |
if( never ) then REM --- A_once_hour_20s_before (an event 1x per hour - 2 seconds) --- |
140 |
if( val(t3,"####")=5958 ) then A_once_hour_2s_before=A_once_hour_2s_before+1 |
139 |
if( val(t3,"####")=5958 ) then A_once_hour_2s_before=A_once_hour_2s_before+1 |
141 |
if( A_once_hour_2s_before=1 ) then A_once_hour=1 |
140 |
if( A_once_hour_2s_before=1 ) then A_once_hour=1 |