]> git.mxchange.org Git - simgear.git/blobdiff - simgear/environment/metar.cxx
Random object support from Stuart Buchanan
[simgear.git] / simgear / environment / metar.cxx
index c6da78de6ebc1395b1f544510fadf3b5791014e2..9342c5482cd57be5a88186365bba48b515ccba7f 100644 (file)
@@ -16,7 +16,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, 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -24,6 +24,9 @@
  * @file metar.cxx
  * Interface for encoded Meteorological Aerodrome Reports (METAR).
  */
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
 
 #include <string>
 #include <time.h>
@@ -744,6 +747,14 @@ bool SGMetar::scanSkyCondition()
        int i;
        SGMetarCloud cl;
 
+       if (!strncmp(m, "//////", 6)) {
+               m += 6;
+               if (!scanBoundary(&m))
+                       return false;
+               _m = m;
+               return true;
+       }
+
        if (!strncmp(m, "CLR", i = 3)                           // clear
                        || !strncmp(m, "SKC", i = 3)            // sky clear
                        || !strncmp(m, "NSC", i = 3)            // no significant clouds
@@ -833,7 +844,7 @@ bool SGMetar::scanTemperature()
                return false;
        if (!scanBoundary(&m)) {
                if (!strncmp(m, "XX", 2))       // not spec compliant!
-                       m += 2, sign = 0;
+                       m += 2, sign = 0, dew = temp;
                else {
                        sign = 1;
                        if (*m == 'M')