/////////////////////////////////////////////////////////////////////////// // NAME: utility.h // FUNCTION: Headfile for utility functions // DESCRIPTION: Headfile for program utility.cpp // REFERENCE: none // CALLING SEQUENCE: none // INPUTS: none // OUTPUTS: none // DEPENDENCIES: none // RESTRICTIONS: none // HISTORY: none ////////////////////////////////////////////////////////////////////////// #ifndef _UTILITY_H_ #define _UTILITY_H_ #include "mfhdf.h" #include using namespace std; #define STRMAX 256 /* interpolation helper functions */ void locate(float32 x, float32 xt[], int32 nxt, int32& i1, int32& i2, float32& frac); void replaceAll(char *pString, char originChar, char newchar); uint8 Set_QualityFlag_bit(uint8 Flag, uint8 Bit_No); float32 SunGlintAng(float32 SOLZA, float32 SENZA, float32 SOLAZ, float32 SENAZ); float32 ConfidenceLevel_U(float32 test, float32 Threshold); float32 ConfidenceLevel_L(float32 test, float32 Threshold); float32 ConfidenceLevel_M(float32 test, float32 Threshold1, float32 Threshold2); /*************************************/ /*** Rayleigh Scattering Functions ***/ /*************************************/ /** * This function calculate the molecular reflectance for a given * molecular optical thickness, geometry and ABI channel. * * @param MolOD Molecular optical thickness * @param CosSza Cosine of solar zenith angle * @param CosVza Cosine of viewing zenith angle * @param RelAzi Relative azimuth angle * @param Chn ABI channel index * * @return Rayleigh reflectance */ float32 RayRefl(float32 MolOD, float32 CosSza, float32 CosVza, float32 RelAzi, int32 Chn); int findFile(const char *pattern, char *filename1); #endif /*_UTILITY_H_*/