]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/metar_main.cxx
set /sim/fg-current to current working directory; getcwd() is defined in
[flightgear.git] / src / Main / metar_main.cxx
index 36567ffb30b640fcc9f9636ae46ceaed130546f5..40784732ee6bee625fab001febf37dd8f42f0901 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$
 
@@ -79,7 +79,7 @@ double rnd(double r, int g = 0)
 }
 
 
-ostream& operator<<(ostream& s, SGMetarVisibility& v)
+ostream& operator<<(ostream& s, const SGMetarVisibility& v)
 {
        ostringstream buf;
        int m = v.getModifier();
@@ -154,7 +154,7 @@ void printReport(SGMetar *m)
 
 
        // directed visibility
-       SGMetarVisibility *dirvis = m->getDirVisibility();
+       const SGMetarVisibility *dirvis = m->getDirVisibility();
        for (i = 0; i < 8; i++, dirvis++)
                if (dirvis->getVisibility_m() != NaN)
                        cout << "\t\t\t" << *dirvis << endl;
@@ -269,7 +269,7 @@ void printReport(SGMetar *m)
                if ((s = rwy.getExtentString()) && strlen(s))
                        surface.push_back(s);
                if ((d = rwy.getDepth()) != NaN) {
-                       sprintf(buf, "%.0lf mm", d * 1000.0);
+                       sprintf(buf, "%.1lf mm", d * 1000.0);
                        surface.push_back(buf);
                }
                if ((s = rwy.getFrictionString()) && strlen(s))
@@ -484,7 +484,6 @@ void usage()
        );
 }
 
-
 int main(int argc, char *argv[])
 {
        bool report = true;