I needed to calculate the distance between two Geo-Points using PHP.
Using Haversine formula you get to this function, where you enter lat1, long1, lat2, long2 and it will give the distance in Km.
In case you want to show the distance in Miles, simply change the Earth radius to 3956.
Hope it helps someone!
Finally it’s here, my first Open Hardware project, in which I have delayed some years to release due my lack of time to finish it and make it presentable.
For this project I’ve created a Project Page, in which I will be updating in a regular basis.
So I want to invite you to take a look at the
OPEN HARDWARE MOODLAMP PROJECT PAGE.
I was studying last semester in Politecnico di Milano, a great university in Milan, Italy. Anyway, I am taking lots and lots of pictures here (Italy is a beautiful country).
I am saving my pictures on my computer, but WHAT IF something goes wrong with my computer?
So what I am doing is backing up my pictures (also other things as work files) to my NAS SERVER in Brazil during the night, using RSYNC via SSH (Of course it’s an incremental backup, as I have more then 300GB of photos).
On my server I don’t run SSH on the regular port 22. I use, for example the port 223.
rsync -av --update --delete -e 'ssh -p 223' /Users/dansku/MyDocs/Fotografias
Where /Users/dansku/MyDocs/Fotografias is the local dir, and /daniel/SERVER/Backups is the remote dir.
This way, even if my computer is stolen, I know my data is backed up!