From 628948c4164b83f62d8f1250a96e04b6c46f6c93 Mon Sep 17 00:00:00 2001 From: Thierry Leconte Date: Sun, 22 May 2005 08:51:52 +0000 Subject: [PATCH] add stdlib.h include --- README | 6 +++--- image.c | 2 +- main.c | 7 +++++-- version.h | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README b/README index a6b6681..13d7f77 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -ATPDEC README (Thierry Leconte 2004) +ATPDEC README (Thierry Leconte F4DWV (c) 2004-2005) DESCRIPTION @@ -53,9 +53,9 @@ OPTIONS Default : soundfile directory. -s n - Satellite ident : n=0 :NOOA-15 n=1 :NOAA-17 + Satellite number 15 to 18 Used for Temperature compensation. - Default : NOAA17 + Default : NOAA15 -c conf_file Use configuration file for false color generation. diff --git a/image.c b/image.c index 7854545..e62aad8 100644 --- a/image.c +++ b/image.c @@ -221,7 +221,7 @@ const struct { float Ns; float b[3]; } cor[3]; -} satcal[2] = +} satcal[4] = #include "satcal.h" typedef struct { diff --git a/main.c b/main.c index fee7a59..be111bd 100644 --- a/main.c +++ b/main.c @@ -20,6 +20,7 @@ * */ +#include #include #ifdef WIN32 #include "w32util.h" @@ -149,7 +150,7 @@ int ImageColorOut(char *filename, float **prow, int nrow) png_infop info_ptr; png_structp png_ptr; int n; - float *pixelc; + float *pixelc, *pixelp; extern void falsecolor(double v, double t, float *r, float *g, float *b); @@ -189,10 +190,12 @@ int ImageColorOut(char *filename, float **prow, int nrow) png_init_io(png_ptr, pngfile); png_write_info(png_ptr, info_ptr); + pixelc=prow[0]; for (n = 0; n < nrow ; n++) { png_color pix[CH_WIDTH]; int i; + pixelp=pixelc; pixelc = prow[n]; for (i = 0; i < CH_WIDTH - 1; i++) { @@ -200,7 +203,7 @@ int ImageColorOut(char *filename, float **prow, int nrow) float r, g, b; v = pixelc[i+SYNC_WIDTH + SPC_WIDTH]; - t = pixelc[i+SYNC_WIDTH + SPC_WIDTH + CH_OFFSET]; + t = (2.0*pixelc[i+SYNC_WIDTH + SPC_WIDTH + CH_OFFSET]+pixelp[i+SYNC_WIDTH + SPC_WIDTH + CH_OFFSET])/3.0; falsecolor(v, t, &r, &g, &b); diff --git a/version.h b/version.h index 29ca605..51c49f7 100644 --- a/version.h +++ b/version.h @@ -1,2 +1,2 @@ -const char version[]="Atpdec 1.6 (c) 2004 Thierry Leconte F4DWV"; +const char version[]="Atpdec 1.7 (c) 2004-2005 Thierry Leconte F4DWV";