AP_GPS: avoid some float conversion warnings
This commit is contained in:
parent
74c3b404ee
commit
59de5a8465
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user