- line_str = (*current_runway);
- cout << line_str;
-
- sscanf( line_str.c_str(), "%lf %lf %d %d %d %s %d %c %d\n",
- &lon, &lat, &len, &width, &hdg, codes, &label_hdg,
- &side, &elev );
-
- rwy_list = gen_runway_area( lon, lat, (double)hdg * DEG_TO_RAD,
+ rwy_str = (*current_runway);
+
+ cout << rwy_str << endl;
+ string rwy_no = rwy_str.substr(2, 4);
+ string rwy_lat = rwy_str.substr(6, 10);
+ sscanf( rwy_lat.c_str(), "%lf", &lat);
+ string rwy_lon = rwy_str.substr(17, 11);
+ sscanf( rwy_lon.c_str(), "%lf", &lon);
+ string rwy_hdg = rwy_str.substr(29, 7);
+ sscanf( rwy_hdg.c_str(), "%lf", &hdg);
+ string rwy_len = rwy_str.substr(36, 7);
+ sscanf( rwy_len.c_str(), "%d", &len);
+ string rwy_width = rwy_str.substr(43, 4);
+ sscanf( rwy_width.c_str(), "%d", &width);
+ string rwy_sfc = rwy_str.substr(47, 4);
+ string rwy_end1 = rwy_str.substr(52, 6);
+ string rwy_end2 = rwy_str.substr(59, 6);
+
+ /*
+ cout << " no = " << rwy_no << endl;
+ cout << " lat = " << rwy_lat << " " << lat << endl;
+ cout << " lon = " << rwy_lon << " " << lon << endl;
+ cout << " hdg = " << rwy_hdg << " " << hdg << endl;
+ cout << " len = " << rwy_len << " " << len << endl;
+ cout << " width = " << rwy_width << " " << width << endl;
+ cout << " sfc = " << rwy_sfc << endl;
+ cout << " end1 = " << rwy_end1 << endl;
+ cout << " end2 = " << rwy_end2 << endl;
+ */
+
+ rwy_list = gen_runway_area( lon, lat, hdg * DEG_TO_RAD,