Skip to content

How to get Beacon Distance #38

@Miteshmakwana73

Description

@Miteshmakwana73

what is the formula of getting distance

i found this function but i don't understand mManagedBeacon.getDistance() get distance getting value

public String getDistance() {
        return BeaconUtil.getRoundedDistanceString(mManagedBeacon.getDistance());
    }

is it work on rssi value and masurpower or other?

Please provide the formula of getting distance like this

fun Int.getDistance(txPower: Int): Double {
    return Math.pow(10.0, ((Math.abs(this) - Math.abs(txPower)) / (10 * 2)).toDouble())
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions