filepath = ['\\atlas.shore.mbari.org\ProjectLibrary' ...
    '\901805_Coastal_Biogeochemical_Sensing\Spray_Data' ...
    '\',num2str(mission),'\sat_files\',num2str(mission),'_sat.mat'];
load(filepath,'eng')

%

pres = eng.pres(:,end)
secs = eng.secs(:,end)

%

for i = 1:height(secs)
    plot(secs(i),pres(i))
end

%

url = 'https://odss.mbari.org/odss/tracks?platformID=54065b5560d0e168c88d4087&returnSRS=4326&lastNumberOfFixes=5&returnFormat=html';
webread(url)
% can parse the datetime data from the website

%

%% CalCOFI Line 66
CalCOFI = readtable("CalCOFIStationOrder.csv");
CalCOFI67 = CalCOFI(CalCOFI.Line == 66.7,["Sta","Lat_dec_","Lon_dec_"]);
CalCOFI67.Properties.VariableNames = ["Station","Lat","Lon"];
CalCOFI67Description = strsplit(num2str((CalCOFI67.Station')));

%% M1 and C1
M1Lat = 36.75901;
M1Lon = -122.02019;
% need to add C1

%% Spray 034
SprayLatHist = s.lat(end-4:end-1);
SprayLonHist = s.lon(end-4:end-1);
SprayLat = s.lat(end);
SprayLon = s.lon(end);
%% Datetimes
date = datetime(datevec(s.sdn_(2,:))); 
date.TimeZone = "UTC"; % Set timezone for the datetime var type
date.TimeZone = "America/Los_Angeles"; % change timezone to local
SprayHistDescription = cellstr(date(end-4:end-1))';
SprayDescription = cellstr(date(end))';

wm = webmap("National Geographic Map");
wmmarker(CalCOFI67.Lat,CalCOFI67.Lon,"Description",CalCOFI67Description,"Icon","CalCOFILogo.png","OverlayName",'CalCOFI Line 67')
wmmarker(M1Lat,M1Lon,"Description",'MBARI Mooring',"Icon","M1_buoyriding_72.png","OverlayName",'M1','IconScale',2)
wmmarker(SprayLatHist,SprayLonHist,"Icon","spray-glider.png","OverlayName","Spray 034 Location History","Alpha",.2,"IconScale",2,"Description",SprayHistDescription)
wmmarker(SprayLat,SprayLon,"Icon","spray-glider.png","OverlayName","Spray 034 Location","Alpha",1,"IconScale",2,"Description",SprayDescription)

%

%% Create a geographic axes
ax = geoaxes('Basemap','satellite');

%% Hold the current plot
hold(ax, 'on');

%% Plot CalCOFI Line 66
geoplot(ax, CalCOFI67.Lat, CalCOFI67.Lon, 'o', 'Color', [0 0.75 0.75], 'DisplayName', 'CalCOFI Line 67', 'MarkerSize', 10);

%% Plot M1
geoplot(ax, M1Lat, M1Lon, 'Color', [1 0.5 0], 'DisplayName', 'MBARI Mooring', 'MarkerSize', 20,'Marker','diamond');

%% Plot Spray 034 Location History
geoplot(ax, SprayLatHist, SprayLonHist, '.', 'Color', [0 0.75 0.75], 'DisplayName', 'Spray 034 Location History', 'MarkerSize', 10);

%% Plot Spray 034 Location
geoplot(ax, SprayLat, SprayLon, '*', 'Color', [1 0.5 0], 'DisplayName', 'Spray 034 Location', 'MarkerSize', 20);

%% Add a legend
legend(ax, 'Location', 'southoutside');

%% Release the hold on the plot
hold(ax, 'off');