fix current altitude accuracy

This commit is contained in:
Zichao Lin 2022-05-08 11:00:45 +08:00
parent 85e3e82777
commit 2554e22f66

@ -48,12 +48,13 @@ void TinyEurocat::OnGetTagItem( CFlightPlan FlightPlan,
break; break;
case TAG_ITEM_MET_CURR_ALT: case TAG_ITEM_MET_CURR_ALT:
mcalt = RadarTarget.GetPosition().GetPressureAltitude() * 0.3048; mcalt = RadarTarget.GetPosition().GetPressureAltitude() * 0.3048;
mcalt /= 100; mcalt /= 10;
itoa(mcalt * 10, tmpstr, 10); itoa(mcalt, tmpstr, 10);
sprintf(sItemString, "%04s", tmpstr); sprintf(sItemString, "%04s", tmpstr);
break; break;
case TAG_ITEM_MET_CURR_SPD: case TAG_ITEM_MET_CURR_SPD:
mcspd = RadarTarget.GetGS() * 1.852 / 10; mcspd = RadarTarget.GetGS() * 1.852;
mcspd /= 10;
itoa(mcspd, tmpstr, 10); itoa(mcspd, tmpstr, 10);
sprintf(sItemString, "%03s", tmpstr); sprintf(sItemString, "%03s", tmpstr);
break; break;