///*
//Analog to digital variables

//Front accelerometer
acc_fx=fr_acc_volts_2_g(dataAI[acc_fx_con]);	
acc_fy=fr_acc_volts_2_g(dataAI[acc_fy_con]);
acc_fz=fr_acc_volts_2_g(dataAI[acc_fz_con]);
//IMU accelerometer
//Original IMU, but different orientation
/*
acc_mx=imu_acc_volts_2_g(dataAI[acc_mx_con]);
acc_my=imu_acc_volts_2_g(dataAI[acc_my_con]);
acc_mz=imu_acc_volts_2_g(dataAI[acc_mz_con]);
x_rate=imu_rate_volts_2_deg(dataAI[x_rate_con]);
y_rate=imu_rate_volts_2_deg(dataAI[y_rate_con]);
*/
acc_mx=-imu_acc_volts_2_g(dataAI[acc_mz_con]);
acc_my=-imu_acc_volts_2_g(dataAI[acc_my_con]);
acc_mz=imu_acc_volts_2_g(dataAI[acc_mx_con]);
x_rate=-imu_rate_volts_2_deg_x(dataAI[x_rate_con]);
y_rate=imu_rate_volts_2_deg_y(dataAI[y_rate_con]);


//Rear accelerometer
acc_rx=fr_acc_volts_2_g(dataAI[acc_rx_con]);
acc_ry=fr_acc_volts_2_g(dataAI[acc_ry_con]);
acc_rz=fr_acc_volts_2_g(dataAI[acc_rz_con]);

//Torque sensor
steering_torque=torque_volts_2_NM(dataAI[steering_torque_con],torque_a,torque_b);

//Handbrake position
handbrake_position=handbrake_volts_2_pos(dataAI[handbrake_position_con],handbrake_a,handbrake_b);
//printf("handbrake_position=%f\n",handbrake_position);

//Steering angle
steering_angle=steering_volts_2_deg(dataAI[steering_angle_con],steering_a,steering_b);

//Brakes
front_brake=front_brake_volts_2_bar(dataAI[front_brake_con]);
rear_brake=rear_brake_volts_2_bar(dataAI[rear_brake_con]);

