source: git/doc/manual.sgml @ 41e98ad

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

doc/manual.sgml: Fix broken markup introduced by recent changes.

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