Go to the documentation of this file.
5 static int (*correct_terrain)(
10 static int (*interp_height)(
const char* demfile,
float *
xlon,
float *
xlat,
float *height);
21 static int firstCall = 1;
27 float *height = &
l1rec->height[ip];
47 fprintf(
stderr,
"-E- %s line %d: "
48 "Elevation file is NULL.\n",
52 printf(
"Loading DEM info from %s\n",
input->demfile);
55 if(Hishdf(
input->demfile))
58 status = nc_open(
input->demfile, NC_NOWRITE, &ncid);
60 netcdf_dem = (
status == NC_NOERR);
61 if (netcdf_dem) nc_close(ncid);
79 fprintf(
stderr,
"-E- %s line %d: interp_height():\n",
82 "xlon=%f xlat=%f height=%f\n",
83 (
double) *
xlon, (
double) *
xlat, (
double) *height);
91 fprintf(
stderr,
"-E- %s line %d: correct_terrain():\n",
94 "xlon=%f xlat=%f senz=%f sena=%f height=%f\n",
96 (
double) *
senz, (
double) *
sena, (
double) *height);
99 float senz_corr = *
senz - senz_sav;
100 int32_t nwave =
l1rec->l1file->nbands, iw;
101 for (iw = 0; iw < nwave; iw++) {
102 l1rec->geom_per_band->senz[ ip * nwave + iw ] += senz_corr;
int interp_nc_height(float *xlon, float *xlat, float *height)
int get_height(l1str *l1rec, int32_t ip, int terrain_corrected)
int interp_dem_height(char *demfile, float *xlon, float *xlat, float *height)
float xlon[LAC_PIXEL_NUM]
int get_dem_height(char *demfile, float *xlon, float *xlat, float *senz, float *sena, float *height)
int get_nc_height(float *xlon, float *xlat, float *senz, float *sena, float *height)