#include "Level1Data.h" #include "fortranfunctions.h" #include "sofiefov.h" #include #include #include extern "C" void calc_sim_exo ( int* nblk, int* iblk, double* exolock , double *simexo, int* fovflag) { // Exo lock is the angle down from the top edge of the sun Radians + is further down (Earthward) // fov off_sets is the FOV offset relative to a particular band. std::vector fovdat,fovpos; int numfov=0; std::vector elevSldc = ::gLevel1Data.ScanElev(); int numsol = (int)elevSldc.size(); for(int i = 0; i < *nblk; ++i) { if( *fovflag) { fovpos = ::gFOVdata.get_fov_elev( iblk[i] ) ; fovdat = ::gFOVdata.get_fov_response(iblk[i] ); /* for(int i = 0; i< fovpos.size() ; ++i) std::cout << fovpos[i] << " " << fovdat[i] << std::endl; exit(23); */ // convert from Arcmin to radians std::transform(fovpos.begin(),fovpos.end(),fovpos.begin(), std::bind2nd( std::multiplies(), M_PI/(60.*180.) ) ); assert( fovpos.size() == fovdat.size() ); numfov = (int)fovpos.size(); } else { numfov=0; } std::vector sldc = ::gLevel1Data.ScanData(iblk[i] ); assert(sldc.size() == elevSldc.size()) ; ::calc_simexo__(&fovdat[0], &fovpos[0], &numfov, &sldc[0], &elevSldc[0], &numsol, exolock, &simexo[i] ); } }