dcmdedit
—
edit dives
dcmdedit |
[ -jsv ]
[file ... ] |
The
dcmdedit
utility can split resulting
single dives into multiple dives or join multiple dives into a single dive.
Its arguments are as follows:
-
-
-j
- Join a sequence of dives within a divelog into a single dive.
-
-
-s
- Split a single dive into a sequence of dives by its surface
intervals.
-
-
-v
- Emit warnings during parse. Specify twice for further debugging
information.
If there are multiple dive computers specified, or multiple divers, the first is
selected to represent all output dives.
Splitting (
-s
) is useful for establishing
“canonical free dive mode”, wherein each dive in a sequence has
its own dive profile and surface time is omitted. Many dive computers
automatically produce canonical free diving mode, for example, the Suunto D6i.
Others, like the HW OSTC 2C, do not, and instead put all dives into one,
including surface time. The new split dives are given a fingerprint formatted
as
fingerprint-num
, where “fingerprint”
is from the dive being split.
Joining (
-j
) is useful when exporting data
into Subsurface, which expects a single dive profile. Here, a set of dives are
merged into a single one. The new merged dive is given a fingerprint formatted
as
fingerprint-join
, where “fingerprint”
is from the first dive entry.
If dives already are split,
-s
does nothing;
same goes with
-j
and dives already being
joined. For both modes, dives not using the same dive computer as the first
(by date) are omitted. The diver identity is ignored.
If invoked using neither
-j
nor
-s
, all dives are merged into a single
divelog. All dives must have the same dive computer as the first (by date),
else they are omitted, and duplicate fingerprints are also omitted.
dcmdedit
produces output on standard output
as documented in
dcmd(1).
The
dcmdedit
utility exits 0 on
success, and >0 if an error occurs.
dcmd(1)
The
dcmdedit
utility was written by
Kristaps Dzonsons,
kristaps@bsd.lv.
Some data (e.g., vendor events) are ignored during conversion. These are
reported to standard error.