6
There are multiple sources of topographic and bathymetric data. Many of the data files are in binary format. For our homework, I wanted data in plain ASCII text. The source we used for homework was NOAA, and the data files were in convenient row, column format for easy loading into 2D arrays and imaging with Matlab’s imagesc function. UCSD’s Scripps Institution of Oceanography has a site with some text data but in a dierent format.

There are multiple sources of topographic and bathymetric data. …reactorlab.net/resources-folder/matlab/pdf-link-folder/... · 2019-09-01 · binary format. For our homework, I

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: There are multiple sources of topographic and bathymetric data. …reactorlab.net/resources-folder/matlab/pdf-link-folder/... · 2019-09-01 · binary format. For our homework, I

There are multiple sources of topographic and bathymetric data. Many of the data files are in binary format. For our homework, I wanted data in plain ASCII text. The source we used for homework was NOAA, and the data files were in convenient row, column format for easy loading into 2D arrays and imaging with Matlab’s imagesc function.

UCSD’s Scripps Institution of Oceanography has a site with some text data but in a different format.

Page 2: There are multiple sources of topographic and bathymetric data. …reactorlab.net/resources-folder/matlab/pdf-link-folder/... · 2019-09-01 · binary format. For our homework, I

Here we enter coordinates for a rectangle around the Hawaiian island of Oahu

Page 3: There are multiple sources of topographic and bathymetric data. …reactorlab.net/resources-folder/matlab/pdf-link-folder/... · 2019-09-01 · binary format. For our homework, I

The data has 3 columns for each location’s longitude, latitude and elevation/depth. Note the first column for longitude is 360 degrees minus the angles I entered.

You could load these data into an array in Matlab and then do some math to put the data into a second matrix, similar to the data from NOAA, for displaying with Matlab’s imagesc function.

Page 4: There are multiple sources of topographic and bathymetric data. …reactorlab.net/resources-folder/matlab/pdf-link-folder/... · 2019-09-01 · binary format. For our homework, I

The Global Positioning System, GPS, is critical in our world today. It is a very interesting system and we can get a rough idea of how it works and also practice Matlab at the same time. First we looked at the GPS notes at

ReactorLab.net > Matlab > Notes & Examples > GPS, Global Positioning System, with Matlab

Then we worked on the solution of a simplified system: two satellites above a GPS receiver on the surface of a 2D, circular Earth, with all clocks synchronized.

r = radius of earthe

Page 5: There are multiple sources of topographic and bathymetric data. …reactorlab.net/resources-folder/matlab/pdf-link-folder/... · 2019-09-01 · binary format. For our homework, I

This simple system ends up being a problem in linear algebra: solving simultaneous, coupled linear equations. When the number of equations (two, one for each satellite) equals the number of unknowns (two, the x and y location of the receiver on circular earth), then you can use the inverse of the coefficient matrix A. When you want to use more satellites to get a better estimate, then A is not square (# equations > # unknowns, an over determined system) and you then can use Matlab’s symbolic matrix left division ( \ ) operator to get the “least squares” best estimate of x and y.

For an example of matrix operations in chemical engineering see ReactorLab.net > Matlab > Notes & Examples > Array vs. Matrix operations

r = radius of earthe

Page 6: There are multiple sources of topographic and bathymetric data. …reactorlab.net/resources-folder/matlab/pdf-link-folder/... · 2019-09-01 · binary format. For our homework, I

Now we get a little more realistic and consider GPS receiver on surface of a spherical Earth

Recommended book for those interested in GPS: "Pinpoint: How GPS is Changing Technology, Culture, and Our Minds" by Greg Milner

Earth is more similar to an oblate spheroid, https://en.wikipedia.org/wiki/Spheroid

r = radius of earthe

r = distance of sat 1 from receiver1

known satellite coordinates