25#ifndef __FMI_RADAR_IMAGE__
26#define __FMI_RADAR_IMAGE__
27#define FMI_RADAR_IMAGE_VER "fmi_radar_image\t v2.3\t Jan 2002 (c) Markus.Peura@fmi.fi"
29typedef signed char Dbz;
32#include "fmi_radar_codes.h"
35#define FMI_RADAR_SWEEP_COUNT 20
37extern float fmi_radar_sweep_angles[FMI_RADAR_SWEEP_COUNT];
40#define FMI_RADAR_BIN_DEPTH 500.0
41#define FMI_RADAR_BIN_COUNT 500
44#define EARTH_RADIUS43 (EARTH_RADIUS*4/3)
47extern float fmi_radar_bin_depth;
48void setup_context(
FmiImage * source);
50void dump_sweep_info(
void);
54int abs_dbz_to_byte(Dbz);
55int rel_dbz_to_byte(Dbz);
56int abs_dbz_to_int(Dbz);
57int rel_dbz_to_int(Dbz);
59int byte_to_abs_dbz(Byte);
60int byte_to_rel_dbz(Byte);
62int bin_to_metre(
int bin);
63int metre_to_bin(
int metres);
65int bin_to_altitude(
int sweep_bin,
float sweep_angle);
66int altitude_to_bin(
int metres,
float sweep_angle);
68int sweep_to_ground(
int sweep_bin,
float sweep_angle);
69int ground_to_bin(
int ground_metres,
float sweep_angle);
71int bin_to_bin(
int sweep_bin,
float sweep_angle,
float target_sweep_angle);
73int bin_altitude(
int sweep_bin,
float sweep_angle);
74int altitude_to_altitude(
int altitude,
float sweep_angle);
76void xy_to_polar(
int i,
int j,
int *theta,
int *radius);
81void detect_ground_echo_mingrad(
FmiImage *source,
int ppi_count,
FmiImage *prob,
int intensity_diff,
int half_altitude);
82void detect_ground_echo_minnetgrad(
FmiImage *source,
int ppi_count,
FmiImage *prob,
int intensity_diff,
int half_altitude);
84void detect_emitters(
FmiImage *source,
FmiImage *trace,
int min_intensity,
int min_length);
85void detect_emitters2(
FmiImage *source,
FmiImage *trace,
int min_intensity,
int min_length,
int max_width);
87void detect_emitters2old(
FmiImage *source,
FmiImage *trace,
int min_intensity,
int min_length,
int max_width);
93void enhance_horz_lines2(
FmiImage *trace,
int weight);
94void enhance_vert_lines(
FmiImage *trace,
int weight);
97void initialize_histogram(
FmiImage *source,Histogram histogram,
98 int hrad,
int vrad,
int i,
int j,
int (* hist_func)(Histogram));
102void detect_ships(
FmiImage *source,
FmiImage *prob,
int min_intensity,
int min_area);
107void distance_compensation_mul(
FmiImage *image,
int slope);
108void distance_compensation_div(
FmiImage *image,
int slope);
112void remove_thin_horz_lines(
FmiImage *target,
int min_elevation,
int weight);
113void remove_horz_lines(
FmiImage *target,
int min_length,
int min_elevation,
int weight);
116void detect_insect_band(
FmiImage *source,
FmiImage *prob,
int start_intensity,
int radius,
int weight);
118void detect_biomet(
FmiImage *source,
FmiImage *prob,
int intensity_max,
int intensity_delta,
int altitude_max,
int altitude_delta);
121void detect_sun(
FmiImage *source,
FmiImage *trace,
int min_intensity,
int min_length,
int typical_width);
123void detect_sun2(
FmiImage *source,
FmiImage *trace,
int min_intensity,
int min_length,
int typical_width,
int azimuth,
int elevation);
125void detect_too_warm(
FmiImage *source,
FmiImage *prob,
FmiImage *meteosat,Celsius c50,Celsius c75,
int min_intensity,
int min_size);
127void detect_doppler_anomaly(
FmiImage *source,
FmiImage *target,
int width,
int height,
int threshold);
144int histogram_dominate_anaprop(Histogram h);