Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QLocationUtils Class Reference

#include <qlocationutils_p.h>

+ Collaboration diagram for QLocationUtils:

Public Types

enum  CardinalDirection {
  CardinalN , CardinalE , CardinalS , CardinalW ,
  CardinalNE , CardinalSE , CardinalSW , CardinalNW ,
  CardinalNNE , CardinalENE , CardinalESE , CardinalSSE ,
  CardinalSSW , CardinalWSW , CardinalWNW , CardinalNNW
}
 
enum  NmeaSentence {
  NmeaSentenceInvalid , NmeaSentenceGGA , NmeaSentenceGSA , NmeaSentenceGLL ,
  NmeaSentenceRMC , NmeaSentenceVTG , NmeaSentenceZDA , NmeaSentenceGSV
}
 

Static Public Member Functions

static bool isValidLat (double lat)
 
static bool isValidLong (double lng)
 
static double clipLat (double lat, double clipValue=90.0)
 
static double wrapLong (double lng)
 
static CardinalDirection azimuthToCardinalDirection4 (double azimuth)
 
static CardinalDirection azimuthToCardinalDirection8 (double azimuth)
 
static CardinalDirection azimuthToCardinalDirection16 (double azimuth)
 
static double wrapLongExt (double lng)
 
static double mirrorAzimuthX (double azimuth)
 
static double mirrorAzimuthY (double azimuth)
 
static double radians (double degrees)
 
static double degrees (double radians)
 
static double earthMeanRadius ()
 
static double earthMeanCircumference ()
 
static double mercatorMaxLatitude ()
 
static QGeoCoordinate antipodalPoint (const QGeoCoordinate &p)
 
static double mapLeftLongitude (double centerLongitude)
 
static double mapRightLongitude (double centerLongitude)
 
static void split_double (double input, float *hipart, float *lopart)
 
static qreal metersPerPixel (qreal zoomLevel, const QGeoCoordinate &coordinate)
 
static NmeaSentence getNmeaSentenceType (QByteArrayView bv)
 
static QGeoSatelliteInfo::SatelliteSystem getSatelliteSystem (QByteArrayView bv)
 
static QGeoSatelliteInfo::SatelliteSystem getSatelliteSystemBySatelliteId (int satId)
 
static bool getPosInfoFromNmea (QByteArrayView bv, QGeoPositionInfo *info, double uere, bool *hasFix=nullptr)
 
static QNmeaSatelliteInfoSource::SatelliteInfoParseStatus getSatInfoFromNmea (QByteArrayView bv, QList< QGeoSatelliteInfo > &infos, QGeoSatelliteInfo::SatelliteSystem &system)
 
static QGeoSatelliteInfo::SatelliteSystem getSatInUseFromNmea (QByteArrayView bv, QList< int > &pnrsInUse)
 
static bool hasValidNmeaChecksum (QByteArrayView bv)
 
static bool getNmeaTime (const QByteArray &bytes, QTime *time)
 
static bool getNmeaLatLong (const QByteArray &latString, char latDirection, const QByteArray &lngString, char lngDirection, double *lat, double *lon)
 

Detailed Description

Definition at line 34 of file qlocationutils_p.h.

Member Enumeration Documentation

◆ CardinalDirection

Enumerator
CardinalN 
CardinalE 
CardinalS 
CardinalW 
CardinalNE 
CardinalSE 
CardinalSW 
CardinalNW 
CardinalNNE 
CardinalENE 
CardinalESE 
CardinalSSE 
CardinalSSW 
CardinalWSW 
CardinalWNW 
CardinalNNW 

Definition at line 37 of file qlocationutils_p.h.

◆ NmeaSentence

Enumerator
NmeaSentenceInvalid 
NmeaSentenceGGA 
NmeaSentenceGSA 
NmeaSentenceGLL 
NmeaSentenceRMC 
NmeaSentenceVTG 
NmeaSentenceZDA 
NmeaSentenceGSV 

Definition at line 56 of file qlocationutils_p.h.

Member Function Documentation

◆ antipodalPoint()

static QGeoCoordinate QLocationUtils::antipodalPoint ( const QGeoCoordinate & p)
inlinestatic

Definition at line 209 of file qlocationutils_p.h.

◆ azimuthToCardinalDirection16()

static CardinalDirection QLocationUtils::azimuthToCardinalDirection16 ( double azimuth)
inlinestatic

Definition at line 125 of file qlocationutils_p.h.

◆ azimuthToCardinalDirection4()

static CardinalDirection QLocationUtils::azimuthToCardinalDirection4 ( double azimuth)
inlinestatic

Definition at line 90 of file qlocationutils_p.h.

Referenced by instructionDepart().

+ Here is the caller graph for this function:

◆ azimuthToCardinalDirection8()

