Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. $arrLocation1 = @{"123123123124234" = 1; "4563456345345" = 5; "3453245234234" = 4; "456456345345" = 4}
  2. $arrLocation2 = @{"123123123124234" = 16; "4563456345345" = 1; "3453245234234" = 15; "456456345345" = 20}
  3. $arrLocation3 = @{"123123123124234" = 20; "4563456345345" = 15; "3453245234234" = 1; "456456345345" = 15}
  4. $arrLocation4 = @{"123123123124234" = 15; "4563456345345" = 20; "3453245234234" = 15; "456456345345" = 1}
  5.  
  6.  
  7. $intLocation1Minimum = ($arrLocation1.Values | Measure-Object -Minimum).Minimum
  8. $intLocation2Minimum = ($arrLocation2.Values | Measure-Object -Minimum).Minimum
  9. $intLocation3Minimum = ($arrLocation3.Values | Measure-Object -Minimum).Minimum
  10. $intLocation4Minimum = ($arrLocation4.Values | Measure-Object -Minimum).Minimum
  11.  
  12.  
  13. $location1Beaconid = $arrLocation1.Keys | ? { $arrLocation1[$_] -eq $intLocation1Minimum }
  14. $location2Beaconid = $arrLocation2.Keys | ? { $arrLocation2[$_] -eq $intLocation2Minimum }
  15. $location3Beaconid = $arrLocation3.Keys | ? { $arrLocation3[$_] -eq $intLocation3Minimum }
  16. $location4Beaconid = $arrLocation4.Keys | ? { $arrLocation4[$_] -eq $intLocation4Minimum }
  17.  
  18. $distance1_2 = ($arrLocation1[$location2Beaconid] + $arrLocation2[$location1Beaconid]) /2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement