Changeset 13198 for trunk/FACT++


Ignore:
Timestamp:
03/23/12 11:44:00 (13 years ago)
Author:
tbretz
Message:
Replace degree value for wind direction with human readable value
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/FactGui.h

    r13061 r13198  
    28222822        fMagicHum->setValue(ptr[2]);
    28232823        fMagicPressure->setValue(ptr[3]);
    2824         fMagicWind->setValue(ptr[4]);
    28252824        fMagicGusts->setValue(ptr[5]);
    28262825        fMagicWindDir->setValue(ptr[6]);
     2826
     2827        static const string dir[] =
     2828        {
     2829            "N", "NNE", "NE", "ENE",
     2830            "E", "ESE", "SE", "SSE",
     2831            "S", "SSW", "SW", "WSW",
     2832            "W", "WNW", "NW", "NNW"
     2833        };
     2834
     2835        const uint16_t i = uint16_t(floor(fmod(ptr[4]+360+11.25, 360)/16));
     2836        fMagicWind->setValue(dir[i]);
    28272837    }
    28282838
Note: See TracChangeset for help on using the changeset viewer.