AP_GPS: avoid some float conversion warnings

This commit is contained in:
Andrew Tridgell 2014-07-08 20:27:03 +10:00
parent 74c3b404ee
commit 59de5a8465
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ uint32_t AP_GPS_NMEA::_parse_degrees()
}
ret = (deg * (int32_t)10000000UL);
ret += (min * (int32_t)10000000UL / 60);
ret += (int32_t) (frac_min * (1.0e7 / 60.0f));
ret += (int32_t) (frac_min * (1.0e7f / 60.0f));
return ret;
}

View File

@ -891,7 +891,7 @@ AP_GPS_SBP::logging_log_baseline_ecef(struct sbp_baseline_ecef_t* b)
float x = b->x / 1000.0;
float y = b->y / 1000.0;
float z = b->z / 1000.0;
int32_t len = (int32_t) (safe_sqrt(x*x+y*y+z*z) * 1000.0);
int32_t len = (int32_t) (safe_sqrt(x*x+y*y+z*z) * 1000.0f);
struct log_SbpBaseline pkt = {
LOG_PACKET_HEADER_INIT(LOG_MSG_SBPBASELINE),