Skip to main content
. 2019 Feb 22;19(4):921. doi: 10.3390/s19040921
Algorithm 1 The LRS algorithm.
  • Require: 

    lw1, lw2, Precisionmax;

  • Ensure: 

    LRS;

  • 1:

    geoLogw1, geoLatw1, geoLogw2, geoLatw2← Calculate GeoHash binary code based on latitude and longitude;

  • 2:

    geow1, geow2← Combine geoLogw1, geoLatw1, geoLogw2, geoLatw2 with 2 strings according to the principle of “even bit longitude, odd bit latitude";

  • 3:

    Basew1, Basew2← Process geow1, geow2 according to the rules of base32 encoding;

  • 4:

    Basecon← Calculate the same string starting from the first digit of the two strings;

  • 5:

    LRS← By Equation (9);

  • 6:

    returnLRS;