Skip to content

Commit

Permalink
Solved some bugs in the display of MERSI images.
Browse files Browse the repository at this point in the history
Added the Oblique Mercator projection for VIIRS M, MERSI and Metop
images.
  • Loading branch information
hvanruys committed Nov 22, 2020
1 parent ef2e149 commit 5c529e4
Show file tree
Hide file tree
Showing 38 changed files with 3,418 additions and 858 deletions.
12 changes: 7 additions & 5 deletions core/avhrrsatellite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,13 @@ void AVHRRSatellite::AddSegmentsToList(QFileInfoList fileinfolist)
}
else
delete segslstr;
} else if (fileInfo.fileName().mid( 0, 4) == "FY3D" && fileInfo.fileName().mid(40, 5) == "1000M")
} else if (fileInfo.fileName().mid( 0, 4) == "FY3D" && (fileInfo.fileName().mid(39, 5) == "1000M" || fileInfo.fileName().mid(40, 5) == "1000M"))
{
//012345678901234567890123456789012345678901234567890
//0 1 2 3 4 5 6 7 8 9 10
//FY3D_20200113_113000_113100_11206_MERSI_1000M_L1B.HDF
//FY3D_20200113_113000_113100_11206_MERSI_GEO1K_L1B.HDF
//FY3D_20191007_193900_194000_9821_MERSI_1000M_L1B.HDF
seglmersi->SetDirectoryName(fileInfo.absolutePath());
segmersi = new SegmentMERSI(fileInfo, satlist);
if(segmersi->segmentok == true)
Expand Down Expand Up @@ -709,8 +710,8 @@ void AVHRRSatellite::ReadDirectories(QDate seldate, int hoursbefore)
qDebug() << QString("fileinfolist.size = %1 in subdir %2").arg(fileinfolist.size()).arg(thepathYYYYMMDD);
}

// for(int i= 0; i < fileinfolist.size(); i++)
// qDebug() << "list = " << fileinfolist.at(i).absoluteFilePath();
for(int i= 0; i < fileinfolist.size(); i++)
qDebug() << "list = " << fileinfolist.at(i).absoluteFilePath();

QMap<QString, QFileInfo> map;

Expand Down Expand Up @@ -820,8 +821,8 @@ void AVHRRSatellite::ReadDirectories(QDate seldate, int hoursbefore)


fileinfolist = map.values();
// for(int i = 0; i < fileinfolist.count(); i++)
// qDebug() << "map values = " << fileinfolist.at(i).absoluteFilePath();
for(int i = 0; i < fileinfolist.count(); i++)
qDebug() << "map values = " << fileinfolist.at(i).absoluteFilePath();

emit signalResetProgressbar(fileinfolist.size(), (*its));

Expand Down Expand Up @@ -1205,6 +1206,7 @@ void AVHRRSatellite::InsertToMap(QFileInfoList fileinfolist, QMap<QString, QFile
//FY3D_20200113_113000_113100_11206_MERSI_GEO1K_L1B.HDF
else if (fileinfo.fileName().mid( 0, 4) == "FY3D")
{

*fy3dTle = true;
QDate d(fileinfo.fileName().mid( 5, 4).toInt(), fileinfo.fileName().mid( 9, 2).toInt(), fileinfo.fileName().mid( 11, 2).toInt());
filedate.setDate(d);
Expand Down
2 changes: 2 additions & 0 deletions core/core.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ DEFINES += OPENGL30

SOURCES += main.cpp \
mainwindow.cpp \
obliquemercator.cpp \
options.cpp \
segmentimage.cpp \
satellite.cpp \
Expand Down Expand Up @@ -94,6 +95,7 @@ SOURCES += main.cpp \
nav_util.cpp

HEADERS += mainwindow.h \
obliquemercator.h \
options.h \
segmentimage.h \
satellite.h \
Expand Down
11 changes: 11 additions & 0 deletions core/dialogpreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,12 +483,23 @@ void DialogPreferences::addVIIRSMConfigRow()
myVIIRSMConfigModel->insertRows(myVIIRSMConfigModel->rowCount(), 1, QModelIndex());
}

void DialogPreferences::addMERSIConfigRow()
{
myMERSIConfigModel->insertRows(myMERSIConfigModel->rowCount(), 1, QModelIndex());
}

void DialogPreferences::deleteVIIRSMConfigRow()
{
int row = ui->tbvVIIRSMConfig->currentIndex().row();
myVIIRSMConfigModel->removeRow(row, QModelIndex());
}

void DialogPreferences::deleteMERSIConfigRow()
{
int row = ui->tbvMERSIConfig->currentIndex().row();
myMERSIConfigModel->removeRow(row, QModelIndex());
}


void DialogPreferences::addGeoConfigRow()
{
Expand Down
3 changes: 3 additions & 0 deletions core/dialogpreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ private slots:
void deleteOLCIefrConfigRow();
void addSLSTRConfigRow();
void deleteSLSTRConfigRow();
void addMERSIConfigRow();
void deleteMERSIConfigRow();


void on_btnLocalDirRemote_clicked();

Expand Down
11 changes: 5 additions & 6 deletions core/formephem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ FormEphem::FormEphem(QWidget *parent, SatelliteList *satlist, AVHRRSatellite *se
{
ui->setupUi(this);

// if(ui->splitter->restoreState( opts.ephemsplittersizes ))
// qDebug() << "splitter ok";
// else
// qDebug() << "splitter not ok";
if(ui->splitter->restoreState( opts.ephemsplittersizes ))
qDebug() << "splitter ok";
else
qDebug() << "splitter not ok";


sats = satlist;
Expand Down Expand Up @@ -190,8 +190,7 @@ void FormEphem::on_btnDel_clicked()
if ( (*it1)->isSelected() )
{
if( (*it1)->parent() )
QMessageBox::information( this, "QtTrack",
"Only Tle files can be removed !" );
QMessageBox::information( this, "QtTrack", "Only Tle files can be removed !" );
else
sel = (*it1)->text( 0 );
break;
Expand Down
Loading

0 comments on commit 5c529e4

Please sign in to comment.