MATLAB Answers

How to convert NMEA degrees minutes to decimal degrees?

8 views (last 30 days)
Daryna Butash
Daryna Butash on 8 Sep 2021
Answered: Daryna Butash on 8 Sep 2021
Hi! I have a full dataset that I have analysed and derived, the latitude and longitude are currently in NMEA format which is degrees minutes. I want to ask how I could convert those into decimal degrees or degrees minutes seconds using MATLAB please? I have attached my completed matrix file, the lat is the first column and the lon is second.
a sample of the dataset:
% Lat lon height seagrass seabed
4957.09103173608 616.902155845519 55.3843433418406 5.50000000000000 5.95000000000000
4957.09099725892 616.902118258920 55.3872288945604 5.50000000000000 5.95000000000000
4957.09091870816 616.902061708161 55.3793266942190 5.60000000000000 5.95000000000000
4957.09081628908 616.901956289077 55.4005703077852 5.60000000000000 5.95000000000000
4957.09073919768 616.901877059155 55.4129206293881 5.60000000000000 5.95000000000000
4957.09071200000 616.901848000000 55.4080000000000 5.35000000000000 5.95000000000000
4957.09067903983 616.901794984711 55.4316401126534 5.35000000000000 5.95000000000000
4957.09057777740 616.901682888398 55.4043331301433 5.55000000000000 5.90000000000000
4957.09050234589 616.901589297027 55.3682293199882 5.70000000000000 5.95000000000000
4957.09043280823 616.901507671933 55.4273534163068 5.65000000000000 5.95000000000000
4957.09032632041 616.901387960169 55.4680800140817 5.50000000000000 5.95000000000000
4957.09026144256 616.901314965580 55.4114224412434 5.50000000000000 5.90000000000000
4957.09021993863 616.901253938626 55.4064591779135 5.55000000000000 5.90000000000000
4957.09014742810 616.901237142305 55.3998572490338 5.50000000000000 5.90000000000000
4957.09011960147 616.901149920752 55.4016212852426 5.45000000000000 5.90000000000000
4957.09008605965 616.901078599678 55.3974599678133 5.45000000000000 5.90000000000000
4957.09004882617 616.901091430962 55.4064309615097 5.45000000000000 5.90000000000000
4957.08998009899 616.900988178161 55.3931088980730 5.45000000000000 5.90000000000000
4957.08985868855 616.900926603184 55.3834221379833 5.50000000000000 5.95000000000000
4957.08980017740 616.900801686816 55.3547547086086 5.50000000000000 5.95000000000000
from my understanding the lat is 49 degrees 57.0... minutes etc and same with the lon 6 degrees, 16.9... minutes. I am unsure how to split this into the desired format. Any help would be much appreciated. Thank you very much!!

Answers (1)

Daryna Butash
Daryna Butash on 8 Sep 2021
I actually just found a wonderful function for doing this, very grateful to whoever made it as it works incredibly well I'm super happy! Here is the link for anyone needing it
https://www.socib.es/users/glider/glider_toolbox/doc/index.html?page=m/processing_tools/nmea2deg.html

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!