We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5fb6a1 commit 1e30872Copy full SHA for 1e30872
libraries/AP_Frsky_Telem/AP_Frsky_Backend.cpp
@@ -77,7 +77,6 @@ void AP_Frsky_Backend::calc_gps_position(void)
77
AP_AHRS &_ahrs = AP::ahrs();
78
79
Location loc;
80
-
81
if (_ahrs.get_location(loc)) {
82
float lat = format_gps(fabsf(loc.lat/10000000.0f));
83
_SPort_data.latdddmm = lat;
@@ -89,7 +88,7 @@ void AP_Frsky_Backend::calc_gps_position(void)
89
88
_SPort_data.lonmmmm = (lon - _SPort_data.londddmm) * 10000;
90
_SPort_data.lon_ew = (loc.lng < 0) ? 'W' : 'E';
91
92
- float alt = loc.alt * 0.01f;
+ float alt = loc.get_alt_cm() * 0.01f;
93
_SPort_data.alt_gps_meters = float_to_uint16(alt);
94
_SPort_data.alt_gps_cm = float_to_uint16((alt - _SPort_data.alt_gps_meters) * 100);
95
0 commit comments