So, first convert the DMS coordinates to your degree format.
eg. 11°14'52" = 11 + 14/60 + 52/3600 = 11.24777778 degrees
and then continue, as you did, with your calculation, which, as you say, is already working.
Edit: Note that latitudes in the southern hemisphere and longitudes in the western hemisphere are negative. Therefore, the above formula should really be:
sign(degrees) * (abs(degrees) + minutes/60 + seconds/3600)
source share