mod09A1sa.c 414 B

1234567891011121314151617181920212223
  1. /* Cloud State unsigned int bits[0-1]
  2. * 00 -> class 0: clear
  3. * 01 -> class 1: cloudy
  4. * 10 -> class 2: mixed
  5. * 11 -> class 3: not set, assumed clear
  6. */
  7. #include <grass/raster.h>
  8. CELL mod09A1sa(CELL pixel)
  9. {
  10. CELL qctemp;
  11. /* Select bit 0 and 1 (right-side).
  12. * hexadecimal "0x03" => binary "11"
  13. * this will set all other bits to null */
  14. qctemp = pixel & 0x03;
  15. return qctemp;
  16. }