You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
<?php |
|
|
|
require('header_auth.php'); |
|
header_auth('Qnb7jfeGZM'); |
|
|
|
if (!isset($_GET['setup_id']) || !ctype_digit($_GET['setup_id'])) { |
|
require('http_errors.php'); |
|
HttpResponse::bad_request()->set_and_exit(); |
|
} |
|
|
|
// SQL injection avoidance |
|
$setup_id = intval($_GET['setup_id']); |
|
|
|
require('query_to_csv.php'); |
|
query_to_csv('select |
|
count count, |
|
setup_ID setup_ID, |
|
time time, |
|
time_system_clock time_system_clock, |
|
time_utc time_utc, |
|
latitude latitude, |
|
longitude longitude, |
|
altitude altitude, |
|
gps_speed `gps_speed [km/h]`, |
|
x_accel `x_accel [m/s^2]`, |
|
y_accel `y_accel [m/s^2]`, |
|
z_accel `z_accel [m/s^2]`, |
|
x_gyro x_gyro, |
|
y_gyro y_gyro, |
|
z_gyro z_gyro, |
|
compass compass, |
|
number_satelites number_satelites, |
|
accuracy accuracy, |
|
gps_bearing gps_bearing, |
|
speed `speed [km/h]`, |
|
engine_load `engine_load [%]`, |
|
engine_rpm `engine_rpm [RPM]`, |
|
maf `maf [g/s]`, |
|
accelerator_pedal `accelerator_pedal [%]`, |
|
ambient_air_temp `ambient_air_temp [°C]` |
|
from rawdata |
|
where setup_id =' . $setup_id, true, 'rawdata-' . $setup_id);
|
|
|