public function convertDMStoDec($degrees, $minutes, $seconds) {
    if ($degrees < 0) {
      return $degrees - ((($minutes * 60) + $seconds) / 3600);
    }
    
    return $degrees + ((($minutes * 60) + $seconds) / 3600);
  }