Revize 41dd5f26
Přidáno uživatelem horkym před téměř 7 roky(ů)
cron/parser.php | ||
---|---|---|
105 | 105 |
for ($i = 0; $i < 2; $i++) { |
106 | 106 |
$this->trafficOneDay[$t->device][$i] = array(); |
107 | 107 |
for ($j = 0; $j < 11; $j++) { |
108 |
$this->trafficOneDay[$t->device][$i][$j] = array(0, 0); // Pocet danych vozidel, suma jejich rychlosti.
|
|
108 |
$this->trafficOneDay[$t->device][$i][$j] = array(0, 0, 0); // Pocet danych vozidel, suma jejich rychlosti a pocet vozidel u kterych nesla stanovit rychlost.
|
|
109 | 109 |
} |
110 | 110 |
} |
111 | 111 |
|
... | ... | |
122 | 122 |
for ($i = 0; $i < 2; $i++) { |
123 | 123 |
$this->traffic[$t->device][$interval][$i] = array(); |
124 | 124 |
for ($j = 0; $j < 11; $j++) { |
125 |
$this->traffic[$t->device][$interval][$i][$j] = array(0, 0); // Pocet danych vozidel, suma jejich rychlosti.
|
|
125 |
$this->traffic[$t->device][$interval][$i][$j] = array(0, 0, 0); // Pocet danych vozidel, suma jejich rychlosti a pocet vozidel u kterych nesla stanovit rychlost.
|
|
126 | 126 |
} |
127 | 127 |
} |
128 | 128 |
} |
129 | 129 |
|
130 |
// Ulozeni dulezitych informaci o danem zaznamu. |
|
131 |
$this->traffic[$t->device][$interval][$t->direction][$t->type10][0]++; |
|
132 |
$this->traffic[$t->device][$interval][$t->direction][$t->type10][1] += $t->speed; |
|
133 |
|
|
134 |
// Ulozeni i do pole s prumery za cely den. |
|
135 |
$this->trafficOneDay[$t->device][$t->direction][$t->type10][0]++; |
|
136 |
$this->trafficOneDay[$t->device][$t->direction][$t->type10][1] += $t->speed; |
|
130 |
// Ulozeni dulezitych informaci o danem zaznamu do pole s casovymi intervaly a i do pole se zaznamy za cely den. |
|
131 |
if ($t->speed < 1) { |
|
132 |
$this->traffic[$t->device][$interval][$t->direction][$t->type10][2]++; |
|
133 |
$this->trafficOneDay[$t->device][$t->direction][$t->type10][2]++; |
|
134 |
} else { |
|
135 |
$this->traffic[$t->device][$interval][$t->direction][$t->type10][0]++; |
|
136 |
$this->traffic[$t->device][$interval][$t->direction][$t->type10][1] += $t->speed; |
|
137 |
$this->trafficOneDay[$t->device][$t->direction][$t->type10][0]++; |
|
138 |
$this->trafficOneDay[$t->device][$t->direction][$t->type10][1] += $t->speed; |
|
139 |
} |
|
137 | 140 |
} |
138 | 141 |
|
139 | 142 |
private function download($date, $zipUrl, $dir, $downloaded) { |
Také k dispozici: Unified diff
refs #6943: Cron - uprava pro novou verzi databaze