• No results found

3.7 Formation Control Algorithm 4

4.1.2 Simulation of Ocean Currents Using MSEAS Models

In order to simulate realistic ocean currents, the MOOS-IvP simulation test-bed was aug- mented to take advantage of the accurate ocean models produced by the MSEAS MIT research group [69]. The MIT Multidisciplinary Simulation, Estimation, and Assimilation Systems (MSEAS) group creates and utilizes physics-driven numerical models of dynamic oceano- graphic environments based on data from current and historical in-situ and remotely sensed measurements. The purpose of the MSEAS-MOOS interface is to allow the use of MSEAS ocean models within the LAMSS MOOS-IvP environment, allowing us to incorporate realistic ocean environments in our simulations. This MSEAS-MOOS interface is comprised of a set of Octave scripts and a single MOOSApp named iMSEASOceanModelDirect, that facilitates the use of MSEAS ocean models within the MOOS-IvP environment. We detail here these scripts and iMSEASOceanModelDirect, covering their roles and the method by which to configure the parameters of this interface.

Octave Scripts

The MSEAS group creates ocean models in a format called netCDF, and provides a Matlab file called readmseaspe.m that allows the user to extract and interpolate data from these netCDF files at specified positions and times. The foundation of the MSEAS-MOOS inter- face is an Octave script called readmseaspe moos.m, which is in essence a direct translation of the readmseaspe.m file from Matlab to Octave. In addition to this script, three other scripts are used by the interface - interp1 alt.m, a script for 1-dimensional interpolation, mseaspe model time.m, a script which extracts the time extents of the ocean model, and gen- erate sample times.m, a script which converts a user requested sample time from seconds to the format required by readmseaspe moos.m. We briefly describe each of these scripts here. Note that these scripts are used internally by the MOOSApp iMSEASOceanModelDirect.

Chapter 4. Methodology, Infrastructure, and Comparison Metrics

The Octave script readmseaspe moos.m is the foundation of the MSEAS-MOOS interface, and is called within iMSEASOceanModelDirect in order to access desired ocean data from the netCDF file, at every vehicle position within the MOOS-IvP simulation. The input to this file is a string of requested variables (e.g. ocean velocities, temperature, salinity, etc.), a longitude, a latitude, a depth, and a time, and its output is the requested values interpolated by the dynamic model from the netCDF file. A significant advantage of this script is that it allows for multiple requests to be calculated and retrieved with a single function call. The script interp1 alt.m, is called by readmseaspe moos.m for 1-D interpolation of ocean values. The next script, mseaspe model time.m performs a simple function that allows iMSEASOceanModelDirect to retrieve the temporal extents of the ocean model to be used. This is needed in order to correctly extract samples at the requested times. The final Octave script, generate sample times.m, is used to convert a sample request time from Unix time to the vector format (year, month, day, hours, minutes, seconds) required by readmseaspe moos.m. In addition, it returns a cell array of these vectors, in order to perform multi-vehicle requests that are separate in space but equal in time. For a deeper understanding of how exactly the MSEAS netCDF files are generated and how readmseaspe.m accesses netCDF data, see [70].

Parameter Description Default

octave path The path to the Octave scripts used by iM-

SEASOceanModelDirect.

/path to scripts/ mseas filepath The path to the MSEAS netCDF .nc file to be read. /path to netCDF/ mseas varnames The variables to be read/interpolated, usually u,v,w

for zonal, meridional, and vertical ocean current ve- locities. Any combination of u,v,w can be used, in any order.

u,v

mseas time offset The offset in Unix seconds from the the start of the MSEAS netCDF file. This allows the user to start the data access at a time offset.

0.0

node communities A comma-separated list of vehicle names that the user wishes to obtain velocities for (e.g. al- pha,bravo,charlie,...).

NODE 1,...,NODE 25

Table 4.2: Important configuration parameters of the iMSEASOceanModelDirect MOOSApp.

iMSEASOceanModelDirect

iMSEASOceanModelDirect is a MOOSApp that runs on the shoreside community, and es- sentially utilizes the previously described Octave scripts to access desired ocean velocity data from a specified netCDF file. Given a list of vehicles whose positions are bridged to the shoreside, iMSEASOceanModelDirect performs a batch request of the ocean velocity data

Chapter 4. Methodology, Infrastructure, and Comparison Metrics

via the readmseaspe moos.m script, using the time elapsed since its launch, and publishes the ocean current values extracted from the netCDF file at the positions of each vehicle as variables. These variables are then bridged to each vehicle MOOS community for use as ex- ternal disturbances. It performs this request in a ’as soon as possible’ manner, sending the next request the moment the previous request has been satisfied. Important configuration parameters of iMSEASOceanModelDirect are listed in table 4.2. iMSEASOceanModelDirect is used to simulate realistic ocean currents in one comparison scenario for the evaluation of my formation control behaviours.

Figure 4.2: Visualization in the MOOS-IvP Simulation Test-Bed of zonal and meridional currents from an MSEAS ocean model netCDF file representing the Red Sea.

Related documents