X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FAirports%2Fparking.cxx;h=b5c8f1ef0667fd5055190d9f45f082ac5a7fa0d9;hb=fc887b106bbb199ffe9c042b8271eae1be26c9aa;hp=b846a13752277c374ecab356e4a5105da17b2299;hpb=4be621fbe96114a246ed74aefe9b9a98bbf99b44;p=flightgear.git diff --git a/src/Airports/parking.cxx b/src/Airports/parking.cxx index b846a1375..b5c8f1ef0 100644 --- a/src/Airports/parking.cxx +++ b/src/Airports/parking.cxx @@ -18,7 +18,7 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -26,77 +26,36 @@ # include #endif -#ifdef _MSC_VER -# define _USE_MATH_DEFINES -#endif -//#include -//#include - #include -//#include -//#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include
-//#include
-//#include - -#include STL_STRING +#include #include "parking.hxx" +/********************************************************************************* + * FGParking + ********************************************************************************/ -/***************************************************************************** - * Helper function for parsing position string - ****************************************************************************/ -double processPosition(const string &pos) +FGParking::FGParking(int index, + const SGGeod& pos, + double aHeading, double aRadius, + const std::string& name, + const std::string& aType, + const std::string& codes) : + FGTaxiNode(index, pos, false, 0), + heading(aHeading), + radius(aRadius), + parkingName(name), + type(aType), + airlineCodes(codes) { - string prefix; - string subs; - string degree; - string decimal; - int sign = 1; - double value; - subs = pos; - prefix= subs.substr(0,1); - if (prefix == string("S") || (prefix == string("W"))) - sign = -1; - subs = subs.substr(1, subs.length()); - degree = subs.substr(0, subs.find(" ",0)); - decimal = subs.substr(subs.find(" ",0), subs.length()); - - - //cerr << sign << " "<< degree << " " << decimal << endl; - value = sign * (atof(degree.c_str()) + atof(decimal.c_str())/60.0); - //cerr << value <