parse GPS accuracy
This commit is contained in:
@@ -1013,6 +1013,8 @@ int EXIFInfo::parseFromXMPSegment(const uint8_t* buf, unsigned len) {
|
|||||||
GeoLocation.PitchDegree = Tools::NormD180(GeoLocation.PitchDegree-90.0);
|
GeoLocation.PitchDegree = Tools::NormD180(GeoLocation.PitchDegree-90.0);
|
||||||
}
|
}
|
||||||
document->QueryDoubleAttribute("Camera:Yaw", &GeoLocation.YawDegree);
|
document->QueryDoubleAttribute("Camera:Yaw", &GeoLocation.YawDegree);
|
||||||
|
document->QueryDoubleAttribute("Camera:GPSXYAccuracy", &GeoLocation.AccuracyXY);
|
||||||
|
document->QueryDoubleAttribute("Camera:GPSZAccuracy", &GeoLocation.AccuracyZ);
|
||||||
} else {
|
} else {
|
||||||
// Try parsing the XMP content for DJI info.
|
// Try parsing the XMP content for DJI info.
|
||||||
document->QueryDoubleAttribute("drone-dji:AbsoluteAltitude", &GeoLocation.Altitude);
|
document->QueryDoubleAttribute("drone-dji:AbsoluteAltitude", &GeoLocation.Altitude);
|
||||||
@@ -1147,6 +1149,8 @@ void EXIFInfo::clear() {
|
|||||||
GeoLocation.SpeedX = DBL_MAX;
|
GeoLocation.SpeedX = DBL_MAX;
|
||||||
GeoLocation.SpeedY = DBL_MAX;
|
GeoLocation.SpeedY = DBL_MAX;
|
||||||
GeoLocation.SpeedZ = DBL_MAX;
|
GeoLocation.SpeedZ = DBL_MAX;
|
||||||
|
GeoLocation.AccuracyXY = 0;
|
||||||
|
GeoLocation.AccuracyZ = 0;
|
||||||
GeoLocation.GPSDOP = 0;
|
GeoLocation.GPSDOP = 0;
|
||||||
GeoLocation.GPSDifferential = 0;
|
GeoLocation.GPSDifferential = 0;
|
||||||
GeoLocation.GPSMapDatum = "";
|
GeoLocation.GPSMapDatum = "";
|
||||||
|
|||||||
@@ -275,6 +275,8 @@ public:
|
|||||||
double SpeedX; // Flight speed on X in meters/second
|
double SpeedX; // Flight speed on X in meters/second
|
||||||
double SpeedY; // Flight speed on Y in meters/second
|
double SpeedY; // Flight speed on Y in meters/second
|
||||||
double SpeedZ; // Flight speed on Z in meters/second
|
double SpeedZ; // Flight speed on Z in meters/second
|
||||||
|
double AccuracyXY; // GPS accuracy on XY in meters
|
||||||
|
double AccuracyZ; // GPS accuracy on Z in meters
|
||||||
double GPSDOP; // GPS DOP (data degree of precision)
|
double GPSDOP; // GPS DOP (data degree of precision)
|
||||||
uint16_t GPSDifferential; // Differential correction applied to the GPS receiver (may not exist)
|
uint16_t GPSDifferential; // Differential correction applied to the GPS receiver (may not exist)
|
||||||
// 0: measurement without differential correction
|
// 0: measurement without differential correction
|
||||||
|
|||||||
8
main.cpp
8
main.cpp
@@ -133,10 +133,12 @@ int main(int argc, const char** argv)
|
|||||||
std::cout << "GeoLocation.YawDegree " << imageEXIF.GeoLocation.YawDegree << "\n";
|
std::cout << "GeoLocation.YawDegree " << imageEXIF.GeoLocation.YawDegree << "\n";
|
||||||
}
|
}
|
||||||
if (imageEXIF.GeoLocation.hasSpeed()) {
|
if (imageEXIF.GeoLocation.hasSpeed()) {
|
||||||
std::cout << "GeoLocation.SpeedX " << imageEXIF.GeoLocation.SpeedX << "\n";
|
std::cout << "GeoLocation.SpeedX " << imageEXIF.GeoLocation.SpeedX << " m/s" << "\n";
|
||||||
std::cout << "GeoLocation.SpeedY " << imageEXIF.GeoLocation.SpeedY << "\n";
|
std::cout << "GeoLocation.SpeedY " << imageEXIF.GeoLocation.SpeedY << " m/s" << "\n";
|
||||||
std::cout << "GeoLocation.SpeedZ " << imageEXIF.GeoLocation.SpeedZ << "\n";
|
std::cout << "GeoLocation.SpeedZ " << imageEXIF.GeoLocation.SpeedZ << " m/s" << "\n";
|
||||||
}
|
}
|
||||||
|
if (imageEXIF.GeoLocation.AccuracyXY > 0 || imageEXIF.GeoLocation.AccuracyZ > 0)
|
||||||
|
std::cout << "GeoLocation.GPSAccuracy XY " << imageEXIF.GeoLocation.AccuracyXY << " m" << " Z " << imageEXIF.GeoLocation.AccuracyZ << " m" << "\n";
|
||||||
std::cout << "GeoLocation.GPSDOP " << imageEXIF.GeoLocation.GPSDOP << "\n";
|
std::cout << "GeoLocation.GPSDOP " << imageEXIF.GeoLocation.GPSDOP << "\n";
|
||||||
std::cout << "GeoLocation.GPSDifferential " << imageEXIF.GeoLocation.GPSDifferential << "\n";
|
std::cout << "GeoLocation.GPSDifferential " << imageEXIF.GeoLocation.GPSDifferential << "\n";
|
||||||
if (!imageEXIF.GeoLocation.GPSMapDatum.empty())
|
if (!imageEXIF.GeoLocation.GPSMapDatum.empty())
|
||||||
|
|||||||
Reference in New Issue
Block a user