X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fmetar_main.cxx;h=d150b65267097f027dce01302e0db4d10a01f766;hb=7cde2e800bccd4883f03eceb5283add24755b377;hp=96dae6f3df8ca3377c5da140be8ffb7903a940b9;hpb=62a359cc4a338b2f8b720edf8183ab5b69710b14;p=flightgear.git diff --git a/src/Main/metar_main.cxx b/src/Main/metar_main.cxx index 96dae6f3d..d150b6526 100644 --- a/src/Main/metar_main.cxx +++ b/src/Main/metar_main.cxx @@ -16,18 +16,19 @@ // // 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$ #include #include +#include #include +#include #include #include #include -#include using namespace std; @@ -76,7 +77,7 @@ const char *azimuthName(double d) double rnd(double r, int g = 0) { double f = pow(10.0, g); - return f * rint(r / f); + return f * floor(r / f + 0.5); } @@ -270,7 +271,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)) @@ -485,8 +486,6 @@ void usage() ); } -SGSky* thesky = new SGSky; - int main(int argc, char *argv[]) { bool report = true;