NMEA lat/lon to decimal degree

Convert between coordinates encoded in a string in accordance with NMEA 0183 (typically from a GPS/GNSS receiver) in (degree + fractional minute) to standard decimal degree (DD) and degree, minutes, seconds (DMS) encoded format.

All digits that are present in the minute fractions are taken into consideration in the calculation. GPS receivers emit sentences with differing lengths; 4 by Telit (ex. 5528.0453), 5 by u-blox (ex. 5528.02212). Other soruces indicate that 2 and 3 digits is also in use.

NMEA coordinate:
Example input:
From a NMEA RMC sentence like $GNRMC,114922.00,A,5528.02212,N,00841.21015,E,0.315,,150916,,,A*6D
You would input the coordinate parts (comma index 3 to 6) 5528.02212,N,00841.21015,E.