437/537 Project. Fall 2007.

Your target reader is one of your peers who is not familiar with the project topic or the numerical methods you are using. You should explain what the problem is, how you solved it, and what results you got.

Topics: 2 choices, 6 slots for each. 1st come 1st served.

CHOICE I: GPS


Write the software for a GPS navigator, such as the device I showed you on Nov 6. Your code will call my code which will return simulated signals from GPS satellites, as if you were being driven around in a car or a plane. Your code must compute your position and velocity at repeatedly, and plot your path over the course of 5 simulated minutes. See Reality Check 4 for the background and equations.

I have finished the code that you will use to run your code through it's paces. It is here .

You will call getGPSData() frequently over the course of 5 simulated minutes, determining your location each time, and estimating your velocity. (You call wait() to advance the time in the simulation.)

Then you should

(1) Make a plot of the projection of your path on the surface of the earth. This could be a latitude-longitude plot.

Alternatively, since an arc-second of latitude is not the same distance as an arc-second of longitude (except on the equator), you might want to project your path onto the plane that is tangent to the earth at your initial location, with distance in the horizontal and vertical directions measured in meters. A sensible orientation would be the horizontal lying East-West.

(2) Make a plot of your elevation in meters versus time.

(3) Make a plot of your speed in miles per hour versus time. (For unit conversions, note that you can type things like "1 mph in meters per second" into Google and get the answer.)

(4) Describe your 5-minute journey in as much detail as you can. (You will want to consult GoogleEarth or Google Maps.) Include an appropriate satellite photo in your report.)

NOTE: In our coordinate system, latitude is measured from the equator, north being positive. Longitude is measured from the prime meridian, with East being positive. The x-axis passes thru intersection of prime meridian and equator. The +z axis passes thru the North Pole. And xyz is a right-handed coordinate system.

function data=getGPSdata()
This will return a matrix of data. The number of rows will be between 3 and 12, and each row will contain
A,B,C,t,&tau
where [A, B, C, t] is the information in the satellite signal, the cartesian* coordinates of the satellite and the (very precise) time (in seconds) at which the satellite sent the signal, and &tau is the time your receiver received the signal according to its own (not very accurate) clock.

*The coordinate system has its origin at the center of the earth, the A axis throught the equator at 0 degrees longitude, and the C axis through the north pole.

Your main task is to determine your own x,y,z and d the difference between your receiver clock time and the true time known by the satellites. From this you can determine your position, and from successive calls you can estimate your velocity.

I am also providing you

function start('your_group_number')
that you must call to start the simulation, and
function wait(time_in_seconds)
that you can use to specify the approximate (simulation-) time between your calls to getGPSData, and
function r=getEarthRadiusInMeters()
function c=speedOfLightInMetersPerSecond()
To determine the uncertainty in the positions that you calculate, you need to know the uncertainty in the satellite clock times. To remove any ambiguity about this, I have added a function
getSatelliteClockUncertaintyInSeconds()
Your code must be able to work, and will be tested, with my code exactly as I supply it to you: you cannot rely on any changes you make to it and you may not declare any of my "global" variables global in your code.

HINT: You should write your code using scales or units such that your 4 unknowns (x,y,z,d) are in the same ball-park numerically: Your code will probably not work well or at all if the spatial coordinates are ~10^6 and d is around 10^-6, for example. (Think of taking the two-norm of a step in [x,y,z,d] space: with the kinds of numbers just mentioned, the d-step information will get swamped.)

CHOICE II: Determining structure of molecules.


Reality Check 13, pp597.. Please just do this as written, and see below for required and suggested plots.

(1) To describe what your minimization algorithm is doing as it attempts to minimize the energy, you need to have some way of representing its progress. I suggest that a plot of U (at the best vertex, say, in the case of Nelder-Mead) versus the total number of calls to the function U, would be a good measure, and a good way of graphically comparing the performance of several methods.

(2) If you are struggling with the steepest descent method, here is a related method that is easier to implement and may even perform better. Instead of doing a full line minimization along the gradient direction, you could just evaluate the gradient, take a smallish step along the negative gradient, and then repeat. I.e., Pick a step-size, h.
Let G = grad U at current point
v = -G/||G|| (i.e. the unit vector along -grad U)
next point = current point + v*h.

If h is smallish, this means every move is directly downhill. We could call this "continuous steepest descent". As with the other methods, an animation of the atoms as the method proceeds would be useful to see. And a plot of U versus number of evaluations of U would be a good way of tracking performance.

As with steepest descent, you need to compute grad U. I have done this analytically, but it might work just as well to compute grad U by finite differences, and the routine fdjac from the miniproject could be used with little modification.