Commits

Michael Dickens authored 7db69a79cf7
stellarium-devel: update to 20200108-ed6633dd
No tags

science/stellarium/files/patch-fix-gpsd-api.devel.diff

Modified
1 1 --- src/core/StelLocationMgr.cpp.orig
2 2 +++ src/core/StelLocationMgr.cpp
3 -@@ -158,7 +158,11 @@
3 +@@ -131,7 +131,11 @@
4 + // emit queryError("GPSD query: No Fix.");
5 + // return;
6 + // }
7 ++#if GPSD_API_MAJOR_VERSION < 9
8 + if (newdata->online==0.0) // no device?
9 ++#else
10 ++ if (newdata->online.tv_sec == 0 && newdata->online.tv_nsec == 0) // no device?
11 ++#endif
12 + {
13 + // This can happen when unplugging the GPS while running Stellarium,
14 + // or running gpsd with no GPS receiver.
15 +@@ -158,7 +162,11 @@
4 16 //qDebug() << "newdata->online=" << newdata->online;
5 17 qDebug() << "Solution from " << newdata->satellites_used << "out of " << newdata->satellites_visible << " visible Satellites.";
6 18 dop_t dop=newdata->dop;
7 19 +#if GPSD_API_MAJOR_VERSION < 9
8 20 qDebug() << "GPSD data: Long" << newdata->fix.longitude << "Lat" << newdata->fix.latitude << "Alt" << newdata->fix.altitude;
9 21 +#else
10 22 + qDebug() << "GPSD data: Long" << newdata->fix.longitude << "Lat" << newdata->fix.latitude << "Alt" << newdata->fix.altHAE;
11 23 +#endif
12 24 qDebug() << "Dilution of Precision:";
13 25 qDebug() << " - xdop:" << dop.xdop << "ydop:" << dop.ydop;
14 26 qDebug() << " - pdop:" << dop.pdop << "hdop:" << dop.hdop;
15 -@@ -183,7 +187,11 @@
27 +@@ -183,7 +191,11 @@
16 28 }
17 29 else
18 30 {
19 31 +#if GPSD_API_MAJOR_VERSION < 9
20 32 loc.altitude=static_cast<int>(newdata->fix.altitude);
21 33 +#else
22 34 + loc.altitude=static_cast<int>(newdata->fix.altHAE);
23 35 +#endif
24 36 if (verbose)
25 37 {
26 38 qDebug() << "GPSDfix " << fixmode << ": Location" << QString("lat %1, long %2, alt %3").arg(loc.latitude).arg(loc.longitude).arg(loc.altitude);

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut