Ралли "Пено-2014" - Аналитика

Статус: Кубок России по ралли 2014 года; Чемпионат России по ралли 2014 года

Дата: 15 февраля 2014 г.

Место: Тверская область

 

Методика: Секунды с километра
0) { print "
0) { print "Данные " . $arraySS[$raceData['ssByLink']]['ssName'] . " (" . $arraySS[$raceData['ssByLink']]['ssDistance'] . " км)"; } else { print "Выберите один эталонный экипаж и несколько экипажей для сравнения"; } ?>

Управление

0) { print "Участок:
"; print $raceData['ssHtmlBlock']; print "
"; } else { print "Серии:
"; print $raceData['seriesHtmlBlock']; print "
"; print "
"; print "Зачёты:
"; print $raceData['classesHtmlBlock']; } ?>
"; // print "

Выберете один эталонный экипаж и несколько экипажей для сравнения

"; print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; $tableHtmlBlock = ""; //Цвет с которого начать "полосатить" таблицу $bgcol = "#E0E4E4"; $allParticipants = AnalyticsParticipantFilter($allParticipants,$raceAnalytics['focus'],$raceAnalytics['select']); $lastSSID = GetLastSSID( $raceID ); $allResultsArray = GetResultsArray($raceID, $lastSSID, $allParticipants,'Analytics'); $analyticsData = GetAnalyticsData ( $raceID, $allResultsArray, $allParticipants, $raceAnalytics['focus']); //print_r($analyticsData); //***код для графика $chart->AddColumn("string", "СУ"); foreach($allParticipants as $oneParticipant) { $info = GetParticipantInfo ($oneParticipant); $chart->AddColumn("number", "№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name']); } //***код для графика foreach($arraySS as $singleSS) { $chart->AddRow("СУ", $singleSS['ssName']); $arrayResults = array(); $arrayParticipantsID = array(); $analyticsArray = array(); $ssDistance = $singleSS['ssDistance']; foreach($allParticipants as $oneParticipant) { $PtcID = $oneParticipant['PtcID']; $timesArray = $analyticsData[$PtcID]['ssResults']; $ssResult = $timesArray[$singleSS['ssID']]; $differenceArray = $analyticsData[$PtcID]['ssDifferences']; $difference = $differenceArray[$singleSS['ssID']]; $analyticsArray[$PtcID]['ssResults'] = $ssResult; $analyticsArray[$PtcID]['differences'] = $difference; if ($ssResult != 0) { $averageSpeed = $ssDistance/$ssResult*3600.0; } else { $averageSpeed = 0; } $averageSpeed = round($averageSpeed,1); $analyticsArray[$PtcID]['averageSpeed'] = $averageSpeed; if (($ssDistance > 0) && ($difference <> 0)) { $acceleration = $difference/$ssDistance; $acceleration = round($acceleration,2); $analyticsArray[$PtcID]['acceleration'] = $acceleration; } else { $analyticsArray[$PtcID]['acceleration'] = "--"; if ($ssDistance == 0) { $analyticsArray[$PtcID]['averageSpeed'] = "--"; } } $arrayParticipantsID[] = $PtcID; $arrayResults[] = $ssResult; } array_multisort($arrayResults,$arrayParticipantsID); foreach ($arrayResults as $oneResult) { $PtcID = current($arrayParticipantsID); $fake = next($arrayParticipantsID); $oneParticipant = $allParticipants[$PtcID]; $info = GetParticipantInfo ($oneParticipant); $acceleration = $analyticsArray[$PtcID]['acceleration']; $averageSpeed = $analyticsArray[$PtcID]['averageSpeed']; if ($PtcID == $raceAnalytics['focus']) { $time = $analyticsArray[$PtcID]['ssResults']; $timestr = sectotime($time,$tformat,$accuracy); if ($time == 999998) { $timestr = "сход"; $acceleration = "--"; $averageSpeed = "--"; $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], "{v: 0, f: 'сход'}"); } else if ($time == 999999) { $timestr = "искл."; $acceleration = "--"; $averageSpeed = "--"; $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], "{v: 0, f: 'исключен'}"); } else if ($time == 999997) { $timestr = "Н/Д"; $acceleration = "--"; $averageSpeed = "--"; $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], "{v: 0, f: 'нет данных'}"); } else { $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], 0); } } else { $time = $analyticsArray[$PtcID]['differences']; $time = round($time,4); if ($time > 0) $timestr = "+".$time; else $timestr = $time; if ($time == 999998) { $timestr = "сход"; $acceleration = "--"; $averageSpeed = "--"; $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], "null"); } else if ($time == 999999) { $timestr = "искл."; $acceleration = "--"; $averageSpeed = "--"; $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], "null"); } else if ($time == 999997) { $timestr = "--"; $acceleration = "--"; $averageSpeed = "--"; $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], "null"); } else { if ($acceleration == "--") { $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], 0); } else { $chart->AddRow("№" . $info['bodyNum'] . " " . $info['driversArray'][0]['name'], $acceleration); } } } if ( $raceData['ssByLink'] == $singleSS['ssID'] ) { if ( $bgcol == "#FFFFFF" ) { $bgcol = "#E0E4E4"; } else { $bgcol = "#FFFFFF"; } if ($PtcID == $raceAnalytics['focus']) { $bs = ""; $be = ""; } else { $bs = ""; $be = ""; } $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; } } } } else { print ""; //$tableHtmlBlock .= ""; print "

"; //$tableHtmlBlock .= ""; } else { //$tableHtmlBlock .= ""; //$tableHtmlBlock .= ""; print "

"; //$tableHtmlBlock .= ""; } ?>

Номер

Экипаж

Автомобиль

Класс

Время

Средняя скорость

Сек/км

" . $bs . $info['bodyNum'] . $be . "
" . $bs . $info['driversArray'][0]['name'] . "
" . $info['driversArray'][1]['name'] . $be . "
" . $bs . $info['carMark'] . " " . $info['carModel'] . $be . "
"; $classText = ""; $classInfo = GetParticipantClassByLinks ($info, $allSeries, $seriesByLink, $classByLink); $classText = $classInfo['classShortName']; $tableHtmlBlock .= $bs . $classText . $be . "
"; print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; $tableHtmlBlock = ""; //Цвет с которого начать "полосатить" таблицу $bgcol = "#E0E4E4"; //Пропускаем все, если гонка не опубликована foreach($allParticipants as $oneParticipant) { $info = GetParticipantInfo ($oneParticipant); $PtcID = $oneParticipant['PtcID']; if ( $bgcol == "#FFFFFF" ) { $bgcol = "#E0E4E4"; } else { $bgcol = "#FFFFFF"; } $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; $tableHtmlBlock .= ""; } } print $tableHtmlBlock; ?>

Номер

Экипаж

Автомобиль

Класс

Фокус

Сравнить

" . $info['bodyNum'] . "
" . $info['driversArray'][0]['name'] . "
" . $info['driversArray'][1]['name'] . "
" . $info['carMark'] . " " . $info['carModel'] . "
"; $classText = ""; $classInfo = GetParticipantClassByLinks ($info, $allSeries, $seriesByLink, $classByLink); $classText = $classInfo['classShortName']; $tableHtmlBlock .= $classText ."
0) { $chart->setWidth(720); $chart->setHeight(500); $chart->setTitle("Отклонения по всем СУ"); $chart->setVAxisTitle("(+) Отставание . . . . . (-) Опережение, сек/км"); $chart->invertVAxis(); $chartHtml = $chart->buildHTML("chartDiv"); print $chartHtml; print "
"; } //выводим кнопку формы if ($focusPtc > 0) { //$tableHtmlBlock .= "