Duplicate coordinate entry on ever single trigger cam in dataflash log

PROBLEM: Pixhawk2.1 is making double entry for each camera trigger in the dataflash log. This is a real PITA as makes it very hard to goetag images.

This does not seem to be an Arduplane problem. It does not happen with 3DR Pixhawk or even Pixracer. Happens on both Arduplane 3.7.1 Arduplane and 3.8beta4 (even beta5). Very easy for anyone to replicate so I shall not attach log unless you see a reason why I should.

Have tested on 3 differnt pixhawk2.1 units. I asked a friend to test his also, same results. You don’t even need it installed in anything. Just put on current or even beta Arduplane firmware (I never tried copter), then set arming requirement to 0 and arm (just on your table), then go to main screen and right click on map and do a “trigger camera now” actual (aka manually simulate camera trigger). Now download your dataflash log from the Pixhawk and look for cam command line deep inside (see sample picture below). You will find two different entries. NOT GOOD.

We use these entries to geotag the images. When there is no secondary GPS why does it make two entries for each trigger. These one in the picture are with empty co-ordinates as there was not GPS, I just made it on my desk now.

The most curious thing is why I have not seen anyone report this so far? At least a few thousand people must be using pixhawk2.1 by now. Please help us sort this out. I think it might be some weird bug related to secondary GPS possibility or something. I say again, this problem (with same firmware) does not occur on 3rd Pixhawk or Pixrace, so it is not Arduplane bug or not entirely. Also it is from dataflash, so Mission planner is eliminated from the equation also.

I will also post same thing from actual flight, the interesting thing is that the data in the two lines do not match entirely, even though configuration is quite stock and there is only a single GPS on board.

Even though I have emphasized this to be pixhawk2.1 related, here is hoping that some of the very smart brains in here can offer an idea as to what is the reason for this or simply have a workaround that we could use which is not putting the million of lines into excel and making a macro to find and remove duplicates.

This one is an example from a real mission:

Not true for me. Using 3DR Pixhawk and 3.7.1 I get about 1.5 times CAM-messages vs. trigger/pictures. This happend when using the fast ‘Pin 54’ (CAM_FEEDBACK_PIN=53), no duplicate CAM with ‘Pin 53’. Shutter duration set to 1 and using an IR to trigger.

Ok, your are using quite a different method. We always have CAM_FEEDBACK_PIN= -1 (that is disabled).
Normal trigger cable on normal servo output even. No hot shoe feedback at all.
On 3rd pixhawk, we had no such issues and I never saw anyone that did.
Now with pixhawk2.1 all units give the same results. Just duplicating GPS cords for every single trigger command.

Triggering via Mission Planner results in 2 trigger camera commands being sent to the aircraft. I’m 99% sure this is because Mission Planner is supporting an older message, as well as a newer camera trigger message and is unsure which way of triggering is correct. Either way I do know for a fact that this is a problem I’ve seen with MP before, and I don’t encounter with either my own MAVLink GCS, or when allowing the autopilot to trigger the camera.

The AP is triggering the camera. It is mission on AP. I just used the MP to show what is happening.

I mean that the same problem occurred on live mission with the AP triggering the camera via previously uploaded mission.

Do you have a DF log you don’t mind sharing?

sure. sorry, I just saw your message

8 1-1-2000 2-51-32 AM.bin (222.5 KB)

This has a single trigger cam instruction that I did from the Mission planner.
You can see in it (about the middle of the log) the following duplicate entries for a single cam trigger.

BARO, 414877082, 0.4771757, 98862.1, 45.60, 0.2914179, 414876, 0, 24.20371
BAR2, 414877082, 1.791454, 98841.73, 37.55, 0.2914179, 414876, 0, 24.20371
CAM, 414877396, 0, 0, 0, 0, 0.43, 0.43, 0.00, 0.17, 1.45, 165.98
CAM, 414878028, 0, 0, 0, 0, 0.43, 0.43, 0.00, 0.17, 1.45, 165.98
CURR, 414878133, 0.03199885, 0.05895957, 7.078668, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
CUR2, 414878148, 0.02389815, 0.03013184, 3.617609, 0.00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

But to be clear. We have the same thing happen when flying and trigger cam instructions are coming from the AP mission based on Do_Cam_trigger_distance. So has nothing to do with mission planner. Just easy to reproduce.
And the crazy thing is that is seems to have something to do with the hardware as-well. As we don’t get the same thing on 3rd Pixhawk, only pixhawk2.1 (has been verified by multiple parties on pixhawk2.1 and arduplane 3.71 and even 3.8 beta).
Feedback pin is disabled. Trigger is on a single “servo” pin, not even relay.

As stated earlier mission planner is not a valid test for this. It triggers the camera twice, I just validated that behavior here, mission planner triggers it twice, if I trigger with a different GCS it only triggers once. I need to see a flight log or something that isn’t triggered by mission planner.