hardware: samsung_slsi: libcamera2: Fix JPEG GPS Coordinates
authorSungjoong Kang <sj3.kang@samsung.com>
Thu, 4 Oct 2012 20:31:13 +0000 (13:31 -0700)
committerAlex Ray <aray@google.com>
Fri, 5 Oct 2012 21:50:09 +0000 (14:50 -0700)
Fixed JPEG GPS Coordinates error due to unit mismatch.

BUG: 7287793
Change-Id: Ie063f21e8a684fe7d5c6e56ca97b907d8fb302a9
Signed-off-by: Sungjoong Kang <sj3.kang@samsung.com>
libcamera2/ExynosCameraHWInterface2.cpp

index 59110ca294b3e2cde15a49017c559b9309131882..91ee23037378144b588681e6331e9a57739d2d8e 100644 (file)
@@ -5873,9 +5873,9 @@ void ExynosCameraHWInterface2::m_setExifChangedAttribute(exif_attribute_t *exifI
         else
             exifInfo->gps_altitude_ref = 1;
 
-        double latitude = fabs(ctl->jpeg.gpsCoordinates[0] / 10000.0);
-        double longitude = fabs(ctl->jpeg.gpsCoordinates[1] / 10000.0);
-        double altitude = fabs(ctl->jpeg.gpsCoordinates[2] / 100.0);
+        double latitude = fabs(ctl->jpeg.gpsCoordinates[0]);
+        double longitude = fabs(ctl->jpeg.gpsCoordinates[1]);
+        double altitude = fabs(ctl->jpeg.gpsCoordinates[2]);
 
         exifInfo->gps_latitude[0].num = (uint32_t)latitude;
         exifInfo->gps_latitude[0].den = 1;
@@ -5909,6 +5909,7 @@ void ExynosCameraHWInterface2::m_setExifChangedAttribute(exif_attribute_t *exifI
         snprintf((char*)exifInfo->gps_datestamp, sizeof(exifInfo->gps_datestamp),
                 "%04d:%02d:%02d", tm_data.tm_year + 1900, tm_data.tm_mon + 1, tm_data.tm_mday);
 
+        memcpy(exifInfo->gps_processing_method, currentEntry->gpsProcessingMethod, 32);
         exifInfo->enableGps = true;
     } else {
         exifInfo->enableGps = false;