"The Trouble with Tango" - Drift Edition.

I was going to post some of this as a reply to +Anastasia Tondera , but it's a topic worthy of discussion in its own right. It comes up often enough.
It's not really a Stack Overflow question, and shouldn't be handled in private emails. I'd like to do it here. I think it's the right forum.
This is intended to start a discussion.

Tango drifts. Way more than it should. Many All of us in the community have been dealing with this for months.

Why?

Here's what I know:

The Inertial Measurement Unit has a software problem.

The original Tango device (the "Peanut" phone) used an InvenSense MPU-9150 "9-axis" sensor, which combines gyroscope, accelerometer and compass with a "Digital Motion Processor". See here:
https://www.ifixit.com/Teardown/Project+Tango+Teardown/23835#s62013

InvenSense do not recommend using this part any more. See here:
http://www.invensense.com/products/motion-tracking/9-axis/

The "Yellowstone" Project Tango Developer Kit tablet has a lot in common with the NVIDIA SHIELD tablet (they share a common ancestor - the NVIDIA Tegra Logan "Ardbeg" Development Kit). However, it does not use the same IMU.
The SHIELD tablet uses the InvenSense MPU-6050 "6-axis" gyroscope and accelerometer. See here:
https://www.ifixit.com/Teardown/Nvidia+Shield+Teardown/16212#s50875

The SHIELD tablet has had problems with its IMU which were fixed in software updates - but this is a distraction. I have noted what comes before in order to exclude them from the discussion. Yellowstone does not use an InvenSense component. It does not appear to have a dedicated IMU.

Yellowstone contains a Broadcom BCM4752 GNSS receiver, specifically identified as the BCM4752IUB2G. See here:
https://www.ifixit.com/Teardown/Project+Tango+Tablet+Teardown/28148#s68082

The BCM4752 is the "GPS" component, but this second-generation sensor integrates accelerometer, gyroscope, magnetometer and altimeter as well. See here:
https://www.broadcom.com/products/GPS/GPS-Silicon-Solutions/BCM4752

So this is the Yellowstone IMU.

It can be shown that Yellowstone's magnetometer supplies bad data. The compass does not work. In fact, it exhibits a "drifting" behavior. This can be demonstrated most simply using the free app GPS Status which can be downloaded here:
https://play.google.com/store/apps/details?id=com.eclipsim.gpsstatus2&hl=en

+Patrick Hollenbeck started a discussion 9 months ago about this, and the situation has not changed since. See here:
https://plus.google.com/116077058656392979858/posts/WBw1D1G9tGD

+Benjamin Pelletier posted a video demonstrating the issue, and in the discussion it emerged that Google support have said:
1) it is a software problem
2) it will not be fixed soon
See here:
https://plus.google.com/113985424588632264482/posts/LwvkYYotoPd

I have spoken with many NVIDIA staff who were involved in the design and production of Yellowstone, about this and other problems such as using USB 3.0 peripherals via the dock.
With respect to USB 3.0 in particular I have been told by responsible parties in Japan that NVIDIA verified the correct operation of the hardware, and I expect this is the case for the BCM4752 as well.
They also pointed out to me that with respect to Yellowstone, Google are the product vendor and should be the ones supporting their customers. I am very grateful to everybody I have spoken with at NVIDIA for their generosity with their time.
I am quite sure that this is a software problem and, as referenced above, Google have acknowledged it as such.

This is not a Tango software issue. It is an Android OS issue. Apps such as GPS Status are not using Tango Core at all.

Tango Core is built on top of Android and presumably gets the same data from the sensors as any other software.
The same bad data.

Some amount of drift is to be expected, and this is exactly what Area Learning is intended to address. However, I think the runaway conditions we've all experienced are out of scope.
It might also be said that the magnetometer is not important to Project Tango, and that it is the only aspect of the BCM4752 which is not performing as advertised.

I believe knowing the direction the device is facing in the world is an important data point for the use cases that Project Tango is specifically designed for.
I also believe it is possible the drift appearing at the BCM4752 magnetometer outputs can appear at its other outputs.
I believe it is possible it contributes to the drift we experience when Motion Tracking.

I believe this is worth addressing promptly.

So what shall we do? Shall we wait 9 more months?
Should we accept that Yellowstone "will not be fixed soon" and continue to prototype software with our Developer Kits - hopeful of demonstrating our work without looking foolish when we can get our hands on the upcoming Qualcomm device?

I'm not terribly excited by either of those options.
Are there any others?

Maybe.

Yellowstone shipped with Android 4.4.2 ("KitKat") and although the Tango Core receives regular Over The Air updates, the Android OS has never been updated.
This may also mean that Yellowstone is vulnerable to widely exploited security attack vectors, such as the Chromium WebView component and poisoned MMS payloads.
That's something to think about. I'd like to know if there's an OS update in our future (this year?) to Lollipop or even M. Will it fix the compass?
There's more than enough reasons to get some clarity about the software roadmap for the Project Tango device outside of Tango Core. The device is beginning to roll out internationally.

Assuming an OS update isn't happening any time soon, what can we do as a community to investigate this? Or failing that, what can I do about it?

The HTC Nexus 9 also uses the Broadcom BCM4752, and I have not seen any reports of issues with the compass. See here:
https://www.ifixit.com/Teardown/Nexus+9+Teardown/31425#s73321

The Nexus 9 ships with Android OS 5 ("Lollipop") and appears to include working drivers for the BCM4752. It's also using Tegra K1, like Yellowstone.
I don't know how much of an effort it would take to get the driver working on Yellowstone. I could find out, but it will take time.
I don't have the source code for the Broadcom driver. I don't know if it's open source. I could find out, but I don't have time.
It's taken me a long time just to write this all down. If the driver isn't open source it will take me a longer time to make it work.

I don't know whether Yellowstone's going to be stuck at API Level 19 for the rest of its life, and whether I should take all my patches, sort this as well, and roll a new ROM.
Or whether an update's coming for Christmas - or tomorrow - that would make it a waste of effort.
I think this is important enough that I might try and make the time, but I can't make any promises.

There's another option as well, but it seems like a long shot:
Conceivably, Google could do it.
Shared publiclyView activity