%% get_spatial : to fetch spatial data for mission 
%%  depth is used to compute pressure for salinity and oxygen computations
%%  lat and lon are pre-mission GPS fixes, constant after mission start
%%  roll, pitch, yaw, Xpos and Ypos are extracted for 3-D mission visualization

%% -------- Latitude, longitude and gps time -------------
load dataGPS; gpstime = gps(:,time); 
glat=gps(:,latitude); glon=-1*gps(:,longitude);

%% -------- Depth rolland dead reckoned position -------------
load dataN; navtime = dataNav(:,time);
nroll = [dataNav(:,mPhi)*180/pi];
npitch = [dataNav(:,mTheta)*180/pi];
nyaw = [dataNav(:,mPsi)*180/pi];
ndepth = dataNav(:,mDepth);
posx0 = dataNav(1,mPos_x); posy0 = dataNav(1,mPos_y);
nposx=dataNav(:,mPos_x)-posx0; nposy=dataNav(:,mPos_y)-posy0;


