source: git/doc/manual.sgml @ 6af6d51

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change on this file since 6af6d51 was 6af6d51, checked in by Olly Betts <olly@…>, 9 years ago
  • .gitignore,configure.ac,doc/: Eliminate most of the SGML entities we

define.

  • Property mode set to 100644
File size: 99.1 KB
Line 
1<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2<!entity man.aven SYSTEM "aven.sgml">
3<!entity man.3dtopos SYSTEM "3dtopos.sgml">
4<!entity man.cad3d SYSTEM "cad3d.sgml">
5<!entity man.cavern SYSTEM "cavern.sgml">
6<!entity man.diffpos SYSTEM "diffpos.sgml">
7<!entity man.extend SYSTEM "extend.sgml">
8<!entity man.sorterr SYSTEM "sorterr.sgml">
9<!entity man.svxedit SYSTEM "svxedit.sgml">
10]>
11
12<!--
13FIXME:
14
153dfile title:
16defaults to a list of the leafnames of the <filename>.svx</filename> files specified on the
17command line (with any paths and extensions removed).
18.
19e.g.: cavern entrance.svx \data\2ndpart.svx
20.
21would give a surveytitle of 'entrance 2ndpart'.
22.
23but this may change...
24
25FIXME todo:
26mark-up of Windows Windows NT etc?
27section on "design philosophy"
28
29level sump fudge:
30
31*begin
32*data cartesian from to dx dy dz
33*sd dx dy 100 metres
34*sd dz 0.001 metres
35; upstream - downstream
36nuiping.gowiththeflow.129 dachao.upstream.105 0 0 0 ; last number is drop in height across the sump
37*end
38
39``Quick start'' section
40
41- install (by OS): unpacking, configuration (language, where support files live)
42
43- lead people through entering and processing
44a sample survey.  Take examples from surveying books and real surveys.
45
46
47<Para>The other really important commands apart from *BEGIN, *END, and
48*INCLUDE are *EQUATE and *FIX.
49</Para>
50
51<Para>*EQUATE is used to join surveys together, e.g.
52</Para>
53
54<programlisting>*equate entrance.6 adrian.1</programlisting>
55
56<Para>
57indicates that station 6 of the entrance survey was used as
58the station 1 of the Adrian's Route survey.
59</Para>
60
61<Para>*FIX is for fixing control points - for example:
62</Para>
63
64<programlisting>
65*fix 161.entrance.1    0  0  1780</programlisting>
66
67<Para>fixes the 1st point of the 'entrance' survey at the coordinates
680 (east-west), 0 (north-south), 1780 (altitude).
69</Para>
70
71
72<term>node</term>
73<listitem><para>when talking about the survey network, we talk about an
74<emphasis>n</emphasis>-node to describe the number of connections to
75a station.  So a 1-node is a station with only 1 leg to or from it
76- i.e. The end of a passage or survey. A
772-node is a typical station along a passage with a survey leg coming
78into it, and one going out.  A 3-node is a station with three legs
79joining it, e.g. at a T-junction. And so on.
80</para>
81
82-->
83
84<article Status="draft" id=index>
85 <articleinfo>
86  <Title><Application>Survex</Application> <!--VERSION-->1.2.17 Manual</Title>
87  <AuthorGroup>
88   <Author>
89    <FirstName>Olly</FirstName>
90    <SurName>Betts</SurName>
91    <AuthorBlurb><Para>
92      Olly Betts wrote most of <Application>Survex</Application>.
93    </Para></AuthorBlurb>
94    <Affiliation>
95     <Address><Email>olly@survex.com</Email></Address>
96    </Affiliation>
97   </Author>
98   <Author>
99    <SurName>Wookey</SurName>
100    <AuthorBlurb><Para>
101      Wookey is a small furry creature.
102    </Para></AuthorBlurb>
103    <Affiliation>
104     <Address><Email>wookey@survex.com</Email></Address>
105    </Affiliation>
106   </Author>
107  </AuthorGroup>
108  <copyright>
109   <year>1998-2015</year>
110   <holder role="mailto:olly@survex.com">Olly Betts</holder>
111  </copyright>
112  <Abstract>
113   <Para>
114    This is the manual for <Application>Survex</Application> - an open-source software package for
115    cave surveyors.
116   </Para>
117  </Abstract>
118 </articleinfo>
119
120<Sect1><Title>Introduction</Title>
121<?dbhtml filename="intro.htm">
122
123<Para>
124This section describes what <Application>Survex</Application> is, and outlines the scope of this
125manual.
126</Para>
127
128<Sect2><Title>About <Application>Survex</Application></Title>
129
130<Para><Application>Survex</Application> is a multi-platform open-source cave surveying
131package.
132Version 1.2
133currently runs on UNIX, Microsoft Windows 95/NT and
134successors, and Mac OS X.
135We're investigating support for various
136palmtop devices.
137Version 1.0 has fewer features, but also runs on DOS and RISC OS machines.
138</Para>
139
140<Para>We are well aware that not everyone has access to super hardware
141- often surveying projects are run on little or no budget and any
142computers used are donated.  We aim to ensure that <Application>Survex</Application> is
143feasible to use on low-spec machines.  Obviously it won't be as
144responsive, but we intend it to be usable.
145Please help us to achieve this by giving us some feedback
146if you use <Application>Survex</Application> on a slow machine.</Para>
147
148<Para><Application>Survex</Application> is capable of processing extremely complex caves very
149quickly and has a very effective, real-time cave viewer which allows
150you to rotate, zoom, and pan the cave using mouse or keyboard. We have
151tested it extensively using <Acronym>CUCC</Acronym> and <Acronym>ARGE</Acronym>'s surveys of the caves
152under the Loser Plateau in Austria (over 22,000 survey legs, and over
153120km of underground survey data). This can all be processed in around
15410 seconds on a low-end netbook.
155Survex is also used by many other survey projects around the world,
156including the
157<ulink url="http://www.oucc.org.uk/draenen/draenenmain.htm"
158>Ogof Draenen</ulink> survey, the
159<ulink url="http://www.easegill.org.uk/">Easegill</ulink> resurvey project,
160the <Acronym>OFD</Acronym> survey, the
161<!-- url="http://milos2.zoo.ox.ac.uk/~oucc/reports/surveys/surveys.htm" -->
162<ulink url="http://www.oucc.org.uk/reports/surveys/surveys.htm"
163><Acronym>OUCC</Acronym> Picos expeditions</ulink>, and the
164<ulink url="http://www.hongmeigui.net/">Hong Meigui China
165expeditions</ulink>. <!-- FIXME more? --></Para>
166
167<Para><Application>Survex</Application> is still actively being worked on.  Version 1.0 was
168complete in some sense, but development continues - initially in reshaping
169Survex into a more integrated GUI package.</Para>
170
171<Para>We encourage feedback from users on important features or problems,
172which will help to direct future development.  See the "Mailing List" section
173of this manual for the best way to contact us.</Para>
174
175</Sect2>
176
177<!--
178<Para>Because <Application>Survex</Application> is still being actively developed, this document
179has an unfortunate tendency to lag slightly behind the capabilities of the
180software. The latest version is now available on the web at <ulink
181url="http://survex.com/">http://survex.com/</ulink> - check there for latest info.
182</Para>
183-->
184
185<!--
186<Sect2><Title>Other Documentation</Title>
187
188<variablelist>
189<varlistentry>
190<term>NEWS or NEWS.txt</term>
191<listitem><Para>a list of changes of interest to
192<Application>Survex</Application> users, broken down by version number.  Consult this file
193when upgrading to find out what has changed since the version you were
194using previously.
195</Para></listitem>
196</varlistentry>
197
198<varlistentry>
199<term>ChangeLog or CHANGES.txt</term>
200<listitem><Para>a much more detailed list of changes, aimed at developers
201rather than end users.
202</Para></listitem>
203</varlistentry>
204
205<varlistentry>
206<term>BUGS or BUGS.txt</term>
207<listitem><Para>a list of known bugs.
208</Para></listitem>
209</varlistentry>
210
211<varlistentry>
212<term>TODO or TODO.txt</term>
213<listitem><Para>planned changes and enhancements.
214</Para></listitem>
215</varlistentry>
216
217FIXME: merge INSTALL* into here, then process separately and textify
218to produce INSTALL*
219
220<varlistentry>
221<term>INSTALL or INSTALL.txt</term>
222<listitem><Para>instructions for installing <Application>Survex</Application>.  The
223Microsoft Windows version comes packaged up with an installation wizard,
224so this file doesn't exist there (you just run the package and follow
225the on-screen instructions).
226</Para></listitem>
227</varlistentry>
228</variablelist>
229
230</Sect2>
231-->
232
233<Sect2><Title>About this Manual</Title>
234
235<Para>
236If there's a part of this manual you find hard to understand, please do
237let us know.  We already know Survex well, so it can be hard for us
238to spot areas where the manual doesn't given enough information, or
239doesn't explain things clearly enough to follow when you don't know what's
240going on.  It's helpful is you can suggest a better wording, but don't worry
241if you can't, just explain the problem as precisely as you can.
242</Para>
243
244<Para>
245The master version of this manual is an <acronym>SGML</acronym>
246document written using the <ulink url="http://www.docbook.org/">docbook
247<acronym>DTD</acronym></ulink>,
248and automatically converted to a number of other formats.  If
249you are going to send us <emphasis>major</emphasis> changes, it's much easier
250to include them if you work from this master.  You can get it
251from the source archive (docs/manual.sgml) or from <ulink
252url="http://survex.com/docs.html">the Survex website</ulink>.
253</Para>
254
255<Sect3><Title>Terminology</Title>
256
257<Para>Throughout this document we use British terminology for
258surveying.</Para>
259
260<variablelist>
261<varlistentry>
262<term>station</term>
263<listitem><para>a point in the cave that you survey from and/or to
264</para></listitem></varlistentry>
265
266<varlistentry>
267<term>leg</term>
268<listitem><para>a line joining two stations
269</para></listitem></varlistentry>
270
271<varlistentry>
272<term>survey</term>
273<listitem><para>a group of legs surveyed on the same trip
274</para></listitem></varlistentry>
275
276</variablelist>
277
278</Sect3>
279
280</Sect2>
281
282<!-- FIXME: Further sources of info: website, mailing lists, other docs -->
283
284</Sect1>
285
286<Sect1><Title>Getting Started</Title>
287<?dbhtml filename="getstart.htm">
288
289<Para>This section covers how to obtain the software, and how to unpack and
290install it, and how to configure it.</Para>
291
292<Sect2><Title>Obtaining <Application>Survex</Application></Title>
293
294<Para>The latest version is available from the <Application>Survex</Application> website:
295<ulink url="http://survex.com/">http://survex.com/</ulink>.  It is also
296freely redistributable, so you welcome to get a copy from someone else
297who has already downloaded it.</Para>
298
299<Para>If you want some sample data to experiment with, you can download some
300from the Survex website too:
301<ulink url="http://survex.com/software/sample.tar.gz">http://survex.com/software/sample.tar.gz</ulink></Para>
302
303</Sect2>
304
305<Sect2><Title>Installing <Application>Survex</Application></Title>
306
307<Para>The details of installation depend greatly on what platform you
308are using, so there is a separate section below for each platform.</Para>
309
310<Sect3><Title>Linux</Title>
311
312<Para>
313We supply pre-compiled versions for x86 Linux machines in RPM format
314(suitable for Redhat, Mandrake, and some other distributions).
315Survex Debian packages are available from Debian mirror sites in
316the usual way.
317</Para>
318
319<Para>
320You'll need root access to install these prebuilt packages.
321If you don't have root access you will need to build from source
322(see the next section).
323</Para>
324
325<!-- FIXME Add Gnome file association note for Linux/Unix
326<Para>On Microsoft Windows, <Application>Survex</Application> installs with
327suitable file associations so that you can drive it from the GUI.
328On UNIX you need to drive <Application>Survex</Application> from a command-line
329prompt (or set some a filemanager or graphics shell).
330</Para>
331-->
332
333<Sect3><Title>Other versions of UNIX</Title>
334
335<Para>For other UNIX versions you'll need to get the source code
336and compile it on your system.  Unpack the sources and read
337the file called INSTALL in the top level for details about building
338from source.
339</Para>
340
341</Sect3>
342
343<Sect3><Title>Microsoft Windows 95/NT and successors</Title>
344
345<Para>
346This version comes packaged with an installation wizard.  Just
347run the downloaded package and it will lead you through the
348installation process.  If installing on MS Windows NT, 2000, XP, or newer
349we recommend you run the installer as administrator (or as a
350user with administrator rights) so that the file associations
351can be set up for all users.
352</Para>
353
354<Para>
355The survey viewer that's part of <Application>Survex</Application> is called aven, and uses OpenGL
356for 3d rendering.
357OpenGL comes as standard as of Windows 98, and was included in the
358OSR2 update to Windows 95.  It's also possible that you've installed
359OpenGL with another application already (especially a 3D game like Quake).
360If you can view a survey in aven, all is well.  Otherwise you can
361<ulink url="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q154877
362">download OpenGL drivers from Microsoft's website</ulink> (or here's
363a <ulink url="http://download.microsoft.com/download/win95upg/info/1/W95/EN-US/Opengl95.exe">direct link to the file you actually need</ulink>).
364</Para>
365
366<Para>
367If you find that 3D rendering is sometimes very slow (e.g. one user reported
368very slow performance when running full screen, while running in a window
369was fine) then try installing the OpenGL driver supplied by the manufacturer
370of your graphics card rather than the driver Microsoft supply.
371</Para>
372
373<Para>
374The installer creates a Survex group in the Programs sub-menu of the
375Start menu containing the following items:
376</Para>
377
378<ItemizedList>
379
380<ListItem><Para>Aven</Para></ListItem>
381
382<ListItem><Para>Documentation</Para></ListItem>
383
384<ListItem><Para>Uninstall Survex</Para></ListItem>
385
386</ItemizedList>
387
388<Para>
389Icons are installed for <filename>.svx</filename>, <filename>.3d</filename>, <filename>.err</filename>, and <filename>.pos</filename> files, and also for
390Compass Plot files (<filename>.plt</filename> and <filename>.plf</filename>)
391(which Survex can read). <!-- FIXME XYZ -->
392Double-clicking on a <filename>.svx</filename> file loads it for editing.  To process it to
393produce a <filename>.3d</filename> file, right click and choose "Process" from the menu.
394Double-clicking the resultant <filename>.3d</filename> file views it in aven.
395All the <Application>Survex</Application> file types can be right clicked on to give a menu of
396possible actions. 
397</Para>
398
399<VariableList>
400<VarListEntry><Term><filename>.svx</filename></Term>
401<ListItem>
402  <VariableList>
403  <VarListEntry><Term>Open</Term>
404  <ListItem><Para>
405  Load file into SvxEdit
406  </Para></ListItem>
407  </VarListEntry>
408  <VarListEntry><Term>Process</Term>
409  <ListItem><Para>
410  Process file with cavern to produce <filename>.3d</filename> file (and <filename>.err</filename> file)
411  </Para></ListItem>
412  </VarListEntry>
413  </VariableList>
414</ListItem>
415</VarListEntry>
416   
417<VarListEntry><Term><filename>.3d</filename></Term>
418<ListItem>
419  <VariableList>
420  <VarListEntry><Term>Open</Term>
421  <ListItem><Para>
422  Load file into Aven
423  </Para></ListItem>
424  </VarListEntry>
425  <VarListEntry><Term>Print</Term>
426  <ListItem><Para>
427  Send to the printer
428  </Para></ListItem>
429  </VarListEntry>
430  <VarListEntry><Term>Extend</Term>
431  <ListItem><Para>
432  Produce extended elevation
433  </Para></ListItem>
434  </VarListEntry>
435  <VarListEntry><Term>Convert to DXF</Term>
436  <ListItem><Para>
437  Convert to a DXF file (suitable for importing into many CAD packages)
438  </Para></ListItem>
439  </VarListEntry>
440  <VarListEntry><Term>Convert for hand plotting</Term>
441  <ListItem><Para>
442  Produce a <filename>.pos</filename> file listing all the stations and their coordinates
443  </Para></ListItem>
444  </VarListEntry>
445  </VariableList>
446</ListItem>
447
448<VarListEntry><Term><filename>.err</filename></Term>
449<ListItem>
450  <VariableList>
451  <VarListEntry><Term>Open</Term>
452  <ListItem><Para>
453  Load file into Notepad
454  </Para></ListItem>
455  </VarListEntry>
456  <VarListEntry><Term>Sort by Error</Term>
457  <ListItem><Para>
458  Sort <filename>.err</filename> file by the error in each traverse
459  </Para></ListItem>
460  </VarListEntry>
461  <VarListEntry><Term>Sort by Horizontal Error</Term>
462  <ListItem><Para>
463  Sort <filename>.err</filename> file by the horizontal error in each traverse
464  </Para></ListItem>
465  </VarListEntry>
466  <VarListEntry><Term>Sort by Vertical Error</Term>
467  <ListItem><Para>
468  Sort <filename>.err</filename> file by the vertical error in each traverse
469  </Para></ListItem>
470  </VarListEntry>
471  <VarListEntry><Term>Sort by Percentage Error</Term>
472  <ListItem><Para>
473  Sort <filename>.err</filename> file by the percentage error in each traverse
474  </Para></ListItem>
475  </VarListEntry>
476  <VarListEntry><Term>Sort by Error per Leg</Term>
477  <ListItem><Para>
478  Sort <filename>.err</filename> file by the error per leg in each traverse
479  </Para></ListItem>
480  </VarListEntry>
481  </VariableList>
482</ListItem>
483</VarListEntry>
484</VariableList>
485
486</Sect3>
487
488</Sect2>
489
490<Sect2><Title>Configuration</Title>
491
492<Sect3><Title>Selecting Your Preferred Language</Title>
493
494<Para>Survex has extensive internationalisation capabilities.  The
495language used for messages from Survex and most of the library calls
496it uses can be changed.  By default this is picked up from the
497language the operating system is set to use (from "Regional Settings"
498in Control Panel on Microsoft Windows, from the
499<systemitem>LANG</systemitem> environment variable on UNIX
500If no setting
501is found, or <Application>Survex</Application> hasn't been translated into the
502requested language, UK English is used.</Para>
503
504<Para>
505However you may want to override the language manually -
506for example if Survex isn't available in your native language
507you'll want to choose the supported language you understand best.
508</Para>
509
510<Para>
511To do this, you set the
512<systemitem>SURVEXLANG</systemitem> environment variable.  Here's a list
513of the codes currently supported:</Para>
514
515<informaltable frame="all">
516<tgroup cols="2">
517<thead>
518<row><entry>Code</entry><entry>Language</entry></row>
519</thead>
520<tbody>
521<row><entry>en</entry><entry>International English</entry></row>
522<row><entry>en_US</entry><entry>US English</entry></row>
523<row><entry>bg</entry><entry>Bulgarian</entry></row>
524<row><entry>ca</entry><entry>Catalan</entry></row>
525<row><entry>de</entry><entry>German</entry></row>
526<row><entry>de_CH</entry><entry>Swiss German</entry></row>
527<row><entry>el</entry><entry>Greek</entry></row>
528<row><entry>es</entry><entry>Spanish</entry></row>
529<row><entry>fr</entry><entry>French</entry></row>
530<row><entry>hu</entry><entry>Hungarian</entry></row>
531<row><entry>id</entry><entry>Indonesian</entry></row>
532<row><entry>it</entry><entry>Italian</entry></row>
533<row><entry>pl</entry><entry>Polish</entry></row>
534<row><entry>pt</entry><entry>Portuguese</entry></row>
535<row><entry>pt_BR</entry><entry>Brazillian Portuguese</entry></row>
536<row><entry>ro</entry><entry>Romanian</entry></row>
537<row><entry>ru</entry><entry>Russian</entry></row>
538<row><entry>sk</entry><entry>Slovak</entry></row>
539<row><entry>zh_CN</entry><entry>Chinese (Simplified)</entry></row>
540</tbody>
541</tgroup>
542</informaltable>
543
544<Para>Here are examples of how to set this environment variable to give
545messages in French (language code fr):</Para>
546
547<VariableList>
548 <VarListEntry><Term>Microsoft Windows</Term>
549   <ListItem><Para>
550For MS Windows 95 and 98 (and probably ME), you'll need to add a line
551containing <command>SET SURVEXLANG=fr</command> to your
552<filename>AUTOEXEC.BAT</filename> script.  You need to
553reboot for the change to take effect.
554</Para>
555
556<Para>For MS Windows NT4, 2000, and XP, you should proceed as follows
557(this description is written from MS Windows 2000 - it should be similar on
558NT4 and XP): Open the Start Menu, navigate to the Settings sub-menu, and
559open Control Panel.  Open System (picture of a computer) and click on the
560Advanced tab.  Choose `Environmental Variables', and create a new one: name
561<systemitem>SURVEXLANG</systemitem>, value <systemitem>fr</systemitem>.
562Click OK and the new value should be effective immediately.
563   </Para></ListItem>
564 </VarListEntry>
565 <VarListEntry><Term>UNIX - csh/tcsh</Term>
566   <ListItem><Para><userinput>setenv SURVEXLANG fr</userinput></Para></ListItem>
567 </VarListEntry>
568 <VarListEntry><Term>UNIX - sh/bash</Term>
569   <ListItem><Para><userinput>SURVEXLANG=fr ; export SURVEXLANG</userinput></Para></ListItem>
570 </VarListEntry>
571</VariableList>
572
573<Para>If <Application>Survex</Application> isn't available in your language, you could
574help out by providing a translation.  The initial translation is
575likely to be about a day's work; after that translations for
576new or changed messages are occasionally required.  Contact us for details
577if you're interested.</Para>
578
579</Sect3>
580
581</Sect2>
582
583</Sect1>
584
585<!-- FIXME
586
587type in .svx file
588
589run cavern (through aven)
590
591run aven
592
593how to print/export etc
594
595-->
596
597<!-- FIXME perhaps move this after data files section? -->
598<Sect1><Title>Survex Programs</Title>
599<?dbhtml filename="cmdline.htm">
600
601<Sect2><Title>Standard Options</Title>
602
603<Para>All <Application>Survex</Application> programs respond to the following command line options:
604</Para>
605
606<VariableList>
607
608<VarListEntry><Term>--help</Term><listitem><Para>
609display option summary and exit
610</Para></listitem></VarListEntry>
611
612<VarListEntry><Term>--version</Term><listitem><Para>
613output version information and exit
614</Para></listitem></VarListEntry>
615
616</VariableList>
617
618</Sect2>
619
620<Sect2><Title>Short and Long Options</Title>
621
622<Para>
623Options have two forms: short (a dash followed by a single letter e.g.
624<command>cavern -p</command>) and long (two dashes followed by one or more words e.g.
625<command>cavern --percentage</command>).  The long form is generally easier to
626remember, while the short form is quicker to type.  Options are often
627available in both forms.
628</Para>
629
630<Note><Para>Command line options are case sensitive, so "-B" and "-b"
631are different (this didn't used to be the case before Survex 0.90).  Case
632sensitivity doubles the number of available short options (and is also the
633norm on UNIX).
634</Para></Note>
635</Sect2>
636
637<Sect2><Title>Filenames on the Command Line</Title>
638
639<Para>Filenames with spaces can be processed (provided your operating system
640supports them - UNIX does, and so do recent versions of Microsoft
641Windows).  You need to enclose the filename in quotes like so:
642<userinput>cavern "Spider Cave"</userinput>
643</Para>
644
645<Para>A file specified on the command line of any of the <Application>Survex</Application> suite
646of programs will be looked for as specified.  If it is not found, then the
647file is looked for with the appropriate extension appended.  So
648<userinput>cavern survey</userinput> will look first for
649<filename>survey</filename>, then for <filename>survey.svx</filename>.
650</Para>
651
652</Sect2>
653
654<Sect2><title>Command Reference</title>
655
656<refentry id="cavern">
657<?dbhtml filename="cavern.htm">
658&man.cavern;
659</refentry>
660<refentry id="svxedit">
661<?dbhtml filename="svxedit.htm">
662&man.svxedit;
663</refentry>
664<refentry id="aven">
665<?dbhtml filename="aven.htm">
666&man.aven;
667</refentry>
668<refentry id="x3dtopos">
669<?dbhtml filename="3dtopos.htm">
670&man.3dtopos;
671</refentry>
672<refentry id="cad3d">
673<?dbhtml filename="cad3d.htm">
674&man.cad3d;
675</refentry>
676<refentry id="diffpos">
677<?dbhtml filename="diffpos.htm">
678&man.diffpos;
679</refentry>
680<refentry id="extend">
681<?dbhtml filename="extend.htm">
682&man.extend;
683</refentry>
684<refentry id="sorterr">
685<?dbhtml filename="sorterr.htm">
686&man.sorterr;
687</refentry>
688
689</Sect2>
690
691</Sect1>
692
693<Sect1><Title><Application>Survex</Application> data files</Title>
694<?dbhtml filename="datafile.htm">
695
696<Para>Survey data is entered in the form of text files. You can use any
697text editor you like for this, so long as it has the capability of
698writing a plain ASCII text file. The data format is very flexible;
699unlike some other cave surveying software, Survex does not require
700survey legs to be rearranged to suit the computer, and the ordering
701of instrument readings on each line is fully specifiable.  So you can enter
702your data much as it appears on the survey notes, which is important
703in reducing the opportunities for transcription errors.
704</Para>
705
706<Para>
707Also all the special characters are user-definable - for example,
708the separators can be spaces and tabs, or commas (e.g. when exporting from a
709spreadsheet), etc; the decimal point can be a slash (for clarity), a comma
710(as used in continental Europe), or anything else you care to choose.
711This flexibility
712means that it should be possible to read in data from almost any sort of
713survey data file without much work.
714</Para>
715
716<Para><Application>Survex</Application> places no restrictions on you in terms of the ordering
717of survey legs. You can enter or process data in any order and <Application>Survex</Application> will
718read it all in before determining how it is connected. You can also use the
719hierarchical naming so that you do not need to worry about using the same
720station name twice.
721</Para>
722
723<!-- FIXME don't encourage separate processing -->
724<Para>The usual arrangement is to have one file which lists all the others
725that are included (e.g., <filename>161.svx</filename>). Then
726<command>cavern 161</command> will process all your data. To just process a
727section use the filename for that section, e.g. <command>cavern dtime</command>
728will process the dreamtime file/section of Kaninchenh&ouml;hle.  To
729help you out, if all legs in a survey are connected to one another
730but the survey has no fixed points, cavern
731will 'invent' a fixed point and print a warning message to this
732effect.
733</Para>
734
735<Para>
736It is up to you what data you put in which files.  You
737can have one file per trip, or per area of the cave, or just one
738file for the whole cave if you like.
739On a large survey project it makes sense to group related surveys in the
740same file or directory.
741</Para>
742<!-- FIXME: wook sez:
743
744 Point out in documentation that file structure and survey structure don't
745 have to be the same.  And in particular that folder/directory names can be
746 different.
747
748Which is partly covered above, though the last bit isn't...
749-->
750
751<!-- FIXME "Anatomy of a Survey" section -->
752<Sect2><Title>Readings</Title>
753
754<Para>Blank lines (i.e. lines consisting solely of BLANK characters)
755are ignored. The last line in the file need not be terminated by
756an end of line character. All fields on a line must be separated
757by at least one BLANK character. An OMIT character
758(default '-') indicates that a field is unused. If the field is
759not optional, then an error is given.
760</Para>
761
762</Sect2>
763
764<Sect2><Title>Survey Station Names</Title>
765
766<Para><Application>Survex</Application> has a powerful system for naming stations.  It
767uses a hierarchy of survey names, similar to the nested folders
768your computer stores files in.
769So point 6 in the entrance survey of Kaninchenh&ouml;hle
770(cave number 161) is referred to as: 161.entrance.6
771</Para>
772
773<Para>This seems a natural way to refer to station names.  It also
774means that it is very easy to include more levels, for example if you
775want to plot all the caves in the area you just list them all in
776another file, specifying a new prefix.  So to group 3 nearby caves
777on the Loser Plateau you would use a file like
778this:
779</Para>
780
781<programlisting>
782*begin Loser
783*include 161
784*include 2YrGest
785*include 145
786*end Loser</programlisting>
787
788<Para>
789The entrance series point mentioned above would now be referred
790to as: Loser.161.entrance.6
791</Para>
792
793<!--
794<Para>This may seem a tad complex but is really very natural once you
795get the hang of it.
796</Para>
797-->
798<Para>You do not have to use this system at all, and can just give all
799stations unique identifiers if you like:
800</Para>
801
802<Para>1, 2, 3, 4, 5, ... 1381, 1382
803</Para>
804
805<Para>or
806</Para>
807
808<Para>AA06, AA07, P34, ZZ6, etc.
809</Para>
810
811<!-- FIXME:
812<Para>However you'll loose the ability to handle subsurveys if you do.
813</Para>
814-->
815
816<Para>Station and survey names may contain any alphanumeric characters and
817additionally any characters in NAMES (default `_' and `-'). Alphabetic
818characters may be forced to upper or lower case by using the *case
819command. Station names may be any length - if you want to only treat
820the first few characters as significant you can get cavern to truncate
821the names using the *truncate command.
822</Para>
823
824</Sect2>
825
826<Sect2><Title>Numeric fields</Title>
827
828<Para>[&lt;MINUS&gt;|&lt;PLUS&gt;] &lt;integer part&gt; [ &lt;DECIMAL&gt;
829[ &lt;decimal fraction&gt; ] ]
830</Para>
831
832<Para>
833or [&lt;MINUS&gt;|&lt;PLUS&gt;] &lt;DECIMAL&gt; &lt;dec fraction&gt;
834</Para>
835
836<Para><!-- FIXME: put informal description first -->
837i.e. optional PLUS or MINUS sign in front, with
838optional DECIMAL character (default '.'), which may be
839embedded, leading or trailing. No spaces are allowed between the
840various elements.
841</Para>
842
843<Para>
844All of these are valid examples: +47, 23, -22, +4.5, 1.3, -0.7, +.15, .4,
845-.05
846</Para>
847
848</Sect2>
849
850<Sect2><Title>Accuracy</Title>
851
852<Para>Accuracy assessments may be provided or defaulted for any survey
853leg. These determine the distribution of loop closure errors over the
854legs in the loop. See *SD for more information.
855</Para>
856
857</Sect2>
858
859<!--
860<Sect2><Title>Survey Coordinate Range</Title>
861
862<Para>
863If we store distances to nearest 10um (0.01mm) in 4 bytes, this
864gives a range of ~20 km. This method is currently not used, but
865has several advantages (data storage space [double uses 8 bytes
866- with my C compiler], speed (unless your FP chip works in parallel
867with your CPU [e.g. the new Acorn FPU for the ARM], and numerical
868accuracy [compared to using floats at least]) and so may be adopted
869in future). Nearest 0.1mm gives -200 km, which is enough for most
870people, but may mean rounding errors become significant.
871</Para>
872
873<Para>
874I will have to do some sums...
875</Para>
876
877</Sect2>
878
879-->
880
881<Sect2><Title>Cavern Commands</Title>
882
883<Para>Commands in <filename>.svx</filename> files are introduced by an asterisk
884(by default - this can be changed using the <command>set</command> command).
885</Para>
886
887<Para>The commands are documented in a common format:
888</Para>
889
890<!-- FIXME: make this a RefGroup (or whatever that's called) of RefEntry-s? -->
891<itemizedlist>
892<listitem><para>Command Name</para></listitem>
893<listitem><para>Syntax</para></listitem>
894<listitem><para>Example</para></listitem>
895<listitem><para>Validity</para></listitem>
896<!-- FIXME
897anywhere, in a block, at start of a block, after a begin (for *end)
898-->
899<listitem><para>Description</para></listitem>
900<listitem><para>Caveats</para></listitem>
901<listitem><para>See Also</para></listitem>
902<!-- FIXME
903"Usefulness" - or status maybe?
904deprecated, esoteric (*set), useful, vital
905-->
906</itemizedlist>
907
908<Sect3><Title>ALIAS</Title>
909
910<VariableList>
911
912<VarListEntry><Term>Syntax</Term>
913
914<listitem><Para>*alias station &lt;alias&gt; [&lt;target&gt;]</Para></listitem>
915
916</VarListEntry>
917
918<VarListEntry><Term>Example</Term>
919
920<listitem>
921<Para>
922<programlisting>
923*begin parsons_nose
924*alias station - ..
9251 2 12.21 073 -12
9262 -  4.33 011 +02
9272 -  1.64 180 +03
9282 3  6.77 098 -04
929*end parsons_nose</programlisting>
930</Para>
931</listitem>
932
933</VarListEntry>
934
935<VarListEntry><Term>Description</Term>
936
937<listitem><Para>*alias allows you to map a station name which appears in
938the survey data to a different name internally.  At present, you can only
939create an alias of '-' to '..', which is intended to support the pocket topo
940style notation of '-' being a splay to an anonymous point on the cave wall.
941And you can unalias '-' with '*alias station -'.
942</Para>
943
944<Para>
945Aliases are scoped by *begin/*end blocks - when a *end is reached, the aliases
946in force at the corresponding begin are restored.
947</Para>
948
949<Para>
950*alias was added in Survex 1.2.7.
951</Para></listitem>
952
953</VarListEntry>
954
955<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
956
957<VarListEntry><Term>See Also</Term>
958
959<listitem><Para>*begin, *end</Para></listitem>
960
961</VarListEntry>
962
963</VariableList>
964
965</Sect3>
966
967<Sect3><Title>BEGIN</Title>
968
969<VariableList>
970
971<VarListEntry><Term>Syntax</Term>
972
973<listitem><Para>*begin [&lt;survey&gt;]</Para></listitem>
974
975</VarListEntry>
976
977<VarListEntry><Term>Example</Term>
978
979<listitem>
980<Para>
981<programlisting>
982*begin littlebit
9831 2 10.23 106 -02
9842 3  1.56 092 +10
985*end littlebit</programlisting>
986
987<programlisting>
988; length of leg across shaft estimated
989*begin
990*sd tape 2 metres
9919 10 6.   031 -07
992*end</programlisting>
993</Para>
994</listitem>
995
996</VarListEntry>
997
998<VarListEntry><Term>Description</Term>
999
1000<listitem><Para>*begin stores the current values of the current settings
1001such as instrument calibration, data format, and so on.
1002These stored values are restored after the corresponding *end.
1003If a survey name is given, this is used inside the *begin/*end block,
1004and the corresponding *end should have the same survey name.
1005*begin/*end blocks may be nested to indefinite depth.
1006</Para></listitem>
1007
1008</VarListEntry>
1009
1010<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1011
1012<VarListEntry><Term>See Also</Term>
1013
1014<listitem><Para>*end, *prefix</Para></listitem>
1015
1016</VarListEntry>
1017
1018</VariableList>
1019
1020</Sect3>
1021
1022<Sect3><Title>CALIBRATE</Title>
1023
1024<VariableList>
1025
1026<VarListEntry><Term>Syntax</Term>
1027
1028<listitem>
1029<Para>*calibrate &lt;quantity list&gt; &lt;zero error&gt; [&lt;scale&gt;]
1030</Para>
1031<Para>*calibrate default
1032</Para>
1033</listitem>
1034
1035</VarListEntry>
1036
1037<VarListEntry><Term>Example</Term>
1038
1039<listitem>
1040<Para>
1041<programlisting>
1042*calibrate tape +0.3
1043</programlisting>
1044</Para>
1045</listitem>
1046
1047</VarListEntry>
1048
1049<VarListEntry><Term>Description</Term>
1050
1051<listitem>
1052
1053<Para>
1054*calibrate is used to specify instrument calibrations.
1055</Para>
1056
1057<Para>
1058&lt;quantity&gt; is one of TAPE|COMPASS|CLINO|COUNTER|DEPTH|DECLINATION|X|Y|Z
1059</Para>
1060
1061<Para>
1062Several quantities can be given in &lt;quantity list&gt;
1063</Para>
1064
1065<Para>
1066Value = ( Reading - ZeroError ) * Scale    (Scale defaults to 1.0)
1067</Para>
1068
1069<Para>
1070You need to be careful about the sign of the ZeroError. The value of
1071ZeroError is what the the instrument would read when measuring a
1072reading which should be zero.  So for example, if your tape measure
1073has the end missing, and you are using the 30cm mark to take all
1074measurements from, then a zero distance would be measured as 30cm and
1075you would correct this with:
1076</Para>
1077
1078<programlisting>*CALIBRATE tape +0.3</programlisting>
1079
1080<Para>If you tape was too long, starting at -20cm (it does happen!)
1081then you can correct it with:
1082</Para>
1083
1084<programlisting>*CALIBRATE tape -0.2</programlisting>
1085
1086<Para>Note: ZeroError is irrelevant for Topofil counters and depth
1087gauges since pairs of readings are subtracted.
1088</Para>
1089
1090<Para>
1091The magnetic deviation varies from year to year and it is often
1092desirable to keep the compass zero error and the magnetic deviation
1093separate. cavern calculates the true bearing as follows:
1094</Para>
1095
1096<Para>
1097(magnetic bearing) = ((reading)-(compass zero err)) * (compass
1098scale factor)
1099</Para>
1100
1101<Para>
1102(true bearing) = ((bearing)-(declination zero err))
1103</Para>
1104
1105<Para>
1106The scale factor for DECLINATION must be 1.0, otherwise an error
1107is given. <!-- FIXME: practical example for declination -->
1108</Para>
1109
1110<Para>
1111The default is all quantities calibrated to scale factor 1.0,
1112zero error 0.0
1113</Para>
1114
1115</listitem>
1116
1117</VarListEntry>
1118
1119<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1120
1121<VarListEntry><Term>See Also</Term>
1122
1123<listitem><Para>*units</Para></listitem>
1124
1125</VarListEntry>
1126
1127</VariableList>
1128
1129</Sect3>
1130
1131<Sect3><Title>CASE</Title>
1132
1133<VariableList>
1134
1135<VarListEntry><Term>Syntax</Term>
1136
1137<listitem><para>*case preserve|toupper|tolower</para></listitem>
1138
1139</VarListEntry>
1140
1141<VarListEntry><Term>Example</Term>
1142
1143<listitem>
1144<Para>
1145<programlisting>
1146*begin bobsbit
1147; Bob insists on using case sensitive station names
1148*case preserve
11491 2   10.23 106 -02
11502 2a   1.56 092 +10
11512 2A   3.12 034 +02
11522 3    8.64 239 -01
1153*end bobsbit</programlisting>
1154</Para>
1155</listitem>
1156
1157</VarListEntry>
1158
1159<VarListEntry><Term>Description</Term>
1160
1161<listitem><Para>*case determines how the case of letters in survey names is
1162handled.  By default all names are forced to lower case (which gives a case
1163insensitive match, but you can tell cavern to force to upper case, or leave
1164the case as is (in which case '2a' and '2A' will be regarded as different).
1165</Para></listitem>
1166
1167</VarListEntry>
1168
1169<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1170
1171<!-- <VarListEntry><Term>See Also</Term>
1172
1173<listitem><Para>*end, *prefix</Para></listitem>
1174
1175</VarListEntry>
1176-->
1177
1178</VariableList>
1179
1180<!-- FIXME - work this text in here or elsewhere
1181
1182What I mean (though failed to express very well) is that a dataset without
1183this information isn't the same dataset (in general anyway).  For example:
1184
1185A1 a2 10.32 140 -05
1186a2 a3  4.91 041 -01
1187a1 a3  7.01 206  02
1188
1189is either a traverse of 3 legs or a (probably badly misclosed) loop.  If
1190these names are on the original survey notes, the surveyors ought to say
1191whether "A1" is the same as "a1" (although the usual case for using this
1192feature is probably for importing data from elsewhere).  Similarly for
1193truncation.  Whether a clino of +/-90 degrees (or +/-100 grad, etc) is
1194interpreted as a plumb is something that should have been noted in the cave
1195(unless it's implicit because it's standard practice for a survey project).
1196
1197It's a similar issue to calibration data in many ways.  You can argue it's
1198not part of "the survey", but without it the survey won't be the same shape,
1199and it's not useful to process the same survey with different settings for
1200compass calibration or name case sensitivity.
1201
1202>Clearly that is unhelpfully strict, but it is
1203>important to be semantically clear about what is 'data' and what is 'commands
1204>or meta-data' which describe what to do with/how to interpret that data.
1205
1206Think of the lines starting with a "*" as "command or meta-data".
1207
1208>The most-correct solution to this is (I believe) Martin Heller's idea about
1209>including 'rules' in the datastream, but that's too big a subject for right
1210>now.
1211>
1212>The reason '-C' was made into a command-line option, was that it made very
1213>little sense to change it part way though a dataset. What exactly happens if
1214>you suddenly tell cavern to become case-sensitive halfway through a run?
1215
1216-C has always had 3 settings - "leave case alone", "force to lower", and
1217"force to upper".  It doesn't really mean "case sensitivity" but rather
1218something like "case processing".  So you can usefully change it during a
1219run.  So if my dataset treats "NoTableChamber" (so named because it was
1220lacking in furniture) as different from "NotableChamber" (which was notable
1221for other reasons) I can process it with a dataset from someone else which
1222needs to be treated as case insensitive like so:
1223
1224*begin my_cave
1225*include my_dataset
1226*end my_cave
1227
1228*equate my_cave.NoTableChamber.14 your_cave.linkpassage.13
1229
1230*begin your_cave
1231*case tolower
1232*include your_dataset
1233*end your_cave
1234
1235You may be thinking of -U<n>, which used to mean "only compare the first n
1236characters of station names", but that doesn't allow arbitrary datasets to
1237be processed together.
1238
1239So we changed it to mean "truncate station names to n characters", and
1240allowed it to be changed at any point, rather than being set once for the
1241whole run.
1242
1243-->
1244
1245</Sect3>
1246
1247<Sect3><Title>COPYRIGHT</Title>
1248
1249<VariableList>
1250
1251<VarListEntry><Term>Syntax</Term>
1252
1253<listitem><Para>*copyright &lt;date&gt; &lt;text&gt;</Para></listitem>
1254
1255</VarListEntry>
1256
1257<VarListEntry><Term>Example</Term>
1258
1259<listitem>
1260<Para>
1261<programlisting>
1262*begin littlebit
1263*copyright 1983 CUCC
12641 2 10.23 106 -02
12652 3  1.56 092 +10
1266*end littlebit</programlisting>
1267</Para>
1268</listitem>
1269
1270</VarListEntry>
1271
1272<VarListEntry><Term>Validity</Term>
1273
1274<listitem><Para>valid at the start of a *begin/*end block.
1275</Para></listitem>
1276
1277</VarListEntry>
1278
1279<VarListEntry><Term>Description</Term>
1280
1281<listitem><Para>*copyright allow the copyright information to be
1282stored in a way that can be automatically collated.
1283</Para></listitem>
1284
1285</VarListEntry>
1286
1287<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1288
1289<VarListEntry><Term>See Also</Term>
1290
1291<listitem><Para>*begin</Para></listitem>
1292
1293</VarListEntry>
1294
1295</VariableList>
1296
1297</Sect3>
1298
1299<Sect3><Title>CS</Title>
1300
1301<VariableList>
1302
1303<VarListEntry><Term>Syntax</Term>
1304
1305<listitem><Para>*cs [out] &lt;coordinate system&gt;</Para></listitem>
1306
1307</VarListEntry>
1308
1309<VarListEntry><Term>Example</Term>
1310
1311<listitem>
1312<Para>
1313<programlisting>
1314*cs UTM60S
1315*fix beehive 313800 5427953 20</programlisting>
1316</Para>
1317
1318<Para>
1319<programlisting>
1320; Output in the coordinate system used in the Totes Gebirge in Austria
1321*cs out custom "+proj=tmerc +lat_0=0 +lon_0=13d20 +k=1 +x_0=0 +y_0=-5200000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232"</programlisting>
1322</Para>
1323</listitem>
1324
1325</VarListEntry>
1326
1327<VarListEntry><Term>Description</Term>
1328
1329<listitem><Para>*cs allows the coordinate systems used for fixed points and for
1330processed survey data to be specified.
1331</Para>
1332
1333<Para>
1334*cs was added in Survex 1.2.14.  The currently supported coordinate systems
1335are:
1336</Para>
1337
1338<Para>CUSTOM followed by a PROJ4 string (like in the example above).</Para>
1339
1340<Para>EPSG: followed by a positive integer code.  EPSG codes cover most
1341coordinate systems in use, and PROJ supports many of these.  The website
1342<ulink url="http://epsg.io/">http://epsg.io/</ulink> is a useful resource for
1343finding the EPSG code you want.  Supported since Survex 1.2.15.</Para>
1344
1345<Para>ESRI: followed by a positive integer code.  ESRI codes are used by
1346ArcGIS to specify coordinate systems (in a similar way to EPSG codes), and PROJ
1347supports many of them.  Supported since Survex 1.2.15.</Para>
1348
1349<Para>EUR79Z30 for UTM zone 30, EUR79 datum.  Supported since Survex 1.2.15.
1350</Para>
1351
1352<Para>IJTSK for the modified version of the Czechoslovak S-JTSK system where
1353the axes point East and North.  Supported since Survex 1.2.15.</Para>
1354
1355<Para>IJTSK03 for a variant of IJTSK.  Supported since Survex 1.2.15.</Para>
1356
1357<Para>JTSK for the Czechoslovak S-JTSK system.  The axes on this point West
1358and South, so it's not support as an output coordinate system.
1359Supported since Survex 1.2.16.</Para>
1360
1361<Para>JTSK03 for a variant of JTSK.  Supported since Survex 1.2.16.</Para>
1362
1363<Para>LONG-LAT for longitude/latitude.  The WGS84 datum is assumed.  Supported
1364since Survex 1.2.15.</Para>
1365
1366<Para>OSGB: followed by a two letter code for the UK Ordnance Survey National
1367Grid.  The first letter should be 'H', 'N', 'O', 'S' or 'T'; the second any
1368letter except 'I'.  Supported since Survex 1.2.15.</Para>
1369
1370<Para>S-MERC for the "Web Mercator" spherical mercator projection, used by
1371online map sites like OpenStreetMap, Google maps, Bing maps, etc.  Supported
1372since Survex 1.2.15.
1373</Para>
1374
1375<Para>UTM followed by a zone number (1-60), optionally followed by "N" or "S"
1376(default is North).  The WGS84 datum is assumed.</Para>
1377
1378<Para>
1379By default, Survex works in an unspecified coordinate system (and this was the
1380only option before *cs was added).  However, it's useful for coordinate system
1381which the processed survey data is in to be specified if you want to use the
1382processed data in ways which required knowing the coordinate system (such as
1383exporting a list of entrances for use in a GPS).  You can now do this by using
1384"*cs out".
1385</Para>
1386
1387<Para>
1388It is also useful to be able to take coordinates for fixed points in whatever
1389coordinate system you receive them in and put them directly into Survex, rather
1390than having to convert with an external tool.  For example, you may have your
1391GPS set to show coordinates in UTM with the WGS84 datum, even though you want
1392the processed data to be in some local coordinate system.  And someone else
1393may provide GPS coordinates in yet another coordinate system.  You just need
1394to set the appropriate coordinate system with "*cs" before each group of "*fix"
1395commands in a particular coordinate system.
1396</Para>
1397
1398<Para>
1399If you're going to make use of "*cs", then the coordinate system must be
1400specified for everything, so a coordinate system must be in effect for all
1401"*fix" commands, and you must set the output coordinate system before any
1402points are fixed.
1403</Para>
1404
1405<Para>
1406Also, if "*cs" is in use, then you can't omit the coordinates in a "*fix"
1407command, and a fixed point won't be invented if none exists.
1408</Para>
1409
1410<Para>
1411If you use "*cs out" more than once, the second and subsequent commands are
1412silently ignored - this makes it possible to combine two datasets with
1413different "*cs out" settings without having to modify either of them.
1414</Para>
1415
1416<Para>
1417Something to be aware of with "*cs" is that altitudes are currently assumed to
1418be "height above the ellipsoid", whereas GPS units typically give you "height
1419above sea level", or more accurately "height above a particular geoid".  This
1420is something we're looking at how best to address, but you shouldn't need to
1421worry about it if your fixed points are in the same coordinate system as your
1422output, or if they all use the same ellipsoid.  For a more detailed discussion
1423of this, please see: http://expo.survex.com/handbook/survey/coord.htm
1424</Para>
1425</listitem>
1426
1427</VarListEntry>
1428
1429<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1430
1431<VarListEntry><Term>See Also</Term>
1432
1433<listitem><Para>*fix</Para></listitem>
1434
1435</VarListEntry>
1436
1437</VariableList>
1438
1439</Sect3>
1440<Sect3><Title>DATA</Title>
1441
1442<VariableList>
1443
1444<VarListEntry><Term>Syntax</Term>
1445
1446<listitem><Para>*data &lt;style&gt; &lt;ordering&gt;</Para></listitem>
1447<!-- BACKCOMPASS BACKCLINO -->
1448</VarListEntry>
1449
1450<VarListEntry><Term>Example</Term>
1451
1452<listitem>
1453<Para>
1454<programlisting>
1455*data normal from to compass tape clino</programlisting>
1456</Para>
1457
1458<Para>
1459<programlisting>
1460*data normal station ignoreall newline compass tape clino</programlisting>
1461</Para>
1462</listitem>
1463
1464</VarListEntry>
1465
1466<VarListEntry><Term>Description</Term>
1467
1468<listitem><Para>
1469&lt;style&gt; = DEFAULT|NORMAL|DIVING|CARTESIAN|TOPOFIL|CYLPOLAR|NOSURVEY|PASSAGE
1470</Para>
1471
1472<Para>
1473&lt;ordering&gt; = ordered list of instruments - which are valid depends on the
1474style.
1475</Para>
1476
1477<Para>
1478In Survex 1.0.2 and later, TOPOFIL is simply a synonym for NORMAL, left in to
1479allow older data to be processed without modification.  Use the name NORMAL
1480by preference.
1481</Para>
1482
1483<Para>
1484There are two variants of each style - interleaved and non-interleaved.
1485Non-interleaved is "one line per leg", interleaved has a line for the data
1486shared between two legs (e.g. STATION=FROM/TO, DEPTH=FROMDEPTH/TODEPTH,
1487COUNT=FROMCOUNT/TOCOUNT).  Note that not all interleavable readings have to
1488be interleaved - for example:
1489
1490<programlisting>
1491*data diving station newline fromdepth compass tape todepth</programlisting>
1492
1493In addition, interleaved data can have a DIRECTION reading, which can be "F"
1494for a foresight or "B" for a backsight.
1495</Para>
1496
1497<Para>
1498In NORMAL, DIVING, and CYLPOLAR data styles, TAPE may be replaced by
1499FROMCOUNT/TOCOUNT (or COUNT in interleaved data) to allow processing of surveys
1500performed with a Topofil instead of a tape.
1501</Para>
1502
1503<VariableList>
1504
1505<VarListEntry><Term>DEFAULT</Term>
1506<listitem><Para>Select the default data style and ordering (NORMAL style, ordering: from to tape compass clino).</Para></listitem>
1507</VarListEntry>
1508
1509<VarListEntry><Term>NORMAL</Term>
1510<listitem><Para>The usual tape/compass/clino centreline survey.
1511For non-interleaved data the allowed readings are:
1512FROM TO TAPE COMPASS CLINO BACKCOMPASS BACKCLINO;
1513for interleaved data the allowed readings are:
1514STATION DIRECTION TAPE COMPASS CLINO BACKCOMPASS BACKCLINO.
1515The CLINO/BACKCLINO reading is not required - if it's not given, the vertical
1516standard deviation is taken to be proportional to the tape measurement.
1517Alternatively, individual clino readings can be given as OMIT (default "-")
1518which allows for data where only some clino readings are missing.
1519E.g.:
1520
1521<programlisting>
1522*data normal from to compass clino tape
15231 2 172 -03 12.61</programlisting>
1524
1525<programlisting>
1526*data normal station newline direction tape compass clino
15271
1528 F 12.61 172 -03
15292</programlisting>
1530
1531<programlisting>
1532*data normal from to compass clino fromcount tocount
15331 2 172 -03 11532 11873</programlisting>
1534
1535<programlisting>
1536*data normal station count newline direction compass clino
15371 11532
1538 F 172 -03
15392 11873</programlisting>
1540 
1541</Para></listitem>
1542</VarListEntry>
1543
1544<VarListEntry><Term>DIVING</Term>
1545<listitem><Para>
1546An underwater survey where the vertical information is from a diver's depth
1547gauge.  This style can also be also used for an above-water survey where the
1548altitude is measured with an altimeter.  DEPTH is defined as the altitude (Z)
1549so increases upwards by default.  So for a diver's depth gauge, you'll need to
1550use *CALIBRATE with a negative scale factor (e.g. *calibrate depth 0 -1).
1551</Para>
1552
1553<Para>For non-interleaved data the allowed readings are:
1554FROM TO TAPE COMPASS BACKCOMPASS FROMDEPTH TODEPTH DEPTHCHANGE (the vertical
1555can be given as readings at each station, (FROMDEPTH/TODEPTH) or as a change
1556along the leg (DEPTHCHANGE)).</Para>
1557
1558<Para>For interleaved data the allowed readings are:
1559STATION DIRECTION TAPE COMPASS BACKCOMPASS DEPTH DEPTHCHANGE.
1560(the vertical change can be given as a reading at the station (DEPTH) or as a change along the leg (DEPTHCHANGE)).
1561
1562<programlisting>
1563*data diving from to tape compass fromdepth todepth
15641 2 14.7 250 -20.7 -22.4</programlisting>
1565
1566<programlisting>
1567*data diving station depth newline tape compass
15681 -20.7
1569 14.7 250
15702 -22.4</programlisting>
1571
1572<programlisting>
1573*data diving from to tape compass depthchange
15741 2 14.7 250 -1.7</programlisting>
1575</Para>
1576</listitem>
1577</VarListEntry>
1578
1579<VarListEntry><Term>CARTESIAN</Term>
1580<listitem><Para>
1581Cartesian data style allows you to specify the (x,y,z) changes between
1582stations.  It's useful for digitising surveys where the original survey
1583data has been lost and all that's available is a drawn up version.
1584
1585<programlisting>
1586*data cartesian from to northing easting altitude
15871 2 16.1 20.4 8.7</programlisting>
1588
1589<programlisting>
1590*data cartesian station newline northing easting altitude
15911
1592 16.1 20.4 8.7
15932</programlisting>
1594
1595<!--FIXME: dx dy dz-->
1596</Para>
1597
1598<Note><Para>
1599Cartesian data are relative to <emphasis>true</emphasis> North not
1600<emphasis>magnetic</emphasis> North (i.e. they are unaffected by
1601<command>*calibrate declination</command>).
1602</Para></Note>
1603</VarListEntry>
1604
1605<VarListEntry><Term>CYLPOLAR</Term>
1606<listitem><Para>
1607A CYLPOLAR style survey is very similar to a diving survey, except that the tape
1608is always measured horizontally rather than along the slope of the leg.
1609
1610<programlisting>
1611*data cypolar from to tape compass fromdepth todepth
16121 2 9.45 311 -13.3 -19.0</programlisting>
1613
1614<programlisting>
1615*data cylpolar station depth newline tape compass
16161 -13.3
1617 9.45 311
16182 -19.0</programlisting>
1619
1620<programlisting>
1621*data cylpolar from to tape compass depthchange
16221 2 9.45 311 -5.7</programlisting>
1623</Para></listitem>
1624</VarListEntry>
1625
1626<VarListEntry><Term>NOSURVEY</Term>
1627<listitem><Para>
1628A NOSURVEY survey doesn't have any measurements - it merely indicates that
1629there is line of sight between the pairs of stations.
1630
1631<programlisting>
1632*data nosurvey from to
16331 7
16345 7
16359 11</programlisting>
1636
1637<programlisting>
1638*data nosurvey station
16391
16407
16415
1642
1643*data nosurvey station
16449
164511</programlisting>
1646</Para></listitem>
1647</VarListEntry>
1648
1649<VarListEntry><Term>PASSAGE</Term>
1650<listitem><Para>
1651This survey style defines a 3D "tube" modelling a passage in the cave.
1652The tube uses the survey stations listed in the order listed.  It's
1653permitted to use survey stations which aren't directly linked by
1654the centre-line survey.  This can be useful - sometimes the centreline
1655will step sideways or up/down to allow a better sight for the next
1656leg and you can ignore the extra station.  You can also define tubes
1657along unsurveyed passages, akin to "nosurvey" legs in the centreline
1658data.</Para>
1659
1660<Para>This means that you need to split off side passages into seperate
1661tubes, and hence separate sections of passage data, starting with
1662a new *data command.</Para>
1663
1664<Para>
1665Simple example of how to use this data style (note the use of ignoreall
1666to allow a free-form text description to be given):
1667
1668<programlisting>
1669*data passage station left right up down ignoreall
16701  0.1 2.3 8.0 1.4  Sticking out point on left wall
16712  0.0 1.9 9.0 0.5  Point on left wall
16723  1.0 0.7 9.0 0.8  Highest point of boulder
1673</programlisting>
1674</Para>
1675</VarListEntry>
1676</VariableList>
1677
1678<Para>
1679IGNORE skips a field (it may be used any number of times),
1680and IGNOREALL may be used last to ignore the rest of the data line.
1681</Para>
1682
1683<Para>
1684LENGTH is a synonym for TAPE; BEARING for COMPASS; GRADIENT for CLINO; COUNT for COUNTER.<!--FIXME : others?-->
1685</Para>
1686
1687<Para>
1688The units of each quantity may be set with the UNITS command.
1689</Para>
1690
1691<!-- FIXME: plumbed diving legs -->
1692
1693<!--FIXME:
1694<Para>
1695Uses for CYLPOLAR:
1696Perhaps a Grade 3 survey, or when surveying with a level and stick (?)
1697[note - UBSS use it for the old County Clare data]
1698</Para>
1699-->
1700
1701</listitem>
1702
1703</VarListEntry>
1704
1705</VariableList>
1706
1707</Sect3>
1708
1709<Sect3><Title>DATE</Title>
1710<VariableList>
1711
1712<VarListEntry><Term>Syntax</Term>
1713
1714<listitem><Para>*date &lt;year&gt;[.&lt;month&gt;[.&lt;day&gt;]][-&lt;year&gt;[.&lt;month&gt;[.&lt;day&gt;]]]</Para></listitem>
1715
1716</VarListEntry>
1717
1718<VarListEntry><Term>Example</Term>
1719
1720<listitem>
1721<Para>
1722<programlisting>
1723*date 2001</programlisting>
1724
1725<programlisting>
1726*date 2000.10</programlisting>
1727
1728<programlisting>
1729*date 1987.07.27</programlisting>
1730
1731<programlisting>
1732*date 1985.08.12-1985.08.13</programlisting>
1733</Para>
1734</listitem>
1735
1736</VarListEntry>
1737
1738<VarListEntry><Term>Validity</Term>
1739
1740<listitem><Para>valid at the start of a *begin/*end block.
1741</Para></listitem>
1742
1743</VarListEntry>
1744
1745<VarListEntry><Term>Description</Term>
1746
1747<listitem><Para>
1748*date specifies the date that the survey was done.  A range of dates
1749can be specified (useful for overnight or multi-day surveying trips).
1750</Para></listitem>
1751
1752</VarListEntry>
1753
1754<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1755
1756<VarListEntry><Term>See Also</Term>
1757
1758<listitem><Para>*begin, *instrument, *team</Para></listitem>
1759
1760</VarListEntry>
1761
1762</VariableList>
1763
1764</Sect3>
1765
1766<Sect3><Title>DEFAULT</Title>
1767
1768<VariableList>
1769
1770<VarListEntry><Term>Syntax</Term>
1771
1772<listitem><Para>*default &lt;settings list&gt;|all</Para></listitem>
1773
1774</VarListEntry>
1775
1776<VarListEntry><Term>Description</Term>
1777
1778<listitem><Para>
1779The valid settings are CALIBRATE, DATA, and UNITS.
1780</Para>
1781
1782<Para>
1783*default restores defaults for given settings.  This command is deprecated -
1784you should instead use: *calibrate default, *data default, *units default.
1785</Para></listitem>
1786
1787</VarListEntry>
1788
1789<VarListEntry><Term>See Also</Term>
1790
1791<listitem><Para>*calibrate, *data, *units</Para></listitem>
1792
1793</VarListEntry>
1794
1795</VariableList>
1796
1797</Sect3>
1798
1799<Sect3><Title>END</Title>
1800
1801<VariableList>
1802
1803<VarListEntry><Term>Syntax</Term>
1804
1805<listitem><Para>*end [&lt;survey&gt;]</Para></listitem>
1806
1807</VarListEntry>
1808
1809<VarListEntry><Term>Validity</Term>
1810
1811<listitem><Para>valid for closing a block started by *begin in the same file.
1812</Para></listitem>
1813
1814</VarListEntry>
1815
1816<VarListEntry><Term>Description</Term>
1817
1818<listitem><Para>
1819Closes a block started by *begin.
1820</Para></listitem>
1821
1822</VarListEntry>
1823
1824<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1825
1826<VarListEntry><Term>See Also</Term>
1827
1828<listitem><Para>*begin</Para></listitem>
1829
1830</VarListEntry>
1831
1832</VariableList>
1833
1834</Sect3>
1835
1836<Sect3><Title>ENTRANCE</Title>
1837
1838<VariableList>
1839
1840<VarListEntry><Term>Syntax</Term>
1841
1842<listitem><Para>*entrance &lt;station&gt;</Para></listitem>
1843
1844</VarListEntry>
1845
1846<VarListEntry><Term>Example</Term>
1847
1848<listitem>
1849<Para>
1850<programlisting>
1851*entrance P163</programlisting>
1852</Para>
1853</listitem>
1854
1855</VarListEntry>
1856
1857<VarListEntry><Term>Description</Term>
1858
1859<listitem><Para>
1860*entrance sets the <emphasis>entrance</emphasis> flag for a station.
1861This information is used by aven to allow entrances to be highlighted.
1862</Para>
1863
1864<!-- FIXME:
1865(could be inferred from surface/ug join, but better to specify because
1866of caves with no surf svy (or no underground survey)
1867and also situations in which multiple surveys leave through an entrance)
1868-->
1869</listitem>
1870
1871</VarListEntry>
1872
1873<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1874
1875<!-- <VarListEntry><Term>See Also</Term>
1876
1877<listitem><Para></Para></listitem>
1878
1879</VarListEntry>
1880-->
1881
1882</VariableList>
1883
1884</Sect3>
1885
1886<Sect3><Title>EQUATE</Title>
1887
1888<VariableList>
1889
1890<VarListEntry><Term>Syntax</Term>
1891
1892<listitem><Para>*equate &lt;station&gt; &lt;station&gt;...</Para></listitem>
1893
1894</VarListEntry>
1895
1896<VarListEntry><Term>Example</Term>
1897
1898<listitem>
1899<Para>
1900<programlisting>
1901*equate chosspot.1 triassic.27</programlisting>
1902</Para>
1903</listitem>
1904
1905</VarListEntry>
1906
1907<VarListEntry><Term>Description</Term>
1908
1909<listitem><Para>
1910*equate specifies that the station names in the list refer to the
1911same physical survey station. An error is given if there is only one station
1912listed.
1913</Para>
1914
1915<!-- FIXME:
1916<Para>
1917I think this is preferable to using:
1918</Para>
1919
1920<programlisting> a b 0.00   0   0</programlisting>
1921
1922<Para>
1923as EQUATE does not add in an extra position error. It is also clearer than
1924substituting in the original name wherever passages are linked. If you
1925disagree, you can always use one of the other methods!
1926</Para>
1927-->
1928</listitem>
1929
1930</VarListEntry>
1931
1932<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1933
1934<VarListEntry><Term>See Also</Term>
1935
1936<listitem><Para>*infer equates</Para></listitem>
1937
1938</VarListEntry>
1939
1940</VariableList>
1941
1942</Sect3>
1943
1944<Sect3><Title>EXPORT</Title>
1945
1946<VariableList>
1947
1948<VarListEntry><Term>Syntax</Term>
1949
1950<listitem><Para>*export &lt;station&gt;...</Para></listitem>
1951
1952</VarListEntry>
1953
1954<VarListEntry><Term>Example</Term>
1955
1956<!-- FIXME better example -->
1957<listitem>
1958<Para>
1959<programlisting>
1960*export 1 6 17</programlisting>
1961</Para>
1962</listitem>
1963
1964</VarListEntry>
1965
1966<VarListEntry><Term>Validity</Term>
1967
1968<listitem><Para>valid at the start of a *begin/*end block.
1969</Para></listitem>
1970
1971</VarListEntry>
1972
1973<VarListEntry><Term>Description</Term>
1974
1975<listitem><Para>
1976*export marks the stations named as referable to from the enclosing
1977survey.  To be able to refer to a station from a survey several levels
1978above, it must be exported from each enclosing survey.
1979</Para>
1980
1981<!-- FIXME:
1982<Para>
1983I think this is preferable to using:
1984</Para>
1985
1986<programlisting> a b 0.00   0   0</programlisting>
1987
1988<Para>
1989as EQUATE does not add in an extra position error. It is also clearer than
1990substituting in the original name wherever passages are linked. If you
1991disagree, you can always use one of the other methods!
1992</Para>
1993-->
1994</listitem>
1995
1996</VarListEntry>
1997
1998<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
1999
2000<VarListEntry><Term>See Also</Term>
2001
2002<listitem><Para>*begin, *infer exports</Para></listitem>
2003
2004</VarListEntry>
2005
2006</VariableList>
2007
2008</Sect3>
2009
2010<Sect3><Title>FIX</Title>
2011
2012<VariableList>
2013
2014<VarListEntry><Term>Syntax</Term>
2015
2016<listitem><Para>*fix &lt;station&gt; [reference]
2017 [ &lt;x&gt; &lt;y&gt; &lt;z&gt;
2018   [ &lt;x std err&gt; &lt;y std err&gt; &lt;z std err&gt;
2019     [ &lt;cov(x,y)&gt; &lt;cov(y,z)&gt; &lt;cov(z,x)&gt; ] ] ]
2020</Para></listitem>
2021
2022</VarListEntry>
2023
2024<VarListEntry><Term>Example</Term>
2025
2026<listitem>
2027<Para>
2028<programlisting>
2029*fix entrance.0 32768 86723 1760</programlisting>
2030
2031<programlisting>
2032*fix KT114_96 reference 36670.37 83317.43 1903.97</programlisting>
2033</Para>
2034</listitem>
2035
2036</VarListEntry>
2037
2038<VarListEntry><Term>Description</Term>
2039
2040<listitem>
2041<Para>
2042*fix fixes the position of &lt;station&gt; at the given coordinates.
2043If you haven't specified the coordinate system with "*cs", you can
2044omit the position and it will default to (0,0,0).  The standard errors default
2045to zero (fix station exactly).  cavern will give an error if you attempt to fix
2046the same survey station twice at different coordinates, or a warning if you fix
2047it twice with matching coordinates.
2048</Para>
2049
2050<Para>
2051You can also specify just one standard error (in which case it is assumed
2052equal in X, Y, and Z) or two (in which case the first is taken as the
2053standard error in X and Y, and the second as the standard error in Z).
2054</Para>
2055
2056<Para>
2057If you have covariances for the fix, you can also specify these - the
2058order is cov(x,y) cov(y,z) cov(z,x).
2059</Para>
2060
2061<Para>
2062You can fix as many stations as you like - just use a *fix command for each
2063one.  Cavern will check that all stations are connected to
2064at least one fixed point so that co-ordinates can be calculated for all
2065stations.
2066</Para>
2067
2068<Para>
2069By default cavern will warn about stations which have been FIX-ed but
2070not used otherwise.  This is unhelpful if you want to include a
2071standard file of benchmarks, some of which won't be used.
2072In this sort of situation, specify "REFERENCE" after the station name
2073in the FIX command to suppress this warning for a particular station.
2074</Para>
2075
2076<Note><Para>
2077X is Easting, Y is Northing, and Z is altitude.  This convention was chosen
2078since on a map, the horizontal (X) axis is usually East, and the vertical
2079axis (Y) North.  The choice of altitude (rather than depth) for Z is taken
2080from surface maps, and makes for less confusion when dealing with cave
2081systems with more than one entrance.  It also gives a right-handed
2082set of axes.
2083</Para></Note>
2084
2085</VarListEntry>
2086
2087<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
2088
2089<!-- <VarListEntry><Term>See Also</Term>
2090
2091<listitem><Para></Para></listitem>
2092
2093</VarListEntry>
2094-->
2095
2096</VariableList>
2097
2098</Sect3>
2099
2100<!--
2101<Sect3><Title></Title>
2102
2103<VariableList>
2104
2105<VarListEntry><Term>Syntax</Term>
2106
2107<listitem><Para>*</Para></listitem>
2108
2109</VarListEntry>
2110
2111<VarListEntry><Term>Example</Term>
2112
2113<listitem>
2114<Para>
2115<programlisting>
2116*</programlisting>
2117</Para>
2118</listitem>
2119
2120</VarListEntry>
2121
2122<VarListEntry><Term>Description</Term>
2123
2124<listitem><Para>
2125</Para></listitem>
2126
2127</VarListEntry>
2128
2129<VarListEntry><Term>Caveats </Term> </VarListEntry>
2130
2131<VarListEntry><Term>See Also</Term>
2132
2133<listitem><Para></Para></listitem>
2134
2135</VarListEntry>
2136
2137</VariableList>
2138
2139</Sect3>
2140-->
2141
2142<Sect3><Title>FLAGS</Title>
2143
2144<VariableList>
2145
2146<VarListEntry><Term>Syntax</Term>
2147
2148<listitem><Para>*flags &lt;flags&gt;</Para></listitem>
2149
2150</VarListEntry>
2151
2152<VarListEntry><Term>Example</Term>
2153
2154<listitem>
2155<Para>
2156<programlisting>
2157*flags duplicate not surface</programlisting>
2158</Para>
2159</listitem>
2160
2161</VarListEntry>
2162
2163<VarListEntry><Term>Description</Term>
2164
2165<listitem><Para>
2166*flags updates the current flag settings.
2167Flags not mentioned retain their previous state.  Valid flags
2168are DUPLICATE, SPLAY, and SURFACE, and a flag may be preceded with NOT to
2169turn it off.
2170</Para>
2171
2172<Para>
2173Survey legs marked SURFACE are hidden from plots by default, and not
2174included in cave survey length calculations.  Survey legs marked as
2175DUPLICATE or SPLAY are also not included in cave survey length
2176calculations; legs marked SPLAY are ignored by the extend program.
2177DUPLICATE is intended for the case when if you have two different
2178surveys along the same section of passage (for example to tie two
2179surveys into a permanent survey station); SPLAY is intended for
2180cases such as radial legs in a large chamber.
2181</Para>
2182</listitem>
2183
2184</VarListEntry>
2185
2186<VarListEntry><Term>See Also</Term>
2187
2188<listitem><Para>*begin</Para></listitem>
2189
2190</VarListEntry>
2191
2192</VariableList>
2193
2194</Sect3>
2195
2196<Sect3><Title>INCLUDE</Title>
2197
2198<VariableList>
2199
2200<VarListEntry><Term>Syntax</Term>
2201
2202<listitem><Para>*include &lt;filename&gt;</Para></listitem>
2203
2204</VarListEntry>
2205
2206<VarListEntry><Term>Example</Term>
2207
2208<listitem>
2209<Para>
2210<programlisting>
2211*include mission</programlisting>
2212
2213<programlisting>
2214*include "the pits"</programlisting>
2215</Para>
2216</listitem>
2217
2218</VarListEntry>
2219
2220<VarListEntry><Term>Description</Term>
2221
2222<listitem><Para>
2223*include processes &lt;filename&gt; as if it were inserted at this
2224place in the current file. (i.e. The current settings are carried
2225into &lt;filename&gt;, and any alterations to settings in &lt;filename&gt;
2226will be carried back again).  There's one exception to this (for
2227obscure historical reasons) which is that the survey prefix is
2228restored upon return to the original file.  Since *begin and *end
2229nesting cannot cross files, this can only make a difference if you
2230use the deprecated *prefix command.
2231</Para>
2232
2233<Para>If &lt;filename&gt; contains spaces, it must be enclosed in quotes.
2234</Para>
2235
2236<Para>An included file which does not have a complete path
2237is resolved relative to the directory which the parent file is in
2238(just as relative HTML links do).  Cavern will try adding a <filename>.svx</filename>
2239extension, and will also try translating "\" to "/".
2240And as a last
2241resort, it will try a lower case version of the filename (so if you
2242use Unix and someone sends you a DOS/Windows dataset with mismatched
2243case, unzip it with "unzip -L" and UNIX cavern will process it).
2244</Para>
2245
2246<Para>
2247The depth to which you can nest
2248include files may be limited by the operating system
2249you use.  Usually the limit is fairly high (>30), but if you want to be able to
2250process your dataset with <Application>Survex</Application> on any supported platform, it
2251would be prudent not to go overboard with nested include files.
2252</Para>
2253</listitem>
2254</VarListEntry>
2255
2256</VariableList>
2257
2258</Sect3>
2259
2260<Sect3><Title>INFER</Title>
2261
2262<VariableList>
2263
2264<VarListEntry><Term>Syntax</Term>
2265
2266<listitem>
2267<Para>*infer plumbs on|off</Para>
2268
2269<Para>*infer equates on|off</Para>
2270
2271<Para>*infer exports on|off</Para>
2272</listitem>
2273
2274</VarListEntry>
2275
2276<!--
2277<VarListEntry><Term>Example</Term>
2278
2279<listitem>
2280<programlisting>
2281</programlisting>
2282
2283</listitem>
2284
2285</VarListEntry>
2286-->
2287
2288<VarListEntry><Term>Description</Term>
2289
2290<listitem>
2291<Para>"*infer plumbs on" tells cavern to interpret gradients of +/- 90
2292degrees as UP/DOWN (so it
2293will not apply the clino correction to them). This is useful when
2294the data has not been converted to have UP and DOWN in it.
2295</Para>
2296
2297<para>"*infer equates on" tells cavern to interpret a leg with
2298a tape reading of zero as a *equate.  this prevents tape corrections
2299being applied to them.
2300</para>
2301
2302<para>"*infer exports on" is necessary when you have a dataset which is
2303partly annotated with *export.  It tells cavern not to complain about
2304missing *export commands in part of the dataset.  Also stations which
2305were used to join surveys are marked as exported in the 3d file.
2306</para>
2307</listitem>
2308
2309</VarListEntry>
2310
2311<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
2312
2313<!--
2314<VarListEntry><Term>See Also</Term>
2315
2316<listitem><Para>*end, *prefix</Para></listitem>
2317
2318</VarListEntry>
2319-->
2320
2321</VariableList>
2322
2323</Sect3>
2324
2325<Sect3><Title>INSTRUMENT</Title>
2326
2327<VariableList>
2328
2329<VarListEntry><Term>Syntax</Term>
2330
2331<listitem><Para>*instrument &lt;instrument&gt; &lt;identifier&gt;</Para></listitem>
2332
2333</VarListEntry>
2334
2335<VarListEntry><Term>Example</Term>
2336
2337<listitem>
2338<Para>
2339<programlisting>
2340*instrument compass "CUCC 2"
2341*instrument clino "CUCC 2"
2342*instrument tape "CUCC Fisco Ranger open reel"</programlisting>
2343</Para>
2344</listitem>
2345
2346</VarListEntry>
2347
2348<VarListEntry><Term>Validity</Term>
2349
2350<listitem><Para>valid at the start of a *begin/*end block.
2351</Para></listitem>
2352
2353</VarListEntry>
2354
2355<VarListEntry><Term>Description</Term>
2356
2357<listitem><Para>
2358*instrument specifies the particular instruments used to perform a
2359survey.
2360</Para></listitem>
2361
2362</VarListEntry>
2363
2364<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
2365
2366<VarListEntry><Term>See Also</Term>
2367
2368<listitem><Para>*begin, *date, *team</Para></listitem>
2369
2370</VarListEntry>
2371
2372</VariableList>
2373
2374</Sect3>
2375
2376<Sect3><Title>PREFIX</Title>
2377
2378<VariableList>
2379
2380<VarListEntry><Term>Syntax</Term>
2381
2382<listitem><Para>*prefix &lt;survey&gt;</Para></listitem>
2383
2384</VarListEntry>
2385
2386<VarListEntry><Term>Example</Term>
2387
2388<listitem>
2389<Para>
2390<programlisting>
2391*prefix flapjack</programlisting>
2392</Para>
2393</listitem>
2394
2395</VarListEntry>
2396
2397<VarListEntry><Term>Description</Term>
2398
2399<listitem><Para>
2400*prefix sets the current survey.
2401</Para></listitem>
2402
2403</VarListEntry>
2404
2405<VarListEntry><Term>Caveats </Term>
2406
2407<listitem><Para>*prefix is deprecated - you should use *begin and *end
2408instead.</Para></listitem>
2409
2410</VarListEntry>
2411
2412<VarListEntry><Term>See Also</Term>
2413
2414<listitem><Para>*begin, *end</Para></listitem>
2415
2416</VarListEntry>
2417
2418</VariableList>
2419
2420</Sect3>
2421
2422<Sect3><Title>REQUIRE</Title>
2423
2424<VariableList>
2425
2426<VarListEntry><Term>Syntax</Term>
2427
2428<listitem><Para>*require &lt;version&gt;</Para></listitem>
2429
2430</VarListEntry>
2431
2432<VarListEntry><Term>Example</Term>
2433
2434<listitem>
2435<Para>
2436<programlisting>
2437*require 0.98</programlisting>
2438</Para>
2439</listitem>
2440
2441</VarListEntry>
2442
2443<VarListEntry><Term>Description</Term>
2444
2445<listitem><Para>
2446*require checks that the version of cavern in use is at least
2447&lt;version&gt; and stops with an error if not.
2448So if your dataset requires a feature
2449introduced in a particular version, you can add a *require command and
2450users will know what version they need to upgrade to, rather than
2451getting an error message and having to guess what the real problem is.
2452</Para></listitem>
2453
2454</VarListEntry>
2455
2456</VariableList>
2457
2458</Sect3>
2459
2460<Sect3><Title>SD</Title>
2461
2462<VariableList>
2463
2464<VarListEntry><Term>Syntax</Term>
2465
2466<listitem><Para>*sd &lt;quantity list&gt; &lt;standard deviation&gt;
2467</Para></listitem>
2468
2469</VarListEntry>
2470
2471<VarListEntry><Term>Example</Term>
2472
2473<listitem>
2474<Para>
2475<programlisting>
2476*sd tape 0.15 metres</programlisting>
2477</Para>
2478</listitem>
2479
2480</VarListEntry>
2481
2482<VarListEntry><Term>Description</Term>
2483
2484<listitem><Para>
2485*sd sets the standard deviation of a measurement.
2486</Para>
2487
2488<Para>
2489&lt;quantity&gt; is one of (each group gives alternative names for the same
2490quantity):
2491</Para>
2492
2493<ItemizedList>
2494    <listitem><para>TAPE, LENGTH</para></listitem>
2495    <listitem><para>COMPASS, BEARING</para></listitem>
2496    <listitem><para>BACKCOMPASS, BACKBEARING</para></listitem>
2497    <listitem><para>CLINO, GRADIENT</para></listitem>
2498    <listitem><para>BACKCLINO, BACKGRADIENT</para></listitem>
2499    <listitem><para>COUNTER, COUNT</para></listitem>
2500    <listitem><para>DEPTH</para></listitem>
2501    <listitem><para>DECLINATION</para></listitem>
2502    <listitem><para>DX, EASTING</para></listitem>
2503    <listitem><para>DY, NORTHING</para></listitem>
2504    <listitem><para>DZ, ALTITUDE</para></listitem>
2505    <listitem><para>LEFT</para></listitem>
2506    <listitem><para>RIGHT</para></listitem>
2507    <listitem><para>UP, CEILING</para></listitem>
2508    <listitem><para>DOWN, FLOOR</para></listitem>
2509    <listitem><para>LEVEL</para></listitem>
2510    <listitem><para>PLUMB</para></listitem>
2511    <listitem><para>POSITION</para></listitem>
2512</ItemizedList>
2513
2514<Para>
2515&lt;standard deviation&gt; must include units and thus is typically
2516"0.05 metres", or "0.02 degrees". See *units below for full list
2517of valid units.
2518</Para>
2519
2520<!-- FIXME mention central limit theorem -->
2521<Para>
2522To utilise this command fully you need to understand what a
2523<emphasis>standard deviation</emphasis> is.
2524It gives a value to the 'spread' of the errors
2525in a measurement. Assuming that these are normally distributed
2526we can say that 95.44% of the actual lengths will fall within two
2527standard deviations of the measured length. i.e. a tape SD of
25280.25 metres means that the actual length of a tape measurement
2529is within + or - 0.5 metres of the recorded value 95.44% of the time.
2530So if the measurement is 7.34m then the actual length is very
2531likely to be between 6.84m and 7.84m. This example corresponds
2532to BCRA grade 3. Note that this is just one interpretation of
2533the BCRA standard, taking the permitted error values as 2SD 95.44%
2534confidence limits. If you want to take the readings as being some
2535other limit (e.g. 1SD = 68.26%) then you will need to change the BCRA3
2536and BCRA5 files accordingly. This issue is explored in more
2537detail in various surveying articles.
2538<!--
25392.565 sd 99%
25402.5   sd 98.76%
25412     sd 95.44%
25421     sd 68.26%
2543.97   sd 66.67%
25441.15  sd 75%
2545-->
2546</Para></listitem>
2547
2548</VarListEntry>
2549
2550<VarListEntry><Term>See Also</Term>
2551
2552<listitem><Para>*units</Para></listitem>
2553
2554</VarListEntry>
2555
2556</VariableList>
2557
2558</Sect3>
2559
2560<Sect3><Title>SET</Title>
2561
2562<VariableList>
2563
2564<VarListEntry><Term>Syntax</Term>
2565
2566<listitem><Para>*set &lt;item&gt; &lt;character list&gt;</Para></listitem>
2567
2568</VarListEntry>
2569
2570<VarListEntry><Term>Example</Term>
2571
2572<listitem>
2573<Para>
2574<programlisting>
2575*set blank x09x20
2576*set decimal ,</programlisting>
2577
2578Note that you need to eliminate comma from being a blank before setting it as
2579a decimal - otherwise the comma in "*set decimal ," is parsed as a blank, and
2580you set decimal to not have any characters representing it.
2581</Para>
2582</listitem>
2583
2584</VarListEntry>
2585
2586<VarListEntry><Term>Description</Term>
2587
2588<listitem><Para>
2589*set sets the specified &lt;item&gt; to the character or characters
2590given in &lt;character list&gt;. The example sets the decimal
2591separator to be a comma.
2592</Para>
2593
2594<Para>
2595xAB means the character with hex value AB. Eg x20 is a space.
2596</Para>
2597
2598<Para>
2599The complete list of items that can be set, the defaults (in
2600brackets), and the meaning of the item, is:
2601</Para>
2602
2603<ItemizedList>
2604
2605<ListItem><Para>
2606BLANK (x09x20,) Separates fields
2607</Para></ListItem>
2608
2609<ListItem><Para>
2610COMMENT (;) Introduces comments
2611</Para></ListItem>
2612
2613<ListItem><Para>
2614DECIMAL (.) Decimal point character
2615</Para></ListItem>
2616
2617<ListItem><Para>
2618EOL (x0Ax0D) End of line character
2619</Para></ListItem>
2620
2621<ListItem><Para>
2622KEYWORD (*) Introduces keywords
2623</Para></ListItem>
2624
2625<ListItem><Para>
2626MINUS (-) Indicates negative number
2627</Para></ListItem>
2628
2629<ListItem><Para>
2630NAMES (_-) Non-alphanumeric chars permitted in station
2631names (letters and numbers are always permitted).
2632</Para></ListItem>
2633
2634<ListItem><Para>
2635OMIT (-) Contents of field omitted (e.g. in plumbed legs)
2636</Para></ListItem>
2637
2638<ListItem><Para>
2639PLUS (+) Indicates positive number
2640</Para></ListItem>
2641
2642<ListItem><Para>
2643ROOT (\) Prefix in force at start of current file (use of ROOT is deprecated)
2644</Para></ListItem>
2645
2646<ListItem><Para>
2647SEPARATOR (.) Level separator in prefix hierarchy
2648</Para></ListItem>
2649
2650<!-- FIXME OPEN ({) and CLOSE (}) -->
2651</ItemizedList>
2652
2653<Para>
2654The special characters may not be alphanumeric.
2655</Para>
2656
2657</listitem>
2658
2659</VarListEntry>
2660
2661</VariableList>
2662
2663</Sect3>
2664
2665<Sect3><Title>SOLVE</Title>
2666
2667<VariableList>
2668
2669<VarListEntry><Term>Syntax</Term>
2670
2671<listitem><Para>*solve</Para></listitem>
2672
2673</VarListEntry>
2674
2675<VarListEntry><Term>Example</Term>
2676
2677<listitem>
2678<Para>
2679<programlisting>
2680*include 1997data
2681*solve
2682*include 1998data
2683</programlisting>
2684</Para>
2685</listitem>
2686
2687</VarListEntry>
2688
2689<VarListEntry><Term>Description</Term>
2690
2691<listitem><Para>
2692Distributes misclosures around any loops in the survey and fixes
2693the positions of all existing stations.  This command is intended
2694for situations where you have some new surveys adding extensions
2695to an already drawn-up survey which you wish to avoid completely
2696redrawing. You can read in the old data, use *SOLVE to fix it, and then
2697read in the new data.  Then old stations will be in the same
2698positions as they are in the existing drawn up survey, even if new loops
2699have been formed by the extensions.
2700</Para></listitem>
2701
2702</VarListEntry>
2703
2704</VariableList>
2705
2706</Sect3>
2707
2708<Sect3><Title>TEAM</Title>
2709
2710<VariableList>
2711
2712<VarListEntry><Term>Syntax</Term>
2713
2714<listitem><Para>*team &lt;person&gt; &lt;role&gt;...</Para></listitem>
2715
2716</VarListEntry>
2717
2718<VarListEntry><Term>Example</Term>
2719
2720<listitem>
2721<Para>
2722<programlisting>
2723*team "Nick Proctor" compass clino tape
2724*team "Anthony Day" notes pictures tape
2725</programlisting>
2726</Para>
2727</listitem>
2728
2729</VarListEntry>
2730
2731<VarListEntry><Term>Validity</Term>
2732
2733<listitem><Para>valid at the start of a *begin/*end block.
2734</Para></listitem>
2735<!-- FIXME valid roles are? -->
2736
2737</VarListEntry>
2738
2739<VarListEntry><Term>Description</Term>
2740
2741<listitem><Para>
2742*team specifies the people involved in a survey and what role they
2743filled during that trip.
2744</Para></listitem>
2745
2746</VarListEntry>
2747
2748<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
2749
2750<VarListEntry><Term>See Also</Term>
2751
2752<listitem><Para>*begin, *date, *instrument</Para></listitem>
2753
2754</VarListEntry>
2755
2756</VariableList>
2757
2758</Sect3>
2759
2760<Sect3><Title>TITLE</Title>
2761
2762<VariableList>
2763
2764<VarListEntry><Term>Syntax</Term>
2765
2766<listitem><Para>*title &lt;title&gt;</Para></listitem>
2767
2768</VarListEntry>
2769
2770<VarListEntry><Term>Example</Term>
2771
2772<listitem>
2773<programlisting>
2774*title Dreamtime</programlisting>
2775
2776<programlisting>
2777*title "Mission Impossible"</programlisting>
2778</listitem>
2779
2780</VarListEntry>
2781
2782<VarListEntry><Term>Description</Term>
2783
2784<listitem><Para>*title allows you to set the descriptive title for a survey.
2785If the title contains spaces, you need to enclose it in quotes ("").
2786If there is no *title command, the title defaults to the survey name
2787given in the *begin command.
2788</Para>
2789</listitem>
2790
2791</VarListEntry>
2792
2793<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
2794
2795<!--
2796<VarListEntry><Term>See Also</Term>
2797
2798<listitem><Para>*end, *prefix</Para></listitem>
2799
2800</VarListEntry>
2801-->
2802
2803</VariableList>
2804
2805</Sect3>
2806
2807<Sect3><Title>TRUNCATE</Title>
2808
2809<VariableList>
2810
2811<VarListEntry><Term>Syntax</Term>
2812
2813<listitem><Para>*truncate &lt;length&gt;|off</Para></listitem>
2814
2815</VarListEntry>
2816
2817<!-- FIXME:
2818<VarListEntry><Term>Example</Term>
2819
2820<listitem>
2821<programlisting>
2822</programlisting>
2823
2824</listitem>
2825
2826</VarListEntry>
2827-->
2828
2829<VarListEntry><Term>Description</Term>
2830
2831<listitem><Para>Station names may be of any length in <Application>Survex</Application>, but some
2832other (mostly older) cave surveying software only regard the first few
2833characters of a name as significant (e.g. "entran" and "entrance"
2834might be treated as the same).  To facilitate using data imported from
2835such a package <Application>Survex</Application> allows you to truncate names to whatever
2836length you want (but by default truncation is off).
2837</Para>
2838
2839<Para>Figures for the number of characters which are significant in various
2840software packages: Compass currently has a limit of 12,
2841CMAP has a limit of 6,
2842Smaps 4 had a limit of 8,
2843<!-- FIXME any limits for other software, winkarst for example? -->
2844Surveyor87/8 used 8.
2845<Application>Survex</Application> itself used 8 per prefix
2846level up to version 0.41, and 12 per prefix level up to 0.73 (more recent
2847versions removed this rather archaic restriction).
2848</Para>
2849</listitem>
2850
2851</VarListEntry>
2852
2853<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
2854
2855<!--
2856<VarListEntry><Term>See Also</Term>
2857
2858<listitem><Para>*end, *prefix</Para></listitem>
2859
2860</VarListEntry>
2861-->
2862
2863</VariableList>
2864
2865</Sect3>
2866
2867<Sect3><Title>UNITS</Title>
2868
2869<VariableList>
2870
2871<VarListEntry><Term>Syntax</Term>
2872
2873<listitem><Para>
2874*units &lt;quantity list&gt; [&lt;factor&gt;] &lt;unit&gt;
2875</Para>
2876<Para>
2877*units default
2878</Para></listitem>
2879
2880</VarListEntry>
2881
2882<VarListEntry><Term>Example</Term>
2883
2884<listitem>
2885<Para>
2886<programlisting>
2887*units tape metres</programlisting>
2888
2889<programlisting>
2890*units compass backcompass clino backclino grads</programlisting>
2891
2892<programlisting>
2893*units dx dy dz 1000 metres ; data given as kilometres</programlisting>
2894
2895<programlisting>
2896*units left right up down feet</programlisting>
2897</Para>
2898</listitem>
2899
2900</VarListEntry>
2901
2902<VarListEntry><Term>Description</Term>
2903
2904<listitem><Para>
2905&lt;quantity&gt; is one of the following (grouped entries are just alternative names for the same thing):
2906TAPE/LENGTH, COMPASS/BEARING, BACKCOMPASS/BACKBEARING, CLINO/GRADIENT, BACKCLINO/BACKGRADIENT, COUNTER/COUNT, DEPTH, DECLINATION, DX/EASTING, DY/NORTHING, DZ/ALTITUDE, LEFT, RIGHT, UP/CEILING, DOWN/FLOOR
2907</Para>
2908
2909<Para>Changes current units of all the quantities listed to [&lt;factor&gt;]
2910&lt;unit&gt;. Note that quantities can be expressed either as
2911the instrument (e.g. COMPASS) or the measurement (e.g. BEARING).
2912</Para>
2913
2914<Para>&lt;factor&gt; allows you to easy specify situations such as measuring
2915distance with a diving line knotted every 10cm (*units distance 0.1 metres).
2916If &lt;factor&gt; is omitted it defaults to 1.0.  If specified, it must be
2917non-zero.
2918</Para>
2919
2920<Para>Valid units for listed quantities are:
2921</Para>
2922
2923<Para>TAPE/LENGTH, COUNTER/COUNT, DEPTH, DX/EASTING, DY/NORTHING, DZ/ALTITUDE
2924in YARDS|FEET|METRIC|METRES|METERS (default: METRES)
2925</Para>
2926
2927<Para>CLINO/GRADIENT, BACKCLINO/BACKGRADIENT
2928in DEG|DEGREES|GRADS|MILS|PERCENT|PERCENTAGE (default: DEGREES)
2929</Para>
2930
2931<Para>COMPASS/BEARING, BACKCOMPASS/BACKBEARING, DECLINATION
2932in DEG|DEGREES|GRADS|MILS|MINUTES (default: DEGREES)
2933</Para>
2934
2935<Para>(360 degrees = 400 grads (also known as Mils))
2936</Para>
2937</listitem>
2938
2939</VarListEntry>
2940
2941<!-- <VarListEntry><Term>Caveats </Term> </VarListEntry> -->
2942
2943<VarListEntry><Term>See Also</Term>
2944
2945<listitem><Para>*calibrate</Para></listitem>
2946
2947</VarListEntry>
2948
2949</VariableList>
2950
2951</Sect3>
2952
2953</Sect2>
2954
2955</Sect1>
2956
2957<!-- FIXME rename to "Cookbook"? -->
2958<Sect1><Title>Contents of <filename>.svx</filename> files: How do I?</Title>
2959<?dbhtml filename="svxhowto.htm">
2960
2961<Para>
2962Here is some example <Application>Survex</Application> data (a very small cave numbered 1623/163):
2963</Para>
2964
2965<programlisting>
29662 1 26.60 222  17.5
29672 3 10.85 014   7
29682 4  7.89 254 -11
29694 5  2.98  - DOWN
29705 6  9.29 271 -28.5</programlisting>
2971
2972<Para>
2973You can vary the data ordering.  The default is:
2974</Para>
2975
2976<Para>
2977from-station to-station tape compass clino
2978</Para>
2979
2980<Para>
2981This data demonstrates a number of useful features of <Application>Survex</Application>:
2982</Para>
2983
2984<Para>
2985Legs can be measured either way round, which allows the use of
2986techniques like "leap-frogging" (which is where legs
2987alternate forwards and backwards).
2988</Para>
2989
2990<Para>
2991Also notice that there is a spur in the survey (2 to 3).  You
2992do not need to specify this specially.
2993</Para>
2994
2995<Para>
2996<Application>Survex</Application> places few restrictions on station naming (see "Survey
2997Station Names" in the previous section), so you can number the stations
2998as they were in the original survey notes.  Although not apparent from
2999this example, there is no requirement for each leg to connect to an
3000existing station.  <Application>Survex</Application> can accept data in any order, and will
3001check for connectedness once all the data has been read in.
3002</Para>
3003
3004<Para>
3005Each survey is also likely to have other information associated
3006with it, such as instrument calibrations, etc.  This has been
3007omitted from this example to keep things simple.
3008</Para>
3009
3010<Para>
3011Most caves will take more than just one survey trip to map.  Commonly
3012the numbering in each survey will begin at 1, so we need to be
3013able to tell apart stations with the same number in different
3014surveys.
3015</Para>
3016
3017<Para>
3018To accomplish this, <Application>Survex</Application> has a very flexible system of hierarchical
3019prefixes.  All you need do is give each survey a unique name or
3020number, and enter the data like so:
3021</Para>
3022
3023<programlisting>
3024*begin 163
3025*export 1
30262 1 26.60 222  17.5
30272 3 10.85 014   7
30282 4  7.89 254 -11
30294 5  2.98  - DOWN
30305 6  9.29 271 -28.5
3031*end 163</programlisting>
3032
3033<Para><Application>Survex</Application> will name the stations by attaching the current prefix.
3034In this case, the stations will be named 163.1, 163.2, etc.
3035</Para>
3036
3037<Para>We have a convention with the CUCC Austria data that the entrance survey
3038station of a cave is named P&lt;cave number&gt;, P163 in this case. We
3039can accomplish this like so:
3040</Para>
3041
3042<programlisting>
3043*equate P163 163.1
3044*entrance P163
3045*begin 163
3046*export 1
30472 1 26.60 222  17.5
30482 3 10.85 014   7
30492 4  7.89 254 -11
30504 5  2.98  - DOWN
30515 6  9.29 271 -28.5
3052*end 163</programlisting>
3053
3054<Sect2><Title>Specify surface survey data</Title>
3055
3056<Para>
3057Say you have 2 underground surveys and 2 surface ones with 2 fixed reference
3058points.  You want to mark the surface surveys so that their length isn't
3059included in length statistics, and so that Aven knows to display them
3060differently.  To do this you mark surface data with the "surface" flag
3061- this is set with "*flags surface" like so:
3062<Para>
3063
3064<programlisting>
3065; fixed reference points
3066*fix fix_a 12345 56789 1234
3067*fix fix_b 23456 67890 1111                                                     
3068                                                                               
3069; surface data (enclosed in *begin ... *end to stop the *flags command
3070; from "leaking" out)
3071*begin
3072*flags surface
3073*include surface1
3074*include surface2
3075*end                                                                           
3076                                                                               
3077; underground data
3078*include cave1
3079*include cave2</programlisting>
3080
3081<Para>
3082You might also have a survey which starts on the surface and heads into a
3083cave.  This can be easily handled too - here's an example which goes in
3084one entrance, through the cave, and out of another entrance:
3085</Para>
3086
3087<programlisting>
3088*begin BtoC
3089*title "161b to 161c"
3090*date 1990.08.06 ; trip 1990-161c-3 in 1990 logbook
3091
3092*begin
3093*flags surface
309402    01      3.09   249    -08.5
309502    03      4.13   252.5  -26
3096*end
3097
309804    03      6.00   020    +37
309904    05      3.07   329    -31
310006    05      2.67   203    -40.5
310106    07      2.20   014    +04
310207    08      2.98   032    +04
310308    09      2.73   063.5  +21
310409    10     12.35   059    +15
3105
3106*begin
3107*flags surface
310811    10      4.20   221.5  -11.5
310911    12      5.05   215    +03.5
311011    13      6.14   205    +12.5
311113    14     15.40   221    -14
3112*end
3113
3114*end BtoC</programlisting>
3115
3116<Para>
3117Note that to avoid needless complication, Survex regards each leg as
3118being either "surface" or "not surface" - if a leg spans the boundary you'll
3119have to call it one or the other.  It's good surveying practice to
3120deliberately put a station at the surface/underground interface
3121(typically the highest closed contour or drip line) so this generally
3122isn't an onerous restriction.
3123</Para>
3124
3125</Sect2>
3126
3127<Sect2><Title>Specify the ordering and type of data</Title>
3128
3129<Para>The *DATA command is used to specify the data style, and the
3130order in which the readings are given.</Para>
3131
3132</Sect2>
3133
3134<Sect2><Title>Deal with Plumbs or Legs Across Static Water</Title>
3135
3136<!-- FIXME
3137<Para>
3138They can be given
3139as +90, or -90, but as they are not usually measured with the
3140clino, but with a plumb of some sort, then it is useful to distinguish
3141them in this way so that any clino adjustment is not applied to
3142these values.
3143</Para>
3144
3145FIXME: paste in section from mail to list
3146
3147<Para>
3148Note that a similar effect can be achieved by using the "*infer plumbs" command
3149to stop clino corrections being applied to -90 and +90 clino readings.
3150</Para>
3151-->
3152
3153<Para>
3154Plumbed legs should be given using 'UP' or 'DOWN' in place of the
3155clino reading and a dash (or a different specified 'OMIT' character)
3156in place of the compass reading.  This distinguishes
3157them from legs measured with a compass and clino.  Here's an example:
3158</Para>
3159
3160<programlisting>
31611 2 21.54 - UP
31623 2 7.36 017 +17
31633 4 1.62 091 +08
31645 4 10.38 - DOWN</programlisting>
3165
3166<Para>
3167U/D or +V/-V may be used instead of UP/DOWN; the check is not case
3168sensitive.
3169</Para>
3170
3171<Para>
3172Legs surveyed across the surface of a static body of water where no
3173clino reading is taken (since the surface of the water can be assumed
3174to be flat) can be indicated by using LEVEL in place of a clino reading.
3175This prevents the clino correction being applied.  Here's an example:
3176</Para>
3177
3178<programlisting>
31791 2 11.37 190 -12
31803 2  7.36 017 LEVEL
31813 4  1.62 091 LEVEL</programlisting>
3182
3183</Sect2>
3184
3185<Sect2><Title>Specify a BCRA grade</Title>
3186
3187<Para>The *SD command can be used to specify the standard deviations of the
3188various measurements (tape, compass, clino, etc).  Examples files are
3189supplied which define BCRA Grade 3 and BCRA Grade 5 using a number of *sd
3190commands. You can use these by simply including them at the relevant point,
3191as follows:
3192</Para>
3193
3194<programlisting>
3195*begin somewhere
3196; This survey is only grade 3
3197*include grade3
31982 1 26.60 222  17.5
31992 3 10.85 014   7
3200; etc
3201*end somewhere</programlisting>
3202
3203<Para>The default values for the standard deviations are those for
3204BCRA grade 5. Note that it is good practice to keep the *include
3205Grade3 within *Begin and *End commands otherwise it will apply
3206to following survey data, which may not be what you intended.
3207</Para>
3208
3209</Sect2>
3210
3211<Sect2><Title>Specify different accuracy for a leg</Title>
3212
3213<Para>For example, suppose the tape on the plumbed leg in this survey
3214is suspected of being less accurate than the rest of the survey because
3215the length was obtained by measuring the length of the rope used to rig
3216the pitch.  We can set a higher sd for this one measurement and use a
3217*begin/*end block to make sure this setting only applies to the one
3218leg:
3219</Para>
3220
3221<programlisting>
32222 1 26.60 222  17.5
32232 3 10.85 014   7
32242 4  7.89 254 -11
3225*begin
3226; tape measurement was taken from the rope length
3227*sd tape 0.5 metres
32284 5  34.50 - DOWN
3229*end
32305 6  9.29 271 -28.5</programlisting>
3231
3232<!-- FIXME also *calibrate and *instrument? Except rope is measure with the
3233tape... -->
3234</Sect2>
3235
3236<Sect2><Title>Enter Repeated Readings</Title>
3237
3238<Para>If your survey data contains multiple versions of each leg (for example,
3239pockettopo produces such data), then provided these are adjacent to one another
3240Survex 1.2.17 and later will automatically average these and treat them as a
3241single leg.
3242</Para>
3243
3244</Sect2>
3245
3246<Sect2><Title>Enter Radiolocation Data</Title>
3247
3248<!-- FIXME comments from David Gibson here -->
3249<Para>This is done by using the *SD command to specify the appropriate
3250errors for the radiolocation `survey leg' so that the loop closure
3251algorithm knows how to distribute errors if it forms part of a loop.
3252</Para>
3253
3254<Para>The best approach for a radiolocation where the underground station
3255is vertically below the surface station is to represent it as a
3256plumbed leg, giving suitable SDs for the length and plumb angle. The
3257horizontal positioning of this is generally quite accurate, but the
3258vertical positioning may be much less well known. E.g: we have a
3259radiolocation of about 50m depth +/- 20m and horizontal accuracy of
3260+/- 8m. Over 50m the +/-8m is equivalent to an angle of 9 degrees, so
3261that is the expected plumb error. 20m is the expected error in the
3262length. To get the equivalent SD we assume that 99.74% of readings will
3263be within 3 standard deviations of the error value. Thus we divide the
3264expected errors by 3 to get the SD we should specify:
3265</Para> <!-- 3 SD? or same as BCRA3.SVX, etc -->
3266
3267<programlisting>
3268*begin
3269*sd length 6.67 metres
3270*sd plumb 3 degrees
3271surface underground 50 - down
3272*end</programlisting>
3273
3274<Para>
3275We wrap the radiolocation leg in a *begin/*end block to make
3276sure that the special *sd settings only apply to this one leg.
3277</Para>
3278
3279<Para>For more information on the expected errors from radiolocations
3280see Compass Points Issue 10, available online at
3281<ulink url="http://www.chaos.org.uk/survex/cp/CP10/CPoint10.htm">http://www.chaos.org.uk/survex/cp/CP10/CPoint10.htm</ulink>
3282</Para>
3283
3284</Sect2>
3285
3286<Sect2><Title>Enter Diving Data</Title>
3287
3288<Para>Surveys made underwater using a diver's depth gauge can be
3289processed - use the *Data command to specify that the following data
3290is of this type.
3291</Para>
3292
3293</Sect2>
3294
3295<Sect2><Title>Enter Theodolite data</Title>
3296
3297<Para>
3298Theodolite data with turned angles is not yet explicitly catered
3299for, so for now you will need to convert it into equivalent legs in
3300another style - normal or cylpolar are likely to be the best choices.
3301</Para>
3302
3303<Para>
3304If there is no vertical info in your theodolite data then you should
3305use the cylpolar style and use *sd command to specify very low
3306accuracy (high SD) in the depth so that the points will move in the
3307vertical plane as required if the end points are fixed or the survey
3308is part of a loop.
3309</Para>
3310
3311</Sect2>
3312
3313</Sect1>
3314
3315<Sect1><Title>General: How do I?</Title>
3316<?dbhtml filename="genhowto.htm">
3317
3318<Sect2><Title>Create a new survey</Title>
3319
3320<Para>You simply create a text file containing the relevant survey data,
3321using a text editor, and save it with a suitable name with a <filename>.svx</filename>
3322extension. The
3323easiest way is to look at some of the example data and use that
3324as a template. Nearly all surveys will need a bit of basic info
3325as well as the survey data itself: e.g. the date (*date), comments
3326about where, what cave, a name for the survey (using *begin and *end),
3327instrument error corrections etc. Here is a typical survey file:
3328</Para>
3329
3330<Para>All the lines starting with ';' are comments, which are ignored
3331by <Application>Survex</Application>. You can also see the use of 'DOWN' for plumbs, and
3332*calibrate tape for dealing with a tape length error (in this case
3333the end of the tape had fallen off so measurements were made from the
333420cm point).</Para>
3335
3336<programlisting>
3337*equate chaos.1 triassic.pt3.8
3338*equate chaos.2 triassic.pt3.9
3339
3340*begin chaos
3341*title "Bottomless Pit of Eternal Chaos to Redemption pitch"
3342*date 1996.07.11
3343*team "Nick Proctor" compass clino tape
3344*team "Anthony Day" notes pictures tape
3345*instrument compass "CUCC 2"
3346*instrument clino "CUCC 2"
3347;Calibration: Cairn-Rock 071 072 071,  -22 -22 -22
3348;       Rock-Cairn 252 251 252,  +21 +21 +21
3349;Calibration at 161d entrance from cairn nr entrance to
3350;prominent rock edge lower down. This is different from
3351;calibration used for thighs survey of 5 July 1996
3352
3353*export 1 2
3354
3355;Tape is 20cm too short
3356*calibrate tape +0.2
3357
33581 2 9.48 208 +08
33592 3 9.30 179 -23
33603 4 2.17 057 +09
33615 4 10.13 263 +78
33625 6 2.10 171 -73
33637 6 7.93 291 +75
3364*begin
3365*calibrate tape 0
33668 7 35.64 262 +86 ;true length measured for this leg
3367*end
33688 9 24.90 - DOWN
336910 9 8.61 031 -43
337010 11 2.53 008 -34
337111 12 2.70 286 -20
337213 12 5.36 135 +23
337314 13 1.52 119 -12
337415 14 2.00 036 +13
337516 15 2.10 103 +12
337617 16 1.40 068 -07
337717 18 1.53 285 -42
337819 18 5.20 057 -36
337919 20 2.41 161 -67
338020 21 27.47 - DOWN
338121 22 9.30 192 -29
3382*end chaos</programlisting>
3383
3384</Sect2>
3385
3386<Sect2><Title>Join surveys together</Title>
3387
3388<Para>Once you have more than one survey you need to specify how they
3389link together. To do this use *export to make the stations to be
3390joined accessible in the enclosing survey, then *equate in the
3391enclosing survey to join them together.
3392<!-- FIXME example -->
3393</Para>
3394
3395</Sect2>
3396
3397<Sect2><Title>Organise my surveys</Title>
3398
3399<Para>This is actually a large subject. There are many ways you can
3400organise your data using <Application>Survex</Application>. Take a look at the example dataset
3401for some ideas of ways to go about it.
3402</Para>
3403
3404<Sect3><Title>Fixed Points (Control Points)</Title>
3405
3406<Para>The *fix command is used to specify fixed points (also know as control
3407points).  See the description of this command in the "Cavern Commands"
3408section of this manual.
3409</Para>
3410
3411</Sect3>
3412
3413<Sect3><Title>More than one survey per trip</Title>
3414
3415<Para>Suppose you have two separate bits of surveying which were done on the
3416same trip.  So the calibration details, etc. are the same for both.  But you
3417want to give a different survey name to the two sections.  This is easily
3418achieved like so:
3419</Para>
3420
3421<programlisting>
3422*begin
3423*calibrate compass 1.0
3424*calibrate clino 0.5
3425*begin altroute
3426; first survey
3427*end altroute
3428*begin faraway
3429; second survey
3430*end faraway
3431*end</programlisting>
3432
3433</Sect3>
3434
3435</Sect2>
3436
3437<Sect2><Title>Add surface topography</Title>
3438
3439<!-- FIXME put DEM support in aven -->
3440<Para>We intend to allow import of terrain data in DEM format, and also any
3441other formats in common use.  But at present the simplest approach is to
3442generate a <filename>.svx</filename> file with the surface mesh in and display it with the
3443survey data.
3444</Para>
3445
3446<Para>
3447It is possible to generate
3448a mesh or contours overlaying your area by various means.  In the USA,
3449usable resolution data can be obtained for free.  In other countries,
3450it's harder to come by.  Reading heights from the
3451contours on a map is one approach.  It's laborious, but feasible for
3452a small area.
3453</Para>
3454
3455<Para>
3456Details of several methods are given in the BCRA Cave Surveying
3457Group magazine Compass Points issue 11, available online at
3458<ulink url="http://www.chaos.org.uk/survex/cp/CP11/CPoint11.htm#Art_5">http://www.chaos.org.uk/survex/cp/CP11/CPoint11.htm#Art_5</ulink>
3459</Para>
3460
3461<Para>If you're using another program to generate a <filename>.svx</filename> file for the surface
3462mesh, it's best to use the NOSURVEY data style.
3463Simply fix all the grid intersections at the correct
3464coordinates and height, and put legs between them using the NOSURVEY style.
3465Here's a grid of 4 squares and 9 intersections:
3466</Para>
3467
3468<programlisting>
3469*fix 00 000 000 1070
3470*fix 01 000 100 1089
3471*fix 02 000 200 1093
3472
3473*fix 10 100 000 1062
3474*fix 11 100 100 1080
3475*fix 12 100 200 1089
3476
3477*fix 20 200 000 1050
3478*fix 21 200 100 1065
3479*fix 22 200 200 1077
3480
3481*data nosurvey station
3482
348300
348401
348502
3486
348710
348811
348912
3490
349120
349221
349322
3494
349500
349610
349720
3498
349901
350011
350121
3502
350302
350412
350522</programlisting>
3506
3507<Para>
3508This is far simpler than trying to create fake tape/compass/clino legs of
3509the right length for each line in the mesh.  It's also very fast to process
3510with cavern.
3511</Para>
3512
3513<Para>SpeleoGen can also help with this process if you want
3514final output in DXF form.  See the 'Related Tools' section of the
3515Survex website for download links.
3516</Para>
3517
3518</Sect2>
3519
3520<Sect2><Title>Overlay a grid</Title>
3521
3522<Para>Aven is able to display a grid, but this functionality isn't currently
3523available in printouts.
3524You can achieve a similar effect for now by creating a <filename>.svx</filename> file
3525where the survey legs form a grid.
3526</Para>
3527
3528</Sect2>
3529
3530<Sect2><Title>Import data from other programs</Title>
3531
3532<Para><Application>Survex</Application> supports a number of features to help with importing
3533existing data. You can specify the ordering of items on a line using *Data
3534(see <Application>Survex</Application> Keywords above), and you can specify the characters used
3535to mean different things using *Set (see <Application>Survex</Application> Keywords above).
3536</Para>
3537
3538<Para>The Ignore and Ignoreall options to the *Data command are often
3539particularly useful, e.g. if you have a dataset with LRUD info or comments
3540on the ends of lines.
3541</Para>
3542
3543<Sect3><Title>Changing Meanings of Characters</Title>
3544
3545<Para>e.g. if you have some data with station names containing the
3546characters '?' and '+' (which are not permitted in a name by default)
3547then the command:
3548</Para>
3549
3550<programlisting>
3551*SET NAMES ?+</programlisting>
3552
3553<Para>
3554specifies that question marks and plus signs are permitted in station names.
3555A-Z, a-z, and 0-9 are always permitted. '_' and '-' are also permitted by
3556default, but aren't in this example.
3557</Para>
3558
3559<Para>If your data uses a comma ',' instead of a decimal point, then
3560you use
3561</Para>
3562
3563<programlisting>
3564*SET DECIMAL ,</programlisting>
3565
3566<Para>to specify that ',' is now the decimal separator instead of '.'.
3567</Para>
3568
3569<!-- FIXME
3570<Para>Note that there are plenty of ways you can use this facility to
3571completely confuse the software, as it may not be able to work out what is
3572going on, or it may simply be ambiguous. It can cope with some ambiguity (e.g.
3573the '-' character is used both for 'MINUS' and for 'OMIT'), but there are
3574limits. If you have a dataset that you can not make <Application>Survex</Application>
3575understand, then send it to us, and we will see what can be done.
3576</Para>
3577-->
3578
3579</Sect3>
3580
3581<!--
3582 Nobody seems to have the CfH convertor...
3583 but it's probably no longer useful anyway
3584
3585<Sect3><Title>Other Converters</Title>
3586
3587<Para>We have an Excel 5 macro for converting The Lotus 123 spreadsheets
3588used by the German survey software Cad F&uuml;r H&ouml;hlen into
3589<Application>Survex</Application> data files. Other converters may also come to be available.
3590These will normally be available via the
3591<ulink url="http://survex.com/"><Application>Survex</Application> Web pages</ulink>.
3592</Para>
3593
3594</Sect3>
3595-->
3596
3597</Sect2>
3598
3599<Sect2><Title>Export data from <Application>Survex</Application></Title>
3600
3601<Para>See Rosetta Stal in the Related Tools section of the Survex web
3602site.  This is a utility written by Taco van Ieperen and Gary Petrie.
3603Note though that this only supports a subset of the svx format,
3604and only work on Microsoft Windows.  The Survex support is limited
3605and doesn't understand the more recently added commands.</Para>
3606
3607</Sect2>
3608
3609<Sect2><Title>See errors and warnings that have gone off the screen</Title>
3610
3611<Para>When you run <Application>Survex</Application> it will process the specified survey data
3612files in order, reporting any warnings and errors.  If there are no
3613errors, the output files are written and various statistics about the
3614survey are displayed. If there are a lot of warnings or errors, they can
3615scroll off the screen and it's not always possible to scroll back to
3616read them.
3617</Para>
3618
3619<Para>The easiest way to see all the text is to use <command>cavern
3620--log</command> to redirect output to a <filename>.log</filename> file,
3621which you can then inspect with a text editor.
3622</Para>
3623
3624<!-- <command>cavern cavename &gt; tmpfile</command> -->
3625
3626</Sect2>
3627
3628<Sect2><Title>Create an Extended Elevation</Title>
3629
3630<Para>Use the Extend program. This takes <filename>.3d</filename> files and
3631'flattens' them.  See 'Extend' for details.
3632</Para>
3633
3634</Sect2>
3635
3636</Sect1>
3637
3638<!--
3639<Sect1><Title>Appendices</Title>
3640<?dbhtml filename="appendix.htm">
3641
3642<Para>Files provided
3643</Para>
3644
3645<Para>Command specification
3646</Para>
3647
3648</Sect1>
3649-->
3650<Sect1><Title>Working with Larry Fish's Compass</Title>
3651<?dbhtml filename="compass.htm">
3652
3653<Para>
3654Survex can read Compass survey data - both raw data (.DAT and .MAK
3655files) and processed survey data (.PLT and .PLF files).  You can even
3656use <command>*include compassfile.dat</command> in a <filename>.svx</filename> file and
3657it'll work!
3658</Para>
3659
3660<Para>
3661One point to note (this tripped us up!): station names in DAT files are
3662case sensitive and so Survex reads DAT files with the equivalent of
3663<command>*case preserve</command>.  The default in SVX files is
3664<command>*case lower</command>.  So this won't work:
3665
3666<programlisting>
3667*fix CE1 0 0 0
3668*include datfilewhichusesCE1.dat</programlisting>
3669
3670Because the CE1 in the *fix is actually interpreted as ce1.  This is
3671what you have to do:
3672
3673<programlisting>
3674*begin
3675*case preserve
3676*fix CE1 0 0 0
3677*include datfilewhichusesCE1.dat
3678*end</programlisting>
3679</Para>
3680
3681</Sect1>
3682
3683<Sect1><Title>Mailing List</Title>
3684<?dbhtml filename="maillist.htm">
3685
3686<Para>The best way to contact the authors and other Survex users is the
3687Survex mailing list - for details visit:
3688<ulink url="http://survex.com/maillist.html">http://survex.com/maillist.html</ulink>
3689</Para>
3690
3691<Para>We'd be delighted to hear how you get on with <Application>Survex</Application> and
3692welcome comments and suggestions for improvements.</Para>
3693
3694<Para>
3695And we'd love you to contribute your skills to help make <Application>Survex</Application> even
3696better.  Point out areas of the documentation which could be made clearer, or
3697sections which are missing entirely.  Download test releases, try them out, and
3698let us know if you find problems or have suggestions for improvements.
3699If there's no translation to your language, you could provide one.
3700Or if your a developer, <emphasis>"Say it with code"</emphasis>.  There's
3701plenty to do, so feel free to join in.
3702</Para>
3703
3704</Sect1>
3705
3706<Sect1><Title>Future Developments</Title>
3707<?dbhtml filename="future.htm">
3708
3709<Para>
3710Now that <Application>Survex</Application> has reached version 1.0, we are continuing progress
3711towards version 2, in a series of steps, evolving out of
3712Survex 1.0.  The GUI framework is being based on aven, with
3713the printer drivers and other utility programs being pulled in
3714and integrated into the menus.</Para>
3715
3716<Para>Aven is built on <Application>wxWidgets</Application>, which means that it can easily support
3717Unix, Microsoft Windows, and Mac OS X.</Para>
3718
3719<Para>More information on our plans is on the <ulink
3720url="http://survex.com/">web site</ulink>.
3721</Para>
3722
3723</Sect1>
3724
3725</article>
Note: See TracBrowser for help on using the repository browser.