Rev 762 | Rev 772 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 762 | Rev 766 | ||
---|---|---|---|
Line 106... | Line 106... | ||
106 | write_ndigit_number_s_10th(23, top_line, (int16_t)(naviData.CurrentPosition.Altitude / 100 - altimeter_offset * 10), 3, 0); // GPS |
106 | write_ndigit_number_s_10th(23, top_line, (int16_t)(naviData.CurrentPosition.Altitude / 100 - altimeter_offset * 10), 3, 0); // GPS |
107 | } |
107 | } |
108 | } |
108 | } |
109 | } else { |
109 | } else { |
110 | if (COSD_FLAGS_CONFIG & COSD_FLAG_FEET) { |
110 | if (COSD_FLAGS_CONFIG & COSD_FLAG_FEET) { |
111 | write_ndigit_number_s(23, top_line, naviData.Altimeter / 10 * 32 / 30, 4, 0); // BARO |
111 | write_ndigit_number_s(23, top_line, naviData.Altimeter / 10 * 32 / 20, 4, 0); // BARO |
112 | } else { |
112 | } else { |
113 | //note:lephisto:according to several sources it's /30 |
113 | //cite:killagreg "Faktor 20 bis 21 wäre korrekt." (http://forum.mikrokopter.de/topic-post211192.html#post211192) |
114 | if (naviData.Altimeter > 300 || naviData.Altimeter < -300) { |
114 | if (naviData.Altimeter > 200 || naviData.Altimeter < -200) { |
115 | // above 10m only write full meters |
115 | // above 10m only write full meters |
116 | write_ndigit_number_s(23, top_line, naviData.Altimeter / 30, 4, 0); // BARO |
116 | write_ndigit_number_s(23, top_line, naviData.Altimeter / 20, 4, 0); // BARO |
117 | } else { |
117 | } else { |
118 | // up to 10m write meters.dm |
118 | // up to 10m write meters.dm |
119 | write_ndigit_number_s_10th(23, top_line, naviData.Altimeter / 3, 3, 0); // BARO |
119 | write_ndigit_number_s_10th(23, top_line, naviData.Altimeter / 2, 3, 0); // BARO |
120 | } |
120 | } |
121 | } |
121 | } |
122 | } |
122 | } |
Line 288... | Line 288... | ||
288 | // remember statistics (only when engines running) |
288 | // remember statistics (only when engines running) |
289 | if (naviData.FCFlags & FLAG_MOTOR_RUN) { |
289 | if (naviData.FCFlags & FLAG_MOTOR_RUN) { |
290 | if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) { |
290 | if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) { |
291 | if (naviData.CurrentPosition.Altitude / 1000 - altimeter_offset > max_Altimeter) max_Altimeter = naviData.CurrentPosition.Altitude / 1000; |
291 | if (naviData.CurrentPosition.Altitude / 1000 - altimeter_offset > max_Altimeter) max_Altimeter = naviData.CurrentPosition.Altitude / 1000; |
292 | } else { |
292 | } else { |
293 | if (naviData.Altimeter / 30 > max_Altimeter) max_Altimeter = naviData.Altimeter / 30; |
293 | if (naviData.Altimeter / 20 > max_Altimeter) max_Altimeter = naviData.Altimeter / 32; |
294 | } |
294 | } |
295 | if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed; |
295 | if (naviData.GroundSpeed > max_GroundSpeed) max_GroundSpeed = naviData.GroundSpeed; |
296 | if (naviData.HomePositionDeviation.Distance > max_Distance) { |
296 | if (naviData.HomePositionDeviation.Distance > max_Distance) { |
297 | max_Distance = naviData.HomePositionDeviation.Distance; |
297 | max_Distance = naviData.HomePositionDeviation.Distance; |
298 | } |
298 | } |