ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: lizoom on April 22, 2024, 12:51:11 PM

Title: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: lizoom on April 22, 2024, 12:51:11 PM
I have been using ExifTool for some time now with a number of Pentax DSLR cameras (K10; K7; K5II; K3) and use the additional information to analyze accidental shots. I am currently using the Pentax K3III. In the Pentax K3III, Pentax revised the camera software.

When using ExifTool with files from the Pentax K3III I noticed that some tags show incorrect values:
BodyBatteryVoltage1; BodyBatteryVoltage2; RollAngle; PitchAngle; SensorTemperature.

Here is an example:
version of exiftool:12.83
version of Gui for exiftool:5.16
system type: Windows 10

Pentax ModelID: K-3 Mark III
DSPFirmwareVersion:2.13.10.25
RawDevelopmentProcess: 20 (K-3III)

Tags with incorrect values:
BodyBatteryVoltage1: 13.80 V (typical is 7.2 V)
BodyBatteryVoltage2: 28.72 V
RollAngle: 0
PitchAngle: 0
SensorTemperature: 2983.9 C

Tags with apparently correct values for comparison
SensorTemperature2: 30.5 C
CameraTemperature: 20 C

A bug report was also written some time ago by "kypfer" about the display of incorrect values for RollAngle and PitchAngle
https://exiftool.org/forum/index.php?topic=13742.0

The Pentax K3III users would certainly be happy if this could be fixed.
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on April 22, 2024, 01:14:08 PM
Could you send me a few samples at various pitch and roll angles so I can take a look?  My email is philharvey66 at gmail.com

- Phil
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: lizoom on April 23, 2024, 10:47:24 AM
I have sent you the required files by e-mail.

-lizoom
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on April 23, 2024, 01:56:19 PM
Great, thanks.  I've been able to decode these angles from your samples.

Unfortunately I didn't find the samples in my junk mailbox until after I did the ExifTool 12.84 release, so the K-3III PitchAngle and RollAngle will be decoded in version 12.85.

- Phil
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: lizoom on April 27, 2024, 09:23:48 AM
Thanks, that's great. :)
Could you also fix the problem with the wrong values for the tags "BodyBatteryVoltage" and "BodyBatteryVoltage"?

-lizoom
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on April 27, 2024, 09:42:37 AM
I will need some samples to be able to decode this.  Can you send me a few samples at known battery levels from nearly empty to full?  My email is philharvey66 at gmail.com

- Phil
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: lizoom on April 29, 2024, 10:17:15 AM
In the last few days I have carried out a systematic (I hope) series of tests with different battery voltages in the possible battery constellations.
I have just sent you an email with the resulting pictures.

I have also tried to create images of the "SensorTemperature" for the incorrect values mentioned above.
But the test with an infrared thermometer does not provide reasonable results.

-lizoom

Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on April 29, 2024, 03:42:01 PM
I'll look at the files when I get a chance.

For sensor temperature, it is sometimes sufficient to look at a long series of closely-spaced images to look for a number that increases slowly.

- Phil
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on April 29, 2024, 06:17:45 PM
Also, I should mention that another set of pitch/roll images in portrait orientation would probably be helpful because I think it may be different in this orientation.

- Phil
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: lizoom on May 03, 2024, 12:03:34 PM
Thanks for your reply to roll/pitch. I have created a new series of tests with different Roll/Pitch Values in Landscape and Portrait. I have just sent 2 emails about this.

-lizoom
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on May 03, 2024, 03:42:21 PM
I got them, thanks.  I'll analyze them before the next release (may be a while, it's migration season now and I'm out most days birding).

- Phil
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on May 09, 2024, 03:09:10 PM
I've been staring at the voltage data and haven't made much headway.  I'll have to take a break for now, but here is the table I've made showing the BatteryInfo raw hex value and the battery conditions for each series:

