#include "WindInverstorDialog.h"
#include <QtWidgets/QApplication>
#include <QString>
#include "WindInverseFunction.h"
#include <stdlib.h>
#include <iostream>
#include <QDebug>
int main(int argc, char *argv[])
{


	if (argc>1&& std::strcmp(argv[1], "-nogui") == 0) {
		QString in_wind_dir_path= argv[2];
		QString in_inc_angle_path = argv[3];
		QString in_sar_sigma0_path = argv[4];
		QString out_wind_speed_path = argv[5];
		qDebug() << "in_wind_dir_path     = " << in_wind_dir_path;
		qDebug() << "in_inc_angle_path    = " << in_inc_angle_path;
		qDebug() << "in_sar_sigma0_path   = " << in_sar_sigma0_path;
		qDebug() << "out_wind_speed_path  = " << out_wind_speed_path;

		windSpeedInversionProcess(in_wind_dir_path,
			in_inc_angle_path,
			in_sar_sigma0_path,
			out_wind_speed_path);
		qDebug() << "finished!!!" ;
	}
	else {
		QApplication app(argc, argv);
		WindInverstorDialog window;
		window.show();
		return app.exec();

	}
}
