Index: /trunk/BNC/src/bncutils.cpp
===================================================================
--- /trunk/BNC/src/bncutils.cpp	(revision 11095)
+++ /trunk/BNC/src/bncutils.cpp	(revision 11096)
@@ -317,7 +317,9 @@
                      const QString& ggaType) {
 
-  double lat = strtod(latitude,NULL);
-  double lon = strtod(longitude,NULL);
-  double hei = strtod(height,NULL);
+  // QByteArray::toDouble() always uses the C locale - unlike strtod(),
+  // which follows LC_NUMERIC (set by Qt from the environment)
+  double lat = latitude.toDouble();
+  double lon = longitude.toDouble();
+  double hei = height.toDouble();
   QString sentences = "GPGGA,";
   if (ggaType.contains("GNGGA")) {
Index: /trunk/BNC/src/pppCrdFile.cpp
===================================================================
--- /trunk/BNC/src/pppCrdFile.cpp	(revision 11095)
+++ /trunk/BNC/src/pppCrdFile.cpp	(revision 11096)
@@ -43,4 +43,5 @@
 #include <cstdlib>
 #include <fstream>
+#include <locale>
 #include <sstream>
 #include "pppCrdFile.h"
@@ -63,4 +64,16 @@
   double sign = (d < 0.0) ? -1.0 : 1.0;
   return sign * (fabs(d) + m / 60.0 + s / 3600.0);
+}
+
+// Convert a number token independent of the process locale: atof() follows
+// LC_NUMERIC, which Qt sets from the environment, so with e.g. a German
+// locale "123.7785" would be read as 123.
+//////////////////////////////////////////////////////////////////////////////
+static double toDouble(const string& str) {
+  istringstream in(str);
+  in.imbue(locale::classic());
+  double value = 0.0;
+  in >> value;
+  return value;
 }
 
@@ -133,9 +146,9 @@
       }
       else if (token.compare(0, 2, "H:") == 0) {
-        hgt = atof(token.substr(2).c_str());
+        hgt = toDouble(token.substr(2));
         haveHgt = true;
       }
       else if (token.compare(0, 6, "EPOCH:") == 0) {
-        staInfo._epoch = atof(token.substr(6).c_str());
+        staInfo._epoch = toDouble(token.substr(6));
       }
       else if (token.compare(0, 4, "VEL:") == 0) {
Index: /trunk/BNC/src/satObs.cpp
===================================================================
--- /trunk/BNC/src/satObs.cpp	(revision 11095)
+++ /trunk/BNC/src/satObs.cpp	(revision 11096)
@@ -3,4 +3,5 @@
 #include <sstream>
 #include <cstdlib>
+#include <limits>
 #include <newmatio.h>
 
@@ -604,5 +605,7 @@
         string valStr; // may be "nan" (invalid value), which operator>> can't parse
         in >> valStr;
-        frqAntenna._nadirAngleCorrection.push_back(strtod(valStr.c_str(), 0));
+        // not strtod(): it follows LC_NUMERIC, QByteArray::toDouble() the C locale
+        frqAntenna._nadirAngleCorrection.push_back(valStr.find("nan") != string::npos ? std::numeric_limits<double>::quiet_NaN()
+                                                                    : QByteArray(valStr.c_str()).toDouble());
       }
       satAntenna._freq.push_back(frqAntenna);
