Skip to content

Commit

Permalink
Meteosat-11 included. Minimal OpenGL version is 3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
hvanruys committed Feb 1, 2018
1 parent fd5addb commit 4d2ce02
Show file tree
Hide file tree
Showing 12 changed files with 195 additions and 156 deletions.
20 changes: 11 additions & 9 deletions core/avhrrsatellite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ AVHRRSatellite::AVHRRSatellite(QObject *parent, SatelliteList *satl) :
countviirsdnb = 0;
countolciefr = 0;
countolcierr = 0;
countslstr = 0;
countmetopAhrpt = 0;
countmetopBhrpt = 0;
countnoaa19hrpt = 0;
Expand Down Expand Up @@ -1267,7 +1268,7 @@ void AVHRRSatellite::AddSegmentsToListFromUdp(QByteArray thefilepath)
QList<Segment*> *slolcierr = seglolcierr->GetSegmentlistptr();

thefilepath.replace( opts.dirremote.toLatin1(), opts.localdirremote.toLatin1()); // "/media/sdc1/", "/home/hugo/Vol2T/");
qDebug() << "AddSegmentsToListFromUdp : " + QString(thefilepath);
// qDebug() << "AddSegmentsToListFromUdp : " + QString(thefilepath) + " count = " << opts.segmentdirectorylist.count();


