@@ -81,6 +81,7 @@ struct KiwiSDRMapSelector {
8181 serversList = loadServersList ();
8282
8383 if (serversList) {
84+ int totallyParsed = 0 ;
8485 for (const auto & entry : *serversList) {
8586 ServerEntry serverEntry;
8687
@@ -90,8 +91,13 @@ struct KiwiSDRMapSelector {
9091
9192 if (entry[" offline" ].get <std::string>() == " no" ) {
9293 std::string gps_str = entry[" gps" ].get <std::string>();
93- geomap::GeoCoordinates geo;
94+ geomap::GeoCoordinates geo = { 0.0 , 0.0 } ;
9495 sscanf (gps_str.c_str (), " (%lf, %lf)" , &geo.latitude , &geo.longitude );
96+ if (geo.latitude == 0 || geo.longitude == 0 ) {
97+ flog::warn (" Parsing geo coordinates: \" {}\" => {},{}" , gps_str, geo.latitude , geo.longitude );
98+ } else if (totallyParsed < 10 ) {
99+ flog::info (" Parsing geo coordinates: \" {}\" => {},{}" , gps_str, geo.latitude , geo.longitude );
100+ }
95101 serverEntry.gps = geomap::geoToCartesian (geo).toImVec2 ();
96102 serverEntry.name = entry[" name" ].get <std::string>();
97103 serverEntry.loc = entry[" loc" ].get <std::string>();
@@ -103,9 +109,11 @@ struct KiwiSDRMapSelector {
103109 serverEntry.users = atoi (entry[" users" ].get <std::string>().c_str ());
104110 serverEntry.usersmax = atoi (entry[" users_max" ].get <std::string>().c_str ());
105111 servers.push_back (serverEntry);
112+ totallyParsed++;
106113 }
107114 }
108115 }
116+ flog::info (" Parsed {} servers" ,totallyParsed);
109117 }
110118
111119 std::sort (servers.begin (), servers.end (), [](const ServerEntry& a, const ServerEntry& b) {
0 commit comments