176985602337900

Find freelancers. Lose those costly delays.

With 1.7 million freelancers, we'll match you with the perfect talent.

or, Register with Elance »

PHP, SQL, Mile Radius Search
Sign in to Add to Watch List

IT & Programming > Web Programming

View Change History

The client has made the following changes to the job.

Description
Date

Job awarded.

Jan 28, 2013
Close

Job Description

  |  Change History >>

Updated

Close
  • Posted: Mon, Jan 28, 2013
  • Time Left: Closed
  • Location: Anywhere
  • Client prefers freelancers from:
    Anywhere

    You are still able to submit a proposal for this job.

    The client prefers freelancers from
    a different location.

    You're still able to submit a proposal for this job, regardless of your location.
  • Start: Immediately
  • Budget: Less than $500
  • Fixed Price Job
  • Elance Escrow Protection
  • W9 Not Required
Sign in to view client's details

I have a job that was done by someone else that I would up doing myself so I want to explain this as best I can. I have some php code for calculating the distances between to 2 points based on longitude and latitude. I also have one that is done in SQL which is off by a lot in miles.

I need to convert the old function to the new one using the old form:

  [obscured]  /admin/zip_search4.php

The new function in php looks like this:

$earth_radius = 3960.00; # in miles
$lat_1 = "47.117828";
$lon_1 = "-88.545625";
$lat_2 = "47.122223";
$lon_2 = "-88.568781";
$delta_lat = $lat_2 - $lat_1 ;
$delta_lon = $lon_2 - $lon_1 ;

function distance_haversine($lat1, $lon1, $lat2, $lon2) {
global $earth_radius;
global $delta_lat;
global $delta_lon;
$alpha = $delta_lat/2;
$beta = $delta_lon/2;
$a = sin(deg2rad($alpha)) * sin(deg2rad($alpha)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * sin(deg2rad($beta)) * sin(deg2rad($beta)) ;
...

Sign in or Register to see more

Desired Skills
MySQL Administration, PHP
Job ID: 37273977
Proposals
Avg $ | High $ | Low $ — Show Pricing
  • Submit Date (Latest)

 Pakistan  |  
Winner
An experienced,dedicated and skilled programmer with passion to work on challenging projects.Customer satisfaction,simple,detailed and clean...
3
  |  
 4.5   |  Private   |  2 Jobs
Bid ID: 37275594  |  Submitted: Jan 28, 2013 12:32 ET 
Delivery
Within 3 days
$87.67

 Uruguay  |  
Thanks for taking a look at my profile. I am professional programmer with over 15 years of experience and excellent reputation. I have experience...
4
  |  
 4.3   |  Private   |  19 Jobs
Bid ID: 37275368  |  Submitted: Jan 28, 2013 12:27 ET 
Proposal SEALED

 Romania  |  
Web development, Mobile development, APIs, Web scraping and Social media, whatever you need we can provide and rise to the challenge.
9
  |  
 4.9   |  Private   |  14 Jobs
Bid ID: 37274978  |  Submitted: Jan 28, 2013 12:17 ET 
Proposal SEALED
Sign in to Elance and start working on jobs today.
Sign in to view more of the job details and submit a proposal. Once registered, you'll have access to thousands of jobs online or through email.
Are you ready to post a job like this one?
Post a Similar Job »