if (opts.segmentdirectorylist.count() > 0)
Expand All @@ -1279,6 +1280,7 @@ void AVHRRSatellite::AddSegmentsToListFromUdp(QByteArray thefilepath)
{
if (*itc == "1") //include checked
{
//qDebug() << "*its = " << *its << " AddSegmentsToListFromUdp : " + QString(thefilepath);
if (QString(thefilepath).contains(QString(*its)))
{
QFileInfo fileinfo(thefilepath);
Expand Down Expand Up @@ -1650,7 +1652,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsMetop()
{

QStringList strlist;
strlist << seglmetop->GetDirectoryName() << QString("Metop") << QString("%1").arg(this->countmetop);
strlist << seglmetop->GetDirectoryName() << QString("Metop") << QString("%1").arg(seglmetop->NbrOfSegments());

return strlist;

Expand All @@ -1660,7 +1662,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsNoaa()
{

QStringList strlist;
strlist << seglnoaa->GetDirectoryName() << QString("Noaa") << QString("%1").arg(countnoaa);
strlist << seglnoaa->GetDirectoryName() << QString("Noaa") << QString("%1").arg(seglnoaa->NbrOfSegments());

return strlist;

Expand All @@ -1670,7 +1672,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsHRP()
{

QStringList strlist;
strlist << seglhrp->GetDirectoryName() << QString("HRP") << QString("%1").arg(counthrp);
strlist << seglhrp->GetDirectoryName() << QString("HRP") << QString("%1").arg(seglhrp->NbrOfSegments());

return strlist;

Expand All @@ -1679,7 +1681,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsHRP()
QStringList AVHRRSatellite::GetOverviewSegmentsGAC()
{
QStringList strlist;
strlist << seglgac->GetDirectoryName() << QString("GAC") << QString("%1").arg(countgac);
strlist << seglgac->GetDirectoryName() << QString("GAC") << QString("%1").arg(seglgac->NbrOfSegments());

return strlist;
}
Expand Down Expand Up @@ -1728,7 +1730,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsVIIRSM()
{

QStringList strlist;
strlist << seglviirsm->GetDirectoryName() << QString("VIIRSM") << QString("%1").arg(countviirsm);
strlist << seglviirsm->GetDirectoryName() << QString("VIIRSM") << QString("%1").arg(seglviirsm->NbrOfSegments());

return strlist;

Expand All @@ -1738,7 +1740,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsVIIRSDNB()
{

QStringList strlist;
strlist << seglviirsdnb->GetDirectoryName() << QString("VIIRSDNB") << QString("%1").arg(countviirsdnb);
strlist << seglviirsdnb->GetDirectoryName() << QString("VIIRSDNB") << QString("%1").arg(seglviirsdnb->NbrOfSegments());

return strlist;

Expand All @@ -1748,7 +1750,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsOLCIefr()
{

QStringList strlist;
strlist << seglolciefr->GetDirectoryName() << QString("OLCI EFR") << QString("%1").arg(countolciefr);
strlist << seglolciefr->GetDirectoryName() << QString("OLCI EFR") << QString("%1").arg(seglolciefr->NbrOfSegments());

return strlist;

Expand All @@ -1758,7 +1760,7 @@ QStringList AVHRRSatellite::GetOverviewSegmentsOLCIerr()
{

QStringList strlist;
strlist << seglolcierr->GetDirectoryName() << QString("OLCI ERR") << QString("%1").arg(countolcierr);
strlist << seglolcierr->GetDirectoryName() << QString("OLCI ERR") << QString("%1").arg(seglolcierr->NbrOfSegments());

return strlist;

Expand Down
2 changes: 1 addition & 1 deletion core/core.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CONFIG += static
CONFIG += c++11
DEFINES += LIBARCHIVE_STATIC
DEFINES += HDF5_DISABLE_VERSION_CHECK=1
DEFINES += OPENGL32
DEFINES += OPENGL30

SOURCES += main.cpp \
mainwindow.cpp \
Expand Down
12 changes: 6 additions & 6 deletions core/formimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1482,12 +1482,12 @@ void FormImage::slotcomposefinished(QString kindofimage)
sl = segs->getActiveSegmentList();


// if(sl->getGeoSatellite() == eGeoSatellite::H8)
// {
// EnhanceDarkSpace(sl->getGeoSatelliteIndex());
// imageLabel->setPixmap(QPixmap::fromImage( *(imageptrs->ptrimageGeostationary)));
// refreshoverlay = true;
// }
if(sl->getGeoSatellite() == eGeoSatellite::H8)
{
EnhanceDarkSpace(sl->getGeoSatelliteIndex());
imageLabel->setPixmap(QPixmap::fromImage( *(imageptrs->ptrimageGeostationary)));
refreshoverlay = true;
}

if(opts.imageontextureOnMet)
{
Expand Down
3 changes: 2 additions & 1 deletion core/formtoolbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,8 @@ bool FormToolbox::checkSegmentDateTime()
void FormToolbox::on_btnHRV_clicked()
{

checkSegmentDateTime();
if(!checkSegmentDateTime())
return;
QApplication::setOverrideCursor(Qt::WaitCursor); // restore in FormImage::slotUpdateGeosat()

ui->pbProgress->reset();
Expand Down
4 changes: 2 additions & 2 deletions core/formtoolbox.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>3</number>
<number>4</number>
</property>
<property name="tabBarAutoHide">
<bool>false</bool>
Expand Down Expand Up @@ -2196,7 +2196,7 @@
<item>
<widget class="QTabWidget" name="tabWidgetSentinel">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabOLCI">
<attribute name="title">
Expand Down
2 changes: 1 addition & 1 deletion core/generalverticalperspective.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void GeneralVerticalPerspective::CreateMapFromGeoStationary()
}

}
else if(sl->getGeoSatellite() == eGeoSatellite::MET_11 || sl->getGeoSatellite() == eGeoSatellite::MET_10)
else if(sl->getGeoSatellite() == eGeoSatellite::MET_11 || sl->getGeoSatellite() == eGeoSatellite::MET_10 || sl->getGeoSatellite() == eGeoSatellite::MET_8)
{
if( row < (sl->areatype == 0 ? 5*464 : 11136))
{
Expand Down
8 changes: 4 additions & 4 deletions core/globe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void Globe::initializeGL()
geometries->initSphereGeometry(1.0f, 128, 64);

gshhsdata->initializegshhsData(&programgshhs);
//skybox = new SkyBox(&programskybox);
//soc = new Soc(&programdraw);
skybox = new SkyBox(&programskybox);
soc = new Soc(&programdraw);
satgl = new SatGL(&programsatgl, sats, segs);
segmentgl = new SegmentGL(&programdraw, sats, segs);
octa = new Octahedron(&programdraw);
Expand Down Expand Up @@ -564,7 +564,7 @@ void Globe::paintGL()
QMatrix4x4 rotmatrix;
rotmatrix.rotate(quat);
//*************************************************
// skybox->render(projection, rotmatrix);
skybox->render(projection, rotmatrix);

QVector3D sunPosition;

Expand Down Expand Up @@ -680,7 +680,7 @@ void Globe::paintGL()
if(bBorders)
gshhsdata->render(projection, modelview, bBorders);

//soc->render(projection, modelview);
soc->render(projection, modelview);

if(opts.stationnameOn)
renderStations(projection, modelview, QColor(255, 255, 0));
Expand Down
49 changes: 27 additions & 22 deletions core/globe.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@
#include <QOpenGLWidget>
#include <QOpenGLTexture>
#include <QOpenGLShaderProgram>
#include <QOpenGLFunctions>
// Minimum OpenGL version = 3.2

// Minimum OpenGL version = 3.0
// for glGenVertexArrays glBindVertexArray

//#ifdef OPENGL32
//#include <QOpenGLFunctions_3_0>
//#endif
//#ifdef OPENGL40
//#include <QOpenGLFunctions_4_0_Core>
//#endif
//#ifdef OPENGL43
//#include <QOpenGLFunctions_4_3_Core>
//#endif
#ifdef OPENGL30
#include <QOpenGLFunctions_3_0>
#endif
#ifdef OPENGL40
#include <QOpenGLFunctions_4_0_Core>
#endif
#ifdef OPENGL43
#include <QOpenGLFunctions_4_3_Core>
#endif
#ifdef OPENGLES
#include <QOpenGLFunctions>
#endif

#include "trackball.h"
#include "globals.h"
Expand All @@ -32,16 +35,18 @@
#include "projextentsgl.h"
#include "texturewriter.h"

//#ifdef OPENGL32
//class Globe : public QOpenGLWidget, protected QOpenGLFunctions_3_0
//#endif
//#ifdef OPENGL40
//class Globe : public QOpenGLWidget, protected QOpenGLFunctions_4_0_Core
//#endif
//#ifdef OPENGL43
//class Globe : public QOpenGLWidget, protected QOpenGLFunctions_4_3_Core
//#endif
#ifdef OPENGL30
class Globe : public QOpenGLWidget, protected QOpenGLFunctions_3_0
#endif
#ifdef OPENGL40
class Globe : public QOpenGLWidget, protected QOpenGLFunctions_4_0_Core
#endif
#ifdef OPENGL43
class Globe : public QOpenGLWidget, protected QOpenGLFunctions_4_3_Core
#endif
#ifdef OPENGLES
class Globe : public QOpenGLWidget, protected QOpenGLFunctions
#endif
{

Q_OBJECT
Expand Down Expand Up @@ -149,8 +154,8 @@ private slots:

GeometryEngine *geometries;
GeometryEngine *sun;
//SkyBox *skybox;
//Soc *soc;
SkyBox *skybox;
Soc *soc;
SatGL *satgl;
SegmentGL *segmentgl;
Octahedron *octa;
Expand Down
Loading

0 comments on commit 4d2ce02

Please sign in to comment.