Byte number:
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2                                       Power  Body        Grip
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2                                       Source Battery     Battery
------------------------------------------------------------------------------------------------------------
315305640bae0b4f000000000000000005640c460b4200    20240427_K33P0373.JPG    Series_1 Body   Discharging Full
314b05640aa20a17000000000000000005640bff0b3b00    20240427_K33P0378.JPG    Series_1
315304500a5a09ea000000000000000005640b9f0b1c00    20240427_K33P0388.JPG    Series_1
3147033c09d10946000000000000000005640bff0b3b00    20240427_K33P0392.JPG    Series_1
315405640b0c0aa2000000000000000005640bbb0b3400    20240428_K33P0419.JPG    Series_1
315405640b750b10000000000000000005640bbd0b3c00    20240428_K33P0426.JPG    Series_1
315405640a840a26000000000000000005640bd60b5100    20240428_K33P0430.JPG    Series_1
31420228097d0934000000000000000005640c260b8500    20240428_K33P0438.JPG    Series_1
325305640baa0b45000000000000000005640c460b4000    20240427_K33P0374.JPG    Series_2 Grip   Discharging Full
325505640ad00a45000000000000000005640bba0af600    20240427_K33P0379.JPG    Series_2
324804500a2b09ce000000000000000005640bde0b4500    20240427_K33P0389.JPG    Series_2
3245022809d00979000000000000000005640c060b6a00    20240427_K33P0393.JPG    Series_2
324d05640ae00a82000000000000000005640c240b7c00    20240428_K33P0420.JPG    Series_2
325005640b4e0af4000000000000000005640c210b8800    20240428_K33P0427.JPG    Series_2
324904500a5f0a09000000000000000005640c2f0b9300    20240428_K33P0431.JPG    Series_2
32420228095d0913000000000000000005640c2c0b8b00    20240428_K33P0439.JPG    Series_2
314b05640be20b72000000000000000005640a920a0100    20240427_K33P0380.JPG    Series_3 Body   Full        Discharging
314905640bc60b5e000000000000000004500a3209be00    20240427_K33P0390.JPG    Series_3
315305640bab0b200000000000000000033c0a12094e00    20240427_K33P0394.JPG    Series_3
314e05640c0e0b97000000000000000005640aec0a6d00    20240428_K33P0421.JPG    Series_3
315105640c0b0b9e000000000000000005640b550ace00    20240428_K33P0428.JPG    Series_3
314a05640c150ba2000000000000000004500a5609ca00    20240428_K33P0432.JPG    Series_3
315305640bdd0b790000000000000000033c09b1092100    20240428_K33P0440.JPG    Series_3
325205640b9c0b36000000000000000005640af80a3300    20240427_K33P0381.JPG    Series_4 Grip   Full        Discharging
325205640b8f0b2f000000000000000005640a6b09e000    20240427_K33P0391.JPG    Series_4
324805640be40b590000000000000000022809d4091000    20240427_K33P0395.JPG    Series_4
325305640bb40b4e000000000000000005640b230a8900    20240428_K33P0422.JPG    Series_4
325305640bab0b4a000000000000000005640b8c0af600    20240428_K33P0429.JPG    Series_4
325305640bc00b5a000000000000000005640a9909e800    20240428_K33P0433.JPG    Series_4
325305640bb00b4e0000000000000000022809b5092d00    20240428_K33P0441.JPG    Series_4
1145022809bb095a000000000000000000000778002600    20240427_K33P0400.JPG    Series_5 Body   Discharging No Grip
1148033c0a2009950000000000000000000007b606f200    20240428_K33P0402.JPG    Series_5
110004500a5109f50000000000000000000007d1002800    20240428_K33P0405.JPG    Series_5
110005640bf20b850000000000000000000008ff002d00    20240428_K33P0408.JPG    Series_5
110005640ab80a5f000000000000000000000820002900    20240428_K33P0411.JPG    Series_5
110005640afe0a9d000000000000000000000854002a00    20240428_K33P0414.JPG    Series_5
110005640b590aee000000000000000000000894002b00    20240428_K33P0423.JPG    Series_5
11430228096b090a00000000000000000000072f002400    20240428_K33P0434.JPG    Series_5
2245000a07db07500000000000000000022809ba08f600    20240427_K33P0399.JPG    Series_6 Grip   Missing     Discharging
2248000a081107860000000000000000033c0a12094e00    20240428_K33P0403.JPG    Series_6
2200000a0841002c000000000000000004500a5409d200    20240428_K33P0407.JPG    Series_6
2200000a09860030000000000000000005640bfb0b6500    20240428_K33P0409.JPG    Series_6
2200000a0894002d000000000000000005640ac00a3800    20240428_K33P0412.JPG    Series_6
2200000a08c7002d000000000000000005640b000a6a00    20240428_K33P0415.JPG    Series_6
2200000a0919002f000000000000000005640b630ac900    20240428_K33P0424.JPG    Series_6
2200000a07a4002800000000000000000228098b090b00    20240428_K33P0435.JPG    Series_6
1145022809bc093100000000000000000000076b06a700    20240427_K33P0401.JPG    Series_7 Body   Discharging No Battery
110004500a2809d20000000000000000000007b5002800    20240428_K33P0404.JPG    Series_7
114904500a4c09e50000000000000000000007d5002800    20240428_K33P0406.JPG    Series_7
110005640bec0b8a000000000000000000000904002d00    20240428_K33P0410.JPG    Series_7
110005640ab60a53000000000000000000000822002800    20240428_K33P0413.JPG    Series_7
110005640af10a8500000000000000000000084e002a00    20240428_K33P0416.JPG    Series_7
110005640b560aed000000000000000000000894002b00    20240428_K33P0425.JPG    Series_7
110002280980093600000000000000000000073c002500    20240428_K33P0436.JPG    Series_7
945c05640b130a94000000000000000000000cdf002a00    20240429_K33P0442.JPG    Series_8 External Yes       No Grip
845b00640035ffaa000000000000000000000ccc0c0800    20240429_K33P0443.JPG    Series_8 External Missing   No Grip
845c00640038ffad000000000000000000000cd80c1400    20240429_K33P0444.JPG    Series_8 External Missing   No Battery

