diff --git a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp index 6a57f9ca98..44dfe10c86 100644 --- a/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp +++ b/libraries/AP_Frsky_Telem/AP_Frsky_Telem.cpp @@ -617,7 +617,7 @@ uint32_t AP_Frsky_Telem::calc_gps_status(void) // GPS vertical dilution of precision in dm gps_status |= prep_number(roundf(_ahrs.get_gps().get_vdop() * 0.1f),2,1)<= 3) { - Location loc = _ahrs.get_gps().location(); //get gps instance 0 + const Location &loc = _ahrs.get_gps().location(); //get gps instance 0 lat = format_gps(fabsf(loc.lat/10000000.0f)); _gps.latdddmm = lat; _gps.latmmmm = (lat - _gps.latdddmm) * 10000;