Skip to content
Snippets Groups Projects
Commit 1b75fcbd authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Fix units

parent 49e83a62
No related branches found
No related tags found
1 merge request!1Sergi
......@@ -29,7 +29,6 @@ void CModelCarBatteries::process_data_frame(uint8_t id,uint32_t timestamp, TData
else
{
it->second = data_union.voltage;
it->second.voltage = it->second.voltage/1000.0; //mV to V
//m_bat_values[currentSensor] = data_union.us;
}
......@@ -47,7 +46,7 @@ bool CModelCarBatteries::get_bat(SENSOR_ID id, float & value)
}
else
{
value = it->second.voltage;
value = it->second.voltage/1000.0; //mV to V
ok=true;
}
this->data_mutex.exit();
......
......@@ -27,9 +27,9 @@ void CModelCarEgomotion::process_data_frame(uint8_t id,uint32_t timestamp, TData
this->imu.gx = this->imu.gx*3.14159/180; // º/s to rad/s
this->imu.gy = this->imu.gy*3.14159/180; // º/s to rad/s
this->imu.gz = this->imu.gz*3.14159/180; // º/s to rad/s
this->imu.mx = this->imu.mx/1e-7; //miliGauss(mG) to Tesla(T)
this->imu.my = this->imu.my/1e-7; //miliGauss(mG) to Tesla(T)
this->imu.mz = this->imu.mz/1e-7; //miliGauss(mG) to Tesla(T)
this->imu.mx = this->imu.mx*1e-7; //miliGauss(mG) to Tesla(T)
this->imu.my = this->imu.my*1e-7; //miliGauss(mG) to Tesla(T)
this->imu.mz = this->imu.mz*1e-7; //miliGauss(mG) to Tesla(T)
break;
default:
std::cout << "CModelCarEgomotion::process_data_frame: error, incorrect id: " << (unsigned int)id << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment