I have an API interface to Bing Map's API (RESTful). If a user says he wants directions between New York and Los Angeles, I can get the directions from the Bing Map's API. However, what I need you to make is a php function which will recursively (or iteratively) continue to make detour and/or reroute requests to bing map's api and/or my api, to eliminate any and all left turns. The catch is that the detour and avoidance of the left turn is sometimes more expensive than actually doing the left turn. Your job is to eliminate left turns that have no cheap right turn alternative, to keep left turns intact when the right hand alternative is more expensive (in miles). You should also research online about how expensive left turns are to establish a threshold and then to decide if you can avoid the left turn or not. When I run the function between A and B I should see an array returned with the directions and no left turns that are expensive.
1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement).
2) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
3) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Employer's environment--Deliverables must be installed by the Worker in ready-to-run condition in the Employer's environment.
b) For all others including desktop software or software the employer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this project.
linux, php 5.3, display_errors on, no sessions allowed, e_all