Beacon moving location algorithm in WSN