Code from UNH emontgomery, 13-Aug-10 New code was developed at UNH during the sonar testing that is specific to maps in a tripod-centric system, and overlaying them on fan images. These programs are in m_cmg/trunk/sonarlib/unh_1209. To map target locations in the tank, an axis system with 4 points along the y axis (that was defined as parallel to ADCP beam3, beside the blue leg, splitting the red and green legs). The location of the line with A, B, C, D on it allows the other targets to be placed without interference with the tripod feet. The targets were laid-out to have bricks to delimit where we expect the fan dead zone to be at different ranges from the sonar head. Corrugated metal sheets were arranged so there ripples would be at different angles to the beams in different locations. On land (in the Chase Center), all the sensors on the tripod and targets were measured relative to the axis described above. Once the tripod was in the water though, all the targets needed to be replaced in the same positions they had on the deck. A jig was used to replace many of them, but some were done by eyeball. In order to have positions for the target set to overlay on the fan image, each item had to be measured from two of the points on the major axis. For instance, the corners of the metal sheets were landmarks to measure. For the shorter wavelength sheets, distances between reference points C and D were measured. The divers gave me all the measurements and they went into the target#_def.m files. Each file contains all the code needed to build a structure of positions that can be mapped in Matlab. The targ* files build on each other, so all points in Target 1 are included in all the others. Invoking target5_def.m makes a structure containing all the targets in arrangement 5. Use unh_tripodovl(5) to plot the map of where things were (this function invoked the target*def file, so you don't have to have loaded the structure in advance). range_range.m is a program CRS wrote to solve the trig to find the point using two ranges from two points on the major axis. Just about everything in the target* files call range_range. plot_fan.m takes a raw fan file. does the rotations on the fly and plots the image. To plot the positions of target arrangements on it, use make settings.overlayscript='unh_tripodovl(5)' before running. You can do a slantrange correction or not (doesn't have much effect). orienttripodmeta.m" plots the tripod and sensors in the way we'd done previously. paz.m is one way of adding pitch and roll corrections to the raw azimuth files. It runs and produces a result, but more work is needed. "plot_az.m is a start on suing gridfit to display the azimuth data- based on a MVCO example, and doesn't run without breaking at the moment.