The body battery corresponds with the 2 bytes at offset 02, and the grip battery at offset 16 -- these values are near zero when the corresponding battery is missing, and 0x0564 when the battery is full.  But I am confused because the numbers don't decrease in any reasonable fashion through a discharging series.

- Phil
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: lizoom on May 14, 2024, 02:36:28 PM
Hi Phil,

Thanks for the interim result on battery voltage.
I have tried to read the information from the HEX code.
The values have been split up as 8-bit values and also as 16-bit values. I tried to interpret the results in a meaningful way.
This was done with the use of Excel. I have sent you the file by e-mail.

-Peter
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on June 11, 2024, 02:27:49 PM
Hi Peter,

Bird migration is season is basically over, so I can get back to this...

I've taken a look at the portrait orientation images you sent.  The PitchAngle and RollAngle seem to work well for these.  There is only one unknown I can see that we might easily decode: Pentax_LevelInfoK3III_0x0001 -- I'm thinking this is probably LevelOrientation, but I only have 3 values so far: 0=Horizontal, 3=Rotate 90 CW, 4=Upwards (I think).  It would be interesting to see what the values are for Rotate 180, Rotate 270 CW, and Downwards.

As for the battery levels.  Thanks for all your work on this.  I'm fitting the voltages with the formula: value * 4e-8 + 0.27219.  I don't know where the 0.27219 comes from, but I'm happy with the nice, round multiplier.  This gives an R-squared of .9767 for the entire data set of varying voltages (combined for all body and grip series).  It took me a few hours, but here is what I have so far:

> exiftool Series* -csv -power'*' -'*battery*'
SourceFile,PowerSource,PowerAvailable,BodyBatteryState,BodyBatteryPercent,BodyBatteryVoltage,GripBatteryState,GripBatteryPercent,GripBatteryVoltage
Series_1/20240427_K33P0373.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.11 V,Full,100,8.51 V
Series_1/20240427_K33P0378.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,7.41 V,Full,100,8.32 V
Series_1/20240427_K33P0388.JPG,Body Battery,"Body Battery, Grip Battery",Close to Full,80,7.22 V,Full,100,8.07 V
Series_1/20240427_K33P0392.JPG,Body Battery,"Body Battery, Grip Battery",Half Full,60,6.86 V,Full,100,8.32 V
Series_1/20240428_K33P0419.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,7.69 V,Full,100,8.14 V
Series_1/20240428_K33P0426.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,7.96 V,Full,100,8.15 V
Series_1/20240428_K33P0430.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,7.33 V,Full,100,8.22 V
Series_1/20240428_K33P0438.JPG,Body Battery,"Body Battery, Grip Battery",Running Low,40,6.64 V,Full,100,8.42 V
Series_2/20240427_K33P0374.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.10 V,Full,100,8.51 V
Series_2/20240427_K33P0379.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,7.53 V,Full,100,8.14 V
Series_2/20240427_K33P0389.JPG,Grip Battery,"Body Battery, Grip Battery",Close to Full,80,7.10 V,Full,100,8.24 V
Series_2/20240427_K33P0393.JPG,Grip Battery,"Body Battery, Grip Battery",Running Low,40,6.86 V,Full,100,8.34 V
Series_2/20240428_K33P0420.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,7.57 V,Full,100,8.42 V
Series_2/20240428_K33P0427.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,7.86 V,Full,100,8.41 V
Series_2/20240428_K33P0431.JPG,Grip Battery,"Body Battery, Grip Battery",Close to Full,80,7.23 V,Full,100,8.45 V
Series_2/20240428_K33P0439.JPG,Grip Battery,"Body Battery, Grip Battery",Running Low,40,6.56 V,Full,100,8.44 V
Series_3/20240427_K33P0380.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.25 V,Full,100,7.37 V
Series_3/20240427_K33P0390.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.17 V,Close to Full,80,7.11 V
Series_3/20240427_K33P0394.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.10 V,Half Full,60,7.03 V
Series_3/20240428_K33P0421.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.36 V,Full,100,7.60 V
Series_3/20240428_K33P0428.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.35 V,Full,100,7.88 V
Series_3/20240428_K33P0432.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.38 V,Close to Full,80,7.21 V
Series_3/20240428_K33P0440.JPG,Body Battery,"Body Battery, Grip Battery",Full,100,8.23 V,Half Full,60,6.78 V
Series_4/20240427_K33P0381.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.06 V,Full,100,7.63 V
Series_4/20240427_K33P0391.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.03 V,Full,100,7.26 V
Series_4/20240427_K33P0395.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.25 V,Running Low,40,6.87 V
Series_4/20240428_K33P0422.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.13 V,Full,100,7.75 V
Series_4/20240428_K33P0429.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.10 V,Full,100,8.02 V
Series_4/20240428_K33P0433.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.16 V,Full,100,7.38 V
Series_4/20240428_K33P0441.JPG,Grip Battery,"Body Battery, Grip Battery",Full,100,8.12 V,Running Low,40,6.79 V
Series_5/20240427_K33P0400.JPG,Body Battery,Body Battery,Running Low,40,6.80 V,Empty or Missing,0,5.28 V
Series_5/20240428_K33P0402.JPG,Body Battery,Body Battery,Half Full,60,7.07 V,Empty or Missing,0,5.45 V
Series_5/20240428_K33P0405.JPG,Body Battery,Body Battery,Close to Full,80,7.20 V,Empty or Missing,0,5.52 V
Series_5/20240428_K33P0408.JPG,Body Battery,Body Battery,Full,100,8.29 V,Empty or Missing,0,6.31 V
Series_5/20240428_K33P0411.JPG,Body Battery,Body Battery,Full,100,7.47 V,Empty or Missing,0,5.72 V
Series_5/20240428_K33P0414.JPG,Body Battery,Body Battery,Full,100,7.65 V,Empty or Missing,0,5.86 V
Series_5/20240428_K33P0423.JPG,Body Battery,Body Battery,Full,100,7.89 V,Empty or Missing,0,6.03 V
Series_5/20240428_K33P0434.JPG,Body Battery,Body Battery,Running Low,40,6.59 V,Empty or Missing,0,5.09 V
Series_6/20240427_K33P0399.JPG,Grip Battery,Grip Battery,Empty or Missing,10,5.54 V,Running Low,40,6.80 V
Series_6/20240428_K33P0403.JPG,Grip Battery,Grip Battery,Empty or Missing,10,5.69 V,Half Full,60,7.03 V
Series_6/20240428_K33P0407.JPG,Grip Battery,Grip Battery,Empty or Missing,10,5.81 V,Close to Full,80,7.20 V
Series_6/20240428_K33P0409.JPG,Grip Battery,Grip Battery,Empty or Missing,10,6.66 V,Full,100,8.31 V
Series_6/20240428_K33P0412.JPG,Grip Battery,Grip Battery,Empty or Missing,10,6.03 V,Full,100,7.49 V
Series_6/20240428_K33P0415.JPG,Grip Battery,Grip Battery,Empty or Missing,10,6.16 V,Full,100,7.65 V
Series_6/20240428_K33P0424.JPG,Grip Battery,Grip Battery,Empty or Missing,10,6.38 V,Full,100,7.91 V
Series_6/20240428_K33P0435.JPG,Grip Battery,Grip Battery,Empty or Missing,10,5.40 V,Running Low,40,6.68 V
Series_7/20240427_K33P0401.JPG,Body Battery,Body Battery,Running Low,40,6.80 V,Empty or Missing,0,5.25 V
Series_7/20240428_K33P0404.JPG,Body Battery,Body Battery,Close to Full,80,7.09 V,Empty or Missing,0,5.44 V
Series_7/20240428_K33P0406.JPG,Body Battery,Body Battery,Close to Full,80,7.18 V,Empty or Missing,0,5.53 V
Series_7/20240428_K33P0410.JPG,Body Battery,Body Battery,Full,100,8.27 V,Empty or Missing,0,6.32 V
Series_7/20240428_K33P0413.JPG,Body Battery,Body Battery,Full,100,7.46 V,Empty or Missing,0,5.73 V
Series_7/20240428_K33P0416.JPG,Body Battery,Body Battery,Full,100,7.61 V,Empty or Missing,0,5.85 V
Series_7/20240428_K33P0425.JPG,Body Battery,Body Battery,Full,100,7.88 V,Empty or Missing,0,6.03 V
Series_7/20240428_K33P0436.JPG,Body Battery,Body Battery,Running Low,40,6.65 V,Empty or Missing,0,5.13 V
Series_8/20240429_K33P0442.JPG,External Power Supply,"Body Battery, External Power Supply",Full,100,7.70 V,Empty or Missing,0,8.91 V
Series_8/20240429_K33P0443.JPG,External Power Supply,External Power Supply,Empty or Missing,100,0.41 V,Empty or Missing,0,8.86 V
Series_8/20240429_K33P0444.JPG,External Power Supply,External Power Supply,Empty or Missing,100,0.42 V,Empty or Missing,0,8.89 V
    8 directories scanned
   57 image files read

I'm happy with this progress, and ExifTool 12.87 will extract this new information.

- Phil

Edit: ExifTool 12.87 is now available.
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: lizoom on June 15, 2024, 10:02:02 AM
Hi Phil,

that's great.
I tried version 12.87 and it looks good. I have created more images to further investigate the unclear data on your assumption about Pentax_LevelInfoK3III_0x0001.
I will send you the files by email.

-Peter
Title: Re: Pentax K3III - BodyBatteryVoltage - RollAngle -PitchAngle - SensorTemperature
Post by: Phil Harvey on June 18, 2024, 08:05:48 AM
Hi Peter,

Excellent, thanks!  I think this fully decodes Pentax_LevelInfoK3III_0x0001, which I will call CameraOrientation.  The values are:

          0 => 'Horizontal (normal)',
          1 => 'Rotate 270 CW',
          2 => 'Rotate 180',
          3 => 'Rotate 90 CW',
          4 => 'Upwards', # (to the sky)
          5 => 'Downwards', # (to the ground)

- Phil