Bedding planes, rose diagrams and bug fix

Phil Underwood furbrain@furbrain.screaming.net
Mon, 22 May 2000 05:35:44 +0100


On Tue, 02 May 2000, Wookey wrote:
>
>3) ability to get pos data (esp entrances) from display. Option to
>display depth-only useful too for doing elevations. Even better would be
>a way to generate a list of stations for which I want the depths printin=
g
>out. So I get out a nice list of station: depth ready for sticking on th=
e
>survey. Need to be able to add adjustments (to account for stations not
>at floor/surface level). Or a constant offset if they need to be reletiv=
e
>to some datum other than whatever the cave is plotted at. Outputting=20
>TeX/LateX/rtf file for printing might be best?
>
You will need to write a file containing the stations you are interested
in, with offsets for each of them, and a generalised offset at the start =
e.g
(text following semicolon is comment - do not include)

--Stationlist--
-1786.53 ; subtract 1786.53m from all readings
\p161 0 ; report this as it is
\p161b -0.5 ; p161b is 0.5m above floor level
\p161c 3 ; p161c is 3.0m below floor level!
\p161d 0=20
\p161e -0.5
\p161f 2.2                                                               =
             =20
---------------
Note that each station must have an offset, and appear as it does in the
pos file.=20
Now run the following script with the above file as the first
argument, and the .pos file as the second argument. It assumes that you
have sort, join, and awk/gawk available on your system.

--makesvxelev--
#! /bin/sh
# print out elevations from an svx file...
=20
sort $1 -o $1
sort +4 $2 | join -a 2 -1 5 -o 0 1.3 2.2 - $1 | awk "\
 BEGIN {offset =3D 0} \
 NF=3D=3D1 {offset =3D \$1} \
 NF!=3D1 { print \$1, (\$2 + \$3 + offset)}"                             =
               =20
---------------=20
A minor side effect of this script is that it will sort the station list
into ascending alphabetical order.

--=20
Phil Underwood <furbrain@furbrain.screaming.net>
Homepage: http://members.xoom.com/bighairyone/
"It's not what you've got, it's how you make it explode."