diff --git a/dsp.c b/dsp.c index e1b2906..e6a9e61 100755 --- a/dsp.c +++ b/dsp.c @@ -214,7 +214,7 @@ int getpixelrow(float *pixelv, int nrow, int *zenith, int reset) { static int npv; static int synced = 0; static double max = 0.0; - static double minDoppler = 100, previous = 0; + static double minDoppler = 1000000000, previous = 0; if(reset) synced = 0; @@ -282,7 +282,7 @@ int getpixelrow(float *pixelv, int nrow, int *zenith, int reset) { mshift = 0; } lastmshift = mshiftOrig; - + // If we are already as aligned as we can get, just continue if (mshift == 0) { synced++; diff --git a/palettes/WXtoImg-N15-HVCT.png b/palettes/WXtoImg-N15-HVCT.png deleted file mode 100644 index f5e8926..0000000 Binary files a/palettes/WXtoImg-N15-HVCT.png and /dev/null differ diff --git a/palettes/WXtoImg-N18-HVCT.png b/palettes/WXtoImg-N18-HVCT.png deleted file mode 100644 index c9e1db0..0000000 Binary files a/palettes/WXtoImg-N18-HVCT.png and /dev/null differ diff --git a/palettes/WXtoImg-N19-HVCT.png b/palettes/WXtoImg-N19-HVCT.png deleted file mode 100644 index 98bd9fd..0000000 Binary files a/palettes/WXtoImg-N19-HVCT.png and /dev/null differ diff --git a/pngio.c b/pngio.c index 1365ca2..42607fb 100644 --- a/pngio.c +++ b/pngio.c @@ -107,9 +107,10 @@ int mapOverlay(char *filename, rgb_t **crow, int nrow, int zenith, int MCIR) { if(MCIR){ if(map.b < 128 && map.g > 128){ // Land + float darken = ((255-crow[y][chb].r)-100)/50; float green = CLIP(map.g/300, 0, 1); float blue = 0.15 - CLIP(map.b/960.0, 0, 1); - crow[y][cha] = (rgb_t){blue*1000, green*98, blue*500.0}; + crow[y][cha] = (rgb_t){blue*1000*darken, green*98*darken, blue*500.0*darken}; }else{ // Sea crow[y][cha] = (rgb_t){9, 17, 74}; @@ -123,6 +124,10 @@ int mapOverlay(char *filename, rgb_t **crow, int nrow, int zenith, int MCIR) { map.r *= factor/257.0; map.g *= factor/257.0; map.b *= factor/257.0; // Color -> alpha: convert black to alpha float alpha = CLIP(composite / 65535.0, 0, 1); + // Clip + map.r = CLIP(map.r, 0, 255.0); + map.g = CLIP(map.g, 0, 255.0); + map.b = CLIP(map.b, 0, 255.0); // Map overlay on channel A crow[y][cha] = RGBcomposite(map, alpha, crow[y][cha], 1); @@ -132,8 +137,8 @@ int mapOverlay(char *filename, rgb_t **crow, int nrow, int zenith, int MCIR) { // Cloud overlay on channel A if(MCIR){ - float cloud = CLIP((crow[y][chb].r - 105) / 150, 0, 1); - crow[y][cha] = RGBcomposite((rgb_t){240, 250, 255}, cloud, crow[y][cha], 1); + float cloud = CLIP((crow[y][chb].r - 113) / 90.0, 0, 1); + crow[y][cha] = RGBcomposite((rgb_t){255, 250, 245}, cloud, crow[y][cha], 1); } } }