How to convert GPS degree to decimal and vice-versa in jquery or javascript and PHP? <p>does someone know how to convert GPS degree to decimal values or vice versa?</p> <p>I have to develop a way where users can insert an address and get the GPS values (both degree and/or decimal), but the main thing i need to know is how to convert the values, cause users can also insert GPS values (degree or decimal). Because i need to get the map from google maps this needs decimal.</p> <p>I've tryed some codes but i get big numbers...like this one:</p> <pre><code>function ConvertDMSToDD(days, minutes, seconds, direction) { var dd = days + minutes/60 + seconds/(60*60); //alert(dd); if (direction == "S" || direction == "W") { dd = '-' + dd; } // Don't do anything for N or E return dd; } </code></pre> <p>Any one?</p> <p>Thank you.</p>