source: git/doc/manual.sgml @ 5598e2c

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

doc/manual.sgml,src/commands.c,tests/: Add support for "*cs ijtsk"
and "*cs ijtsk03".

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