static CardinalDirection QLocationUtils::azimuthToCardinalDirection8 ( double azimuth)
inlinestatic

Definition at line 103 of file qlocationutils_p.h.

◆ clipLat()

static double QLocationUtils::clipLat ( double lat,
double clipValue = 90.0 )
inlinestatic

Definition at line 74 of file qlocationutils_p.h.

Referenced by QGeoCirclePrivate::updateBoundingBox().

+ Here is the caller graph for this function:

◆ degrees()

static double QLocationUtils::degrees ( double radians)
inlinestatic

Definition at line 189 of file qlocationutils_p.h.

References qRadiansToDegrees().

Referenced by calculatePeripheralPoints(), QDeclarativeCircleMapItemPrivate::calculatePeripheralPointsGreatCircle(), and QGeoCirclePrivate::updateBoundingBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ earthMeanCircumference()

static double QLocationUtils::earthMeanCircumference ( )
inlinestatic

Definition at line 199 of file qlocationutils_p.h.

References M_PI.

◆ earthMeanRadius()

static double QLocationUtils::earthMeanRadius ( )
inlinestatic

Definition at line 194 of file qlocationutils_p.h.

Referenced by calculatePeripheralPoints(), QDeclarativeCircleMapItemPrivate::calculatePeripheralPointsGreatCircle(), and QGeoCirclePrivate::updateBoundingBox().

+ Here is the caller graph for this function:

◆ getNmeaLatLong()

bool QLocationUtils::getNmeaLatLong ( const QByteArray & latString,
char latDirection,
const QByteArray & lngString,
char lngDirection,
double * lat,
double * lon )
static

Definition at line 540 of file qlocationutils.cpp.

References isValidLat(), isValidLong(), and qlocationutils_nmeaDegreesToDecimal().

Referenced by qlocationutils_readGga(), qlocationutils_readGll(), and qlocationutils_readRmc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNmeaSentenceType()

QLocationUtils::NmeaSentence QLocationUtils::getNmeaSentenceType ( QByteArrayView bv)
static

Definition at line 237 of file qlocationutils.cpp.

References hasValidNmeaChecksum(), NmeaSentenceGGA, NmeaSentenceGLL, NmeaSentenceGSA, NmeaSentenceGSV, NmeaSentenceInvalid, NmeaSentenceRMC, NmeaSentenceVTG, NmeaSentenceZDA, and QByteArrayView::sliced().

Referenced by getPosInfoFromNmea(), getSatInfoFromNmea(), and getSatInUseFromNmea().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNmeaTime()

bool QLocationUtils::getNmeaTime ( const QByteArray & bytes,
QTime * time )
static

Definition at line 526 of file qlocationutils.cpp.

References QString::fromLatin1(), QByteArray::size(), and time.

Referenced by qlocationutils_readGga(), qlocationutils_readGll(), qlocationutils_readRmc(), and qlocationutils_readZda().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPosInfoFromNmea()

bool QLocationUtils::getPosInfoFromNmea ( QByteArrayView bv,
QGeoPositionInfo * info,
double uere,
bool * hasFix = nullptr )
static

Definition at line 322 of file qlocationutils.cpp.

References getNmeaSentenceType(), info, NmeaSentenceGGA, NmeaSentenceGLL, NmeaSentenceGSA, NmeaSentenceInvalid, NmeaSentenceRMC, NmeaSentenceVTG, NmeaSentenceZDA, qlocationutils_readGga(), qlocationutils_readGll(), qlocationutils_readGsa(), qlocationutils_readRmc(), qlocationutils_readVtg(), and qlocationutils_readZda().

Referenced by QNmeaPositionInfoSource::parsePosInfoFromNmeaData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSatelliteSystem()

QGeoSatelliteInfo::SatelliteSystem QLocationUtils::getSatelliteSystem ( QByteArrayView bv)
static

Definition at line 268 of file qlocationutils.cpp.

References QGeoSatelliteInfo::BEIDOU, QGeoSatelliteInfo::GALILEO, QGeoSatelliteInfo::GLONASS, QGeoSatelliteInfo::GPS, hasValidNmeaChecksum(), QGeoSatelliteInfo::Multiple, QGeoSatelliteInfo::QZSS, QByteArrayView::sliced(), and QGeoSatelliteInfo::Undefined.

Referenced by getSatInfoFromNmea(), and getSatInUseFromNmea().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSatelliteSystemBySatelliteId()

QGeoSatelliteInfo::SatelliteSystem QLocationUtils::getSatelliteSystemBySatelliteId ( int satId)
static

Definition at line 302 of file qlocationutils.cpp.

References QGeoSatelliteInfo::BEIDOU, QGeoSatelliteInfo::GALILEO, QGeoSatelliteInfo::GLONASS, QGeoSatelliteInfo::GPS, QGeoSatelliteInfo::QZSS, and QGeoSatelliteInfo::Undefined.

Referenced by getSatInUseFromNmea().

+ Here is the caller graph for this function:

◆ getSatInfoFromNmea()

Definition at line 364 of file qlocationutils.cpp.

References QGeoSatelliteInfo::Azimuth, QGeoSatelliteInfo::Elevation, QByteArray::fromRawData(), QNmeaSatelliteInfoSource::FullyParsed, getNmeaSentenceType(), getSatelliteSystem(), QGeoSatelliteInfo::GLONASS, i, info, NmeaSentenceGSV, QNmeaSatelliteInfoSource::NotParsed, ok, QNmeaSatelliteInfoSource::PartiallyParsed, qMin(), and split().

Referenced by QNmeaSatelliteInfoSource::parseSatelliteInfoFromNmea().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSatInUseFromNmea()

QGeoSatelliteInfo::SatelliteSystem QLocationUtils::getSatInUseFromNmea ( QByteArrayView bv,
QList< int > & pnrsInUse )
static

Definition at line 450 of file qlocationutils.cpp.

References getNmeaSentenceType(), getSatelliteSystem(), getSatelliteSystemBySatelliteId(), QGeoSatelliteInfo::GLONASS, QGeoSatelliteInfo::Multiple, NmeaSentenceGSA, qlocationutils_readGsa(), and QGeoSatelliteInfo::Undefined.

Referenced by QNmeaSatelliteInfoSource::parseSatellitesInUseFromNmea().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasValidNmeaChecksum()

bool QLocationUtils::hasValidNmeaChecksum ( QByteArrayView bv)
static

Definition at line 502 of file qlocationutils.cpp.

References checksum(), i, ok, and QByteArrayView::sliced().

Referenced by getNmeaSentenceType(), and getSatelliteSystem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValidLat()

static bool QLocationUtils::isValidLat ( double lat)
inlinestatic

Definition at line 67 of file qlocationutils_p.h.

Referenced by QGeoCoordinate::QGeoCoordinate(), QGeoCoordinate::QGeoCoordinate(), getNmeaLatLong(), and QGeoCoordinate::type().

+ Here is the caller graph for this function:

◆ isValidLong()

static bool QLocationUtils::isValidLong ( double lng)
inlinestatic

Definition at line 70 of file qlocationutils_p.h.

Referenced by QGeoCoordinate::QGeoCoordinate(), QGeoCoordinate::QGeoCoordinate(), getNmeaLatLong(), and QGeoCoordinate::type().

+ Here is the caller graph for this function:

◆ mapLeftLongitude()

static double QLocationUtils::mapLeftLongitude ( double centerLongitude)
inlinestatic

Definition at line 215 of file qlocationutils_p.h.

References leftOffset.

◆ mapRightLongitude()

static double QLocationUtils::mapRightLongitude ( double centerLongitude)
inlinestatic

Definition at line 221 of file qlocationutils_p.h.

References leftOffset.

◆ mercatorMaxLatitude()

static double QLocationUtils::mercatorMaxLatitude ( )
inlinestatic

Definition at line 204 of file qlocationutils_p.h.

◆ metersPerPixel()

static qreal QLocationUtils::metersPerPixel ( qreal zoomLevel,
const QGeoCoordinate & coordinate )
inlinestatic

Definition at line 233 of file qlocationutils_p.h.

References QGeoCoordinate::latitude.

◆ mirrorAzimuthX()

static double QLocationUtils::mirrorAzimuthX ( double azimuth)
inlinestatic

Definition at line 170 of file qlocationutils_p.h.

◆ mirrorAzimuthY()

static double QLocationUtils::mirrorAzimuthY ( double azimuth)
inlinestatic

Definition at line 178 of file qlocationutils_p.h.

◆ radians()

static double QLocationUtils::radians ( double degrees)
inlinestatic

Definition at line 184 of file qlocationutils_p.h.

References qDegreesToRadians().

Referenced by calculatePeripheralPoints(), QDeclarativeCircleMapItemPrivate::calculatePeripheralPointsGreatCircle(), QGeoCameraTilesPrivate::createFrustum(), QGeoTiledMapScenePrivate::setupCamera(), and QGeoCirclePrivate::updateBoundingBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ split_double()

static void QLocationUtils::split_double ( double input,
float * hipart,
float * lopart )
inlinestatic

Definition at line 226 of file qlocationutils_p.h.

◆ wrapLong()

static double QLocationUtils::wrapLong ( double lng)
inlinestatic

◆ wrapLongExt()

static double QLocationUtils::wrapLongExt ( double lng)
inlinestatic

Definition at line 164 of file qlocationutils_p.h.


The documentation for this class was generated from the following files: