Skip to content

Commit

Permalink
filenbr can be more than two characters in MTG-I1
Browse files Browse the repository at this point in the history
  • Loading branch information
hvanruys committed Dec 20, 2023
1 parent 52c4a90 commit 76d69a5
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 25 deletions.
4 changes: 2 additions & 2 deletions core/formgeostationary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ void FormGeostationary::CreateGeoImagenetCDFMTG(SegmentListGeostationary *sl, QS
// 012345678901234567890
//====> tex = "2017-09-20 11:00;66"
QDate now(tex.mid(0, 4).toInt(), tex.mid(5, 2).toInt(), tex.mid(8, 2).toInt());
int filenbr = tex.mid(17, 2).toInt();
int filenbr = tex.mid(17).toInt();

//0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Expand All @@ -1185,7 +1185,7 @@ void FormGeostationary::CreateGeoImagenetCDFMTG(SegmentListGeostationary *sl, QS

if(type == "VIS_IR" || type == "VIS_IR Color")
{
llVIS_IR = this->getGeostationarySegmentsMTGAlt(geoindex, type, sl->getImagePath(), filenbr);
llVIS_IR = this->getGeostationarySegmentsMTG(geoindex, type, sl->getImagePath(), filenbr);
qDebug() << QString("llVIS_IR count = %1").arg(llVIS_IR.count());
if(llVIS_IR.count() == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions core/formimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ void FormImage::drawOverlays(QPainter *painter)
}

if(slgeo->getGeoSatellite() == eGeoSatellite::H9)
this->OverlayGeostationaryH8(painter, slgeo);
this->OverlayGeostationaryH9(painter, slgeo);
else
this->OverlayGeostationary(painter, slgeo);
}
Expand Down Expand Up @@ -2366,7 +2366,7 @@ void FormImage::OverlayGeostationaryHRV(QPainter *paint, SegmentListGeostationar
//this->update();
}

void FormImage::OverlayGeostationaryH8(QPainter *paint, SegmentListGeostationary *sl)
void FormImage::OverlayGeostationaryH9(QPainter *paint, SegmentListGeostationary *sl)
{

long coff;
Expand Down
2 changes: 1 addition & 1 deletion core/formimage.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class FormImage : public QGraphicsView
void OverlayGeostationary(QPainter *paint, SegmentListGeostationary *sl);
void OverlayGeostationaryHRV(QPainter *paint, SegmentListGeostationary *sl, int geoindex);
void OverlayGeostationaryHRV1(QPainter *paint, SegmentListGeostationary *sl, int geoindex);
void OverlayGeostationaryH8(QPainter *paint, SegmentListGeostationary *sl);
void OverlayGeostationaryH9(QPainter *paint, SegmentListGeostationary *sl);
void OverlayProjection(QPainter *paint);
void OverlayOLCI(QPainter *paint);
void DrawLongLat(QPainter *paint, SegmentListGeostationary *sl, int coff, int loff,
Expand Down
4 changes: 2 additions & 2 deletions core/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,8 +1503,8 @@ void Options::CreateGeoSatelliteIni()
<< "12.3" << "13.3";

//E1B-TPG-1 E1H-TPG-2
geosatellites[10].fullname = "Himawari 8";
geosatellites[10].shortname = "H8";
geosatellites[10].fullname = "Himawari 9";
geosatellites[10].shortname = "H9";
geosatellites[10].longitude = 140.7;
geosatellites[10].longitudelimit1 = 92.0;
geosatellites[10].longitudelimit2 = 250.0;
Expand Down
8 changes: 4 additions & 4 deletions core/pixgeoconversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ const double LFAC_NONHRV_GOES16 = 1474382050.*1.5; /* scaling coefficient
const double CFAC_NONHRV_MTSAT = 586315045.; /* scaling coefficients (see note above) */
const double LFAC_NONHRV_MTSAT = 586315045.; /* scaling coefficients (see note above) */

const double CFAC_NONHRV_H8 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */
const double LFAC_NONHRV_H8 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */
const double CFAC_NONHRV_H9 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */
const double LFAC_NONHRV_H9 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */

const long COFF_NONHRV = 1856; /* scaling coefficients (see note above) */
const long LOFF_NONHRV = 1856; /* scaling coefficients (see note above) */
Expand All @@ -74,8 +74,8 @@ const long LOFF_NONHRV_GOES = 1408; /* scaling coefficients (see
const long COFF_NONHRV_GOES16 = 5424; /* scaling coefficients (see note above) */
const long LOFF_NONHRV_GOES16 = 5424; /* scaling coefficients (see note above) */

const long COFF_NONHRV_H8 = 2750; /* scaling coefficients (see note above) */
const long LOFF_NONHRV_H8 = 2750; /* scaling coefficients (see note above) */
const long COFF_NONHRV_H9 = 2750; /* scaling coefficients (see note above) */
const long LOFF_NONHRV_H9 = 2750; /* scaling coefficients (see note above) */

enum SCAN_GEOMETRIES {
GOES,
Expand Down
2 changes: 1 addition & 1 deletion core/poi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void Poi::Initialize()

strlComboGeo1 = POIsettings.value("/GeoConfig/strlComboGeo1").value<QStringList>();

// MET_11, MET_10, MET_9, MET_8, GOMS2, FY2H, FY2G, GOES_15, GOES_16, GOES_17, H8
// MET_11, MET_10, MET_9, MET_8, GOMS2, FY2H, FY2G, GOES_15, GOES_16, GOES_17, H9
if(strlComboGeo1.count() != opts.geosatellites.count())
{
strlComboGeo1.clear();
Expand Down
36 changes: 28 additions & 8 deletions core/segmentlistgeostationary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void SegmentListGeostationary::setGeoSatellite(int geoindex)
{
this->m_GeoSatellite = eGeoSatellite::GOES_17;
}
else if(str_GeoSatellite == "H8")
else if(str_GeoSatellite == "H9")
{
this->m_GeoSatellite = eGeoSatellite::H9;
}
Expand Down Expand Up @@ -2154,8 +2154,13 @@ void SegmentListGeostationary::ComposeSegmentImageXRITMSGInThreadConcurrent()
{
if(kindofimage == "VIS_IR" || kindofimage == "VIS_IR Color")
{
auto callbackMethod = std::bind(this->concurrentReadFilelistHimawari, this, std::placeholders::_1);
QtConcurrent::blockingMap(this->segmentfilelist, callbackMethod);
for(int i = 0; i < this->segmentfilelist.size(); i++)
{
this->concurrentReadFilelistHimawari(this, this->segmentfilelist.at(i));
}

// auto callbackMethod = std::bind(this->concurrentReadFilelistHimawari, this, std::placeholders::_1);
// QtConcurrent::blockingMap(this->segmentfilelist, callbackMethod);

emit this->progressCounter(50);

Expand All @@ -2172,18 +2177,33 @@ void SegmentListGeostationary::ComposeSegmentImageXRITMSGInThreadConcurrent()
}
else
{
auto callbackMethod = std::bind(this->concurrentReadFilelist, this, std::placeholders::_1);

if(kindofimage == "VIS_IR" || kindofimage == "VIS_IR Color" || kindofimage == "HRV Color")
{
QtConcurrent::blockingMap(this->segmentfilelist, callbackMethod);
for(int i = 0; i < this->segmentfilelist.size(); i++)
{
this->concurrentReadFilelist(this, this->segmentfilelist.at(i));
}
}

if(kindofimage == "HRV" || kindofimage == "HRV Color")
{
QtConcurrent::blockingMap(this->segmentfilelisthrv, callbackMethod);
for(int i = 0; i < this->segmentfilelisthrv.size(); i++)
{
this->concurrentReadFilelist(this, this->segmentfilelisthrv.at(i));
}
}

// auto callbackMethod = std::bind(this->concurrentReadFilelist, this, std::placeholders::_1);

// if(kindofimage == "VIS_IR" || kindofimage == "VIS_IR Color" || kindofimage == "HRV Color")
// {
// QtConcurrent::blockingMap(this->segmentfilelist, callbackMethod);
// }

// if(kindofimage == "HRV" || kindofimage == "HRV Color")
// {
// QtConcurrent::blockingMap(this->segmentfilelisthrv, callbackMethod);
// }

emit this->progressCounter(50);

if(kindofimage == "HRV" || kindofimage == "HRV Color")
Expand Down
2 changes: 1 addition & 1 deletion video/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ enum class eGeoSatellite {
GOES_15 = 7,
GOES_16 = 8,
GOES_17 = 9,
H8 = 10,
H9 = 10,
NOGEO = 11
};

Expand Down
8 changes: 4 additions & 4 deletions video/pixgeoconversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ const double LFAC_NONHRV_GOES16 = 1474382050.*1.5; /* scaling coefficient
const double CFAC_NONHRV_MTSAT = 586315045.; /* scaling coefficients (see note above) */
const double LFAC_NONHRV_MTSAT = 586315045.; /* scaling coefficients (see note above) */

const double CFAC_NONHRV_H8 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */
const double LFAC_NONHRV_H8 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */
const double CFAC_NONHRV_H9 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */
const double LFAC_NONHRV_H9 = 1172050000.; //20466275.; /* scaling coefficients (see note above) */

const long COFF_NONHRV = 1856; /* scaling coefficients (see note above) */
const long LOFF_NONHRV = 1856; /* scaling coefficients (see note above) */
Expand All @@ -74,8 +74,8 @@ const long LOFF_NONHRV_GOES = 1408; /* scaling coefficients (see
const long COFF_NONHRV_GOES16 = 5424; /* scaling coefficients (see note above) */
const long LOFF_NONHRV_GOES16 = 5424; /* scaling coefficients (see note above) */

const long COFF_NONHRV_H8 = 2750; /* scaling coefficients (see note above) */
const long LOFF_NONHRV_H8 = 2750; /* scaling coefficients (see note above) */
const long COFF_NONHRV_H9 = 2750; /* scaling coefficients (see note above) */
const long LOFF_NONHRV_H9 = 2750; /* scaling coefficients (see note above) */

enum SCAN_GEOMETRIES {
GOES,
Expand Down

0 comments on commit 76d69a5

Please sign in to comment.