public function convertDMStoDec($degrees, $minutes, $seconds) {
    if ($degrees < 0) {
      return $degrees - ((($minutes * 60) + $seconds) / 3600);
    }
    
    return $degrees + ((($minutes * 60) + $seconds) / 3600);
  }
public function convertDMStoDec($degrees, $minutes, $seconds) {
    if ($degrees < 0) {
      return $degrees - ((($minutes * 60) + $seconds) / 3600);
    }
    
    return $degrees + ((($minutes * 60) + $seconds) / 3600);
  }
public function convertDMStoDec ( $ degrees , $ minutes , $ seconds ) { if ( $ degrees < 0 ) { return $ degrees - ( ( ( $ minutes * 60 ) + $ seconds ) / 3600 ) ; } return $ degrees + ( ( ( $ minutes * 60 ) + $ seconds ) / 3600 ) ; }
Convert Degrees Minutes Seconds to Decimal for a coordinate.

@param int $degrees
@param int $minutes
@param float $seconds

@return float
The coordinate in decimal format.
Convert Degrees Minutes Seconds to Decimal for a coordinate .