Converting GPS coordinates

500px expects coordinates as decimal so coordinates like 40°42′51″ N
and W74°00'21" get converted to their decimal counterparts (e.g.
40.7141666667 and -74,0058333333)