Closed chrissearle closed 8 years ago
Second report - http://pastebin.com/GBR35eBT
Three i1s that won't reset because the yaw is not changing when we ask it to. But the users are saying that it is pointing towards craft forwards.
Is it possible that the gimbal yaw value is being sent relative to heading rather than relative to nose?
We should confirm that these users are on the latest firmware. The yaw value should be relative to the nose of the aircraft. From the SDK header file:
DJIGimbalState "The current gimbal attitude in degrees. Roll, pitch and yaw are 0 if the gimbal is level with the aircraft and points in the forward direction of the aircraft."
It's odd - the logs show very clearly that the yaw value is not changing at all.
Feel free to ask in FB - I've asked - but not got a response yet.
DJIGimbalDelegate is here
https://github.com/dbaldwin/DronePan/blob/master/DronePan/GimbalController.swift#L316-L324
It's being called - but for some inspire's the yaw value is fixed - doesn't change.
More reports from inspire users including i1 pro too now. They say that they can see the gimbal is pointing forwards but the value in the DJIGimbalState is fixed (and nearly always negative in each error report so far). It simply doesn't change.
This is only observed in 3.1 - haven't had a release to testers of 3.1.1 and not observable in 3.2 until #55 (DJIGimbalDelegate method not called) is fixed.
I changed the title to include include the P4. This commit fixes the delegate issue in SDK 3.2:
https://github.com/dbaldwin/DronePan/commit/185a901eeafaa6792309ddac55226b603babe235
and my P4 yaw value is not anywhere near zero even though the gimbal is pointed straight forward in the direction of the nose. See attached.
From DJI:
"I think for the Inspire 1 and Phantom 4, we now use the Ground System North as the 0 for the Yaw. ( Relative to the Nose). I think for our documentation about the GimbalState, we need to make some adjustment."
I don't understand the DJI response.
And surely the gimbal attitude should remain relative to nose without any other values? The aircraft heading changes - but not the gimbal yaw attitude relative to the aircraft. This feels like a regression.
So far it looks like:
This is hard to test - since in the simulator - that gimbal yaw figure is relative to the physical aircraft yaw of the unit being tested as it sits on the bench - not relative to the simulated aircraft yaw (which is what we are seeing from the flight controller delegate.
Still not sure what the correct fix is here.
I've added code to tell the gimbal controller what the aircraft yaw is.
Then - in check where we log what yaw is wanted and what the current yaw is - it also logs what the current AC yaw is.
We can then collect a set of logs - and compare - is it as simple as removing the ac yaw from current yaw for the P4 and I1?
Do you need some testing on this? If so let me know what you need. I have inspire, p4 and osmo
@mjerris when this beta goes to Testflight we'll definitely want help testing. Any and all testing is welcome since this issue has been plaguing us for a while.
Check this log - http://pastebin.com/PdSaXZpJ
We set a yaw but it never moves.
Wonder if we need to check gimbal work mode - possible values:
We can set with
gimbal setGimbalWorkMode:withCompletion: