// // C++ Interface: observation // // Description: represents a satellite observation : a viewed earth pixel and the viewing direction // // // Author: Nicolas PASCAL using namespace std; /** * @class Observation a satellite observation : a viewed earth pixel and its viewing geometry */ class Observation { public: /** observed earth pixel latitude */ float lat; /** observed earth pixel longitude */ float lon; /** observed earth pixel altitude in m */ float alt; /** observation timestamp (TAI93 time in seconds) */ double time; /** indices of the pixel in the data buffer */ vector idata; /** grid indices of the pixel (for non gridded data, same as idata) */ vector igrid; /** viewing direction */ Carthesian::Segment3D viewing; /** * @brief constructor * @param lat observed earth pixel latitude * @param lon observed earth pixel longitude * @param alt observed earth pixel altitude in m * @param time observation timestamp (TAI93 time in seconds) * @param idata indices of the pixel in the data buffer * @param igrid grid indices of the pixel (for non gridded data, same as idata) * @param viewing viewing direction */ Observation (const float lat = -9999., const float lon = -9999., const float alt = -9999., const double time = -9999., const vector & idata = vector (0), const vector & igrid = vector (0), const Carthesian::Segment3D &viewing = Carthesian::Segment3D(0)); Observation (const Observation & obj); ~Observation ( ) {;}; Observation & operator = (const Observation & obj); /** * @brief general setter * @param lat observed earth pixel latitude * @param lon observed earth pixel longitude * @param alt observed earth pixel altitude in m * @param time observation timestamp (TAI93 time in seconds) * @param idata indices of the pixel in the data buffer * @param igrid grid indices of the pixel (for non gridded data, same as idata) * @param viewing viewing direction */ void set (const float lat, const float lon, const float alt, const double time, const vector & idata, const vector & igrid, const Carthesian::Segment3D &viewing); /** * @brief content printer * @param os output flux * @param obj current oject alias * @return the content description added to the output flux */ friend std::ostream &operator<< (std::ostream &os, const Observation & obj) { os << "Observation : (" << obj.lat << "," << obj.lon << "," << obj.alt << ") " << obj.time << " "; os << "igrid " << MyTools::vec2str(obj.igrid) << " idata " << MyTools::vec2str(obj.idata) << endl; os << "-> " << obj.viewing; return os; }; }; #endif