diff --git a/src/apt.h b/src/apt.h index 2478e9e..a7998e5 100644 --- a/src/apt.h +++ b/src/apt.h @@ -81,7 +81,6 @@ typedef int (*apt_getsamples_t)(void *context, float *samples, int count); typedef struct { float *prow[APT_MAX_HEIGHT]; // Row buffers int nrow; // Number of rows - int zenith; // Row in image where satellite reaches peak elevation apt_channel_t chA, chB; // ID of each channel char name[256]; // Stripped filename char *palette; // Filename of palette diff --git a/src/dsp.c b/src/dsp.c index 0bac94e..5821095 100755 --- a/src/dsp.c +++ b/src/dsp.c @@ -159,7 +159,6 @@ int apt_getpixelrow(float *pixelv, int nrow, int *zenith, int reset, apt_getsamp static size_t npv; static int synced = 0; static float max = 0.0; - static float minDoppler = 1000000000, previous = 0; if(reset) synced = 0; @@ -183,14 +182,6 @@ int apt_getpixelrow(float *pixelv, int nrow, int *zenith, int reset, apt_getsamp corr = convolve(&pixelv[1], sync_pattern, SYNC_PATTERN_SIZE - 1); lcorr = convolve(&pixelv[2], sync_pattern, SYNC_PATTERN_SIZE - 2); FreqLine = 1.0+((ecorr-lcorr) / corr / APT_IMG_WIDTH / 4.0); - - float val = fabs(lcorr - ecorr)*0.25 + previous*0.75; - if(val < minDoppler && nrow > 10){ - minDoppler = val; - *zenith = nrow; - } - previous = fabs(lcorr - ecorr); - // The point in which the pixel offset is recalculated if (corr < 0.75 * max) { synced = 0; diff --git a/src/main.c b/src/main.c index 51d91a4..0701c5a 100644 --- a/src/main.c +++ b/src/main.c @@ -172,7 +172,7 @@ static int processAudio(char *filename, options_t *opts){ img.prow[img.nrow] = (float *) malloc(sizeof(float) * APT_PROW_WIDTH); // Write into memory and break the loop when there are no more samples to read - if (apt_getpixelrow(img.prow[img.nrow], img.nrow, &img.zenith, (img.nrow == 0), getsamples, NULL) == 0) + if (apt_getpixelrow(img.prow[img.nrow], img.nrow, NULL, (img.nrow == 0), getsamples, NULL) == 0) break; if(opts->realtime) pushRow(img.prow[img.nrow], APT_IMG_WIDTH); @@ -197,7 +197,7 @@ static int processAudio(char *filename, options_t *opts){ // Crop noise from start and end of image if(CONTAINS(opts->effects, Crop_Noise)){ - img.zenith -= apt_cropNoise(&img); + apt_cropNoise(&img); } // Denoise