Created
July 25, 2016 11:55
-
-
Save kkodev/358508da8106023d46013989c9326595 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lat = ARGV[0].to_f | |
lon = ARGV[1].to_f | |
lat = (lat * 1000).to_i / 1000.0 | |
lon = (lon * 1000).to_i / 1000.0 | |
puts <<STR | |
<?xml version="1.0"?> | |
<gpx version="1.1"> | |
STR | |
(0..200).each do |i| | |
latd = rand(-999..999).to_f | |
lond = rand(-999..999).to_f | |
nlat = lat + (latd / 10e6) | |
nlon = lon + (lond / 10e6) | |
puts <<STR | |
<wpt lat="#{nlat}" lon="#{nlon}"></wpt> | |
STR | |
end | |
puts '</gpx>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment