예제 #1
0
        float ComputeDotPosY(Beacon foundBeacon)
        {
            // Put the dot at the end of the scale when it's further than 6m.
            double x = RegionUtils.ComputeAccuracy(foundBeacon);

            Log.Debug(Tag, "Beacon is approx. {0:N1} metres away", x);
            double distance = Math.Min(x, 6.0);

            return(_startY + (int)(_segmentLength * (distance / 6.0)));
        }
예제 #2
0
 public void Display(Beacon beacon)
 {
     _macTextView.Text           = string.Format("MAC: {0} ({1:N2})", beacon.MacAddress, RegionUtils.ComputeAccuracy(beacon));
     _majorTextView.Text         = string.Format("Major: {0}", beacon.Major);
     _minorTextView.Text         = string.Format("Minor: {0}", beacon.Minor);
     _measuredPowerTextView.Text = string.Format("MPower: {0}", beacon.MeasuredPower);
     _rssiTextView.Text          = string.Format("RSSI: {0}", beacon.Rssi);
 }