source: git/doc/manual.sgml @ 38335b7

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change on this file since 38335b7 was 38335b7, checked in by Olly Betts <olly@…>, 9 years ago

doc/: Eliminate uses of Null End Tag, as a step towards making the
docs valid XML rather than just SGML.

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