#pragma once
#include <iostream>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <time.h>
#include <string>
#include <omp.h>
#include <gdal.h>
#include <gdal_priv.h>
#include <gdalwarper.h>
#include <ogrsf_frmts.h>
#include <fstream>
#include <vector>
#include <string>
#include <QString>
#include <QStringList>
#include <set>
#include <map>
#include "BaseConstVariable.h"

#include "LogInfoCls.h"


struct SigmaParam {
	double p1;
	double p2;
	double p3;
	double p4;
	double p5;
	double p6;
};


double getSigma(double& theta, SigmaParam& param);



class SigmaDatabase
{
public:
	SigmaDatabase();
	~SigmaDatabase();

public:
	/// <summary>
	/// 
	/// </summary>
	/// <param name="cls"></param>
	/// <param name="angle">弧度值</param>
	/// <returns></returns>
	double getAmpHH(long cls, double angle);
	/// <summary>
	/// 
	/// </summary>
	/// <param name="cls"></param>
	/// <param name="angle">弧度值</param>
	/// <returns></returns>
	double getAmpHV(long cls, double angle);
	/// <summary>
	/// 
	/// </summary>
	/// <param name="cls"></param>
	/// <param name="angle">弧度值</param>
	/// <returns></returns>
	double getAmpVH(long cls, double angle);
	/// <summary>
	/// 
	/// </summary>
	/// <param name="cls"></param>
	/// <param name="angle">弧度值</param>
	/// <returns></returns>
	double getAmpVV(long cls, double angle);


	double getAmp(long cls, double angle, POLARTYPEENUM polartype);

	std::map<long, SigmaParam> getsigmaParams( POLARTYPEENUM polartype);
private:
	std::map<long, SigmaParam> HH_sigmaParam;
	std::map<long, SigmaParam> HV_sigmaParam;
	std::map<long, SigmaParam> VH_sigmaParam;
	std::map<long, SigmaParam> VV_sigmaParam;


};

