/* geostat.h */ /* Copyright (C) 2006 Icare - http://www.icare.univ-lille1.fr Fabrice Ducos, fabrice.ducos@icare.univ-lille1.fr This program is a free software; you can redistribute it and/or modify it under the terms of the CeCILL Public License as published by www.cecill.info (License version 2 or later). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL Public License for more details. You should have received a copy of the CeCILL Public License along with this program; if not, please contact www.cecill.info If you have any questions or concerns regarding this program, please email to problem@icare.univ-lille1.fr For general information about the ICARE Project, please email to icare-contact@univ-lille.fr */ #ifndef _GEOSTAT_H #define _GEOSTAT_H #ifdef __cplusplus extern "C" { #endif typedef enum channel_enum { GEOSTAT_CHNL_IR = 1, GEOSTAT_CHNL_VIS = 2, GEOSTAT_CHNL_WV = 3 } channel_t; typedef enum geostat_err_enum { GEOSTAT_ERR_OK = 0, GEOSTAT_ERR_OUT_OF_RANGE = -1, GEOSTAT_ERR_BAD_INIT = -2, GEOSTAT_ERR_BAD_INPUT_COORD = -3 } geostat_err_t; geostat_err_t geostat_init(const char *satellite); geostat_err_t geostat_latlon_to_rowcol_double( double latitude, double longitude, double *row, double *column); geostat_err_t geostat_rowcol_to_latlon_double( double row, double column, double *latitude, double *longitude); geostat_err_t geostat_latlon_to_rowcol( const double latitude, const double longitude, unsigned long *row, unsigned long *column); geostat_err_t geostat_rowcol_to_latlon( const unsigned long row, const unsigned long column, double *latitude, double *longitude); geostat_err_t geostat_get_azimuth_and_zenithal( const double latitude, const double longitude, double *azimuth, double *zenithal); /* * These are old names for the previous functions. They are defined only for backward * compatibility purpose but should not be called in any new code. * They should be defined as inline functions in order to avoid call overload, but * this would limit their portability (inline is a C99 standard) */ geostat_err_t geostat_latlon_to_lincol_double( double latitude, double longitude, double *line, double *column); geostat_err_t geostat_lincol_to_latlon_double( double line, double column, double *latitude, double *longitude); geostat_err_t geostat_latlon_to_lincol( const double latitude, const double longitude, unsigned long *line, unsigned long *column); geostat_err_t geostat_lincol_to_latlon( const unsigned long line, const unsigned long column, double *latitude, double *longitude); geostat_err_t geostat_get_azimut_and_zenithal( const double latitude, const double longitude, double *azimut, double *zenithal); #ifdef __cplusplus } #endif #endif /* __GEOSTAT_H__ */