@@ -769,8 +769,6 @@ string CSMRRadar::GetBottomLine(const char * Callsign) {
769769
770770bool CSMRRadar::OnCompileCommand (const char * sCommandLine )
771771{
772-
773-
774772 return false ;
775773}
776774
@@ -896,7 +894,6 @@ double TrueBearing(CPosition pos1, CPosition pos2)
896894
897895void CSMRRadar::OnRefresh (HDC hDC, int Phase)
898896{
899-
900897 if (Phase != REFRESH_PHASE_BEFORE_TAGS)
901898 return ;
902899
@@ -1146,10 +1143,12 @@ void CSMRRadar::OnRefresh(HDC hDC, int Phase)
11461143 th.DrawEllipse (dc, acPosPix.x - 4 , acPosPix.y - 4 , acPosPix.x + 4 , acPosPix.y + 4 , RGB (255 , 255 , 255 ));
11471144 }
11481145
1146+ AddScreenObject (DRAWING_AC_SYMBOL, rt.GetCallsign (), { acPosPix.x - 4 , acPosPix.y - 4 , acPosPix.x + 4 , acPosPix.y + 4 }, false , GetBottomLine (rt.GetCallsign ()).c_str ());
1147+
11491148 dc.SelectObject (pqOrigPen);
11501149
11511150 }
1152- else if (rt.GetGS () >= 50 && rt.GetGS () < 180 && rt.GetPosition ().GetFlightLevel () < 2500 ) {
1151+ else if (rt.GetGS () >= 50 && rt.GetGS () < 180 && rt.GetPosition ().GetPressureAltitude () < ( GetPlugIn ()-> GetTransitionAltitude ()- 2000 ) ) {
11531152 TGraphics th;
11541153
11551154 POINT acPosPix = ConvertCoordFromPositionToPixel (RtPos.GetPosition ());
@@ -1268,15 +1267,10 @@ void CSMRRadar::OnRefresh(HDC hDC, int Phase)
12681267 dc.LineTo (acPosPix.x , acPosPix.y - 6 );
12691268 }
12701269 else {
1271- dc.MoveTo (acPosPix.x - 6 , acPosPix.y );
1272- dc.LineTo (acPosPix.x + 6 , acPosPix.y );
1273- dc.MoveTo (acPosPix.x , acPosPix.y - 6 );
1274- dc.LineTo (acPosPix.x , acPosPix.y + 6 );
1270+ th.DrawEllipse (dc, acPosPix.x - 4 , acPosPix.y - 4 , acPosPix.x + 4 , acPosPix.y + 4 , RGB (255 , 255 , 255 ));
12751271 }
12761272
1277- if (RtPos.GetTransponderI ()) {
1278- th.DrawEllipse (dc, acPosPix.x - 7 , acPosPix.y - 7 , acPosPix.x + 7 , acPosPix.y + 7 , RGB (255 , 255 , 255 ));
1279- }
1273+ AddScreenObject (DRAWING_AC_SYMBOL, rt.GetCallsign (), { acPosPix.x - 4 , acPosPix.y - 4 , acPosPix.x + 4 , acPosPix.y + 4 }, false , GetBottomLine (rt.GetCallsign ()).c_str ());
12801274
12811275 dc.SelectObject (pqOrigPen);
12821276 }
@@ -2023,11 +2017,13 @@ void CSMRRadar::OnRefresh(HDC hDC, int Phase)
20232017 to_display = " F" ;
20242018 FL = RtPos.GetFlightLevel ();
20252019 }
2026- string str = std::to_string (FL);
2027- for (size_t i = 0 ; i < 5 - str.length (); i++)
2020+ ostringstream strs;
2021+ strs << FL;
2022+ string str = strs.str ();
2023+ for (size_t i = 0 ; i < 6 - str.length (); i++)
20282024 str = " 0" + str;
2029-
2030- to_display.append (str. substr ( 0 , 3 ) );
2025+ str. erase (str. begin () + 3 , str. end ());
2026+ to_display.append (str);
20312027 int delta_fl = FL - rt.GetPreviousPosition (RtPos).GetPressureAltitude ();
20322028 if (abs (delta_fl) >= 20 ) {
20332029 if (delta_fl < 0 ) {
0 commit comments