kopia lustrzana https://github.com/dl9rdz/rdz_ttgo_sonde
fix horizontal speed value (was wrong for all except RS41)
rodzic
b586fafa5a
commit
8f75960405
|
@ -1,4 +1,4 @@
|
|||
const char *version_name = "rdzTTGOsonde";
|
||||
const char *version_id = "devel20201115";
|
||||
const char *version_id = "devel20201118";
|
||||
const int SPIFFS_MAJOR=2;
|
||||
const int SPIFFS_MINOR=4;
|
||||
|
|
|
@ -1004,7 +1004,7 @@ void Display::drawHS(DispEntry *de) {
|
|||
}
|
||||
boolean is_ms = (de->extra && de->extra[0]=='m')?true:false; // m/s or km/h
|
||||
float hs = sonde.si()->hs;
|
||||
if(is_ms) hs = hs / 3.6;
|
||||
if(!is_ms) hs = hs * 3.6;
|
||||
boolean has_extra = (de->extra && de->extra[1]!=0)? true: false;
|
||||
snprintf(buf, 16, hs>99?" %3.0f":" %2.1f", hs);
|
||||
if(has_extra) { strcat(buf, de->extra+1); }
|
||||
|
|
|
@ -356,7 +356,7 @@ static void posrs41(const byte b[], uint32_t b_len, uint32_t p)
|
|||
if (dir<0.0) dir = 360.0+dir;
|
||||
sonde.si()->dir = dir;
|
||||
Serial.print(" ");
|
||||
sonde.si()->hs = sqrt((float)(vn*vn+ve*ve))*3.6f;
|
||||
sonde.si()->hs = sqrt((float)(vn*vn+ve*ve));
|
||||
Serial.print(sonde.si()->hs);
|
||||
Serial.print("km/h ");
|
||||
Serial.print(dir);
|
||||
|
|
|
@ -64,8 +64,8 @@ typedef struct st_sondeinfo {
|
|||
float lat; // latitude
|
||||
float lon; // longitude
|
||||
float alt; // altitude
|
||||
float vs; // vertical speed
|
||||
float hs; // horizontal speed
|
||||
float vs; // vertical speed in m/s
|
||||
float hs; // horizontal speed in m/s
|
||||
float dir; // 0..360
|
||||
uint8_t sats; // number of sats
|
||||
uint8_t validPos; // bit pattern for validity of above 7 fields; 0x80: position is old
|
||||
|
|
Ładowanie…
Reference in New Issue