I don't see how fixing this on ofono layer requires any changes; we only
have to modify the mapping.

Android code itself defines 5 discrete strengths:
 - SIGNAL_STRENGTH_GREAT
 - SIGNAL_STRENGTH_GOOD
 - SIGNAL_STRENGTH_MODERATE
 - SIGNAL_STRENGTH_POOR
 - SIGNAL_STRENGTH_NONE_OR_UNKNOWN


We can map those (how ever they are calculated) to the linear and evenly 
distributed range of [0..100].

As an example:

   int asu = getGsmSignalStrength();

  // 0-20% - SIGNAL_STRENGTH_NONE_OR_UNKNOWN
  if (asu == 99)
    level = 0;
  else if (asu == 0)
    level = 6;
  else if (asu == 1)
    level = 12;
  else if (asu == 2)
    level = 18;

  // 20-40% - SIGNAL_STRENGTH_POOR 
  else if (asu == 3)
    level = 25;
  else if (asu = 4)
    level = 35;

  // 40-60% - SIGNAL_STRENGTH_MODERATE
  else if (asu = 5)
    level = 46;
  else if (asu = 6)
    level = 52;
  else if (asu = 7)
    level = 58;

  // 60-80% SIGNAL_STRENGTH_GOOD
  else if (asu = 8)
    level = 60;
  else if (asu = 9)
    level = 65;
  else if (asu = 10)
    level = 70;
  else if (asu = 11)
    level = 75;

  // 80-100% - SIGNAL_STRENGTH_GREAT
  else if (asu >= 12)
    level = 80 + 20*(1 - (31-asu)/19.0);

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1329945

Title:
  WWAN signal strength is reported lower than android in same location

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-network/+bug/1329945/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to