4.1. Dini Converter
4.1.1. Overview
The Dini Converter imports raw measurement files (.DAT) from the Trimble DiNi digital level and produces structured Excel (.xlsx) workbooks. It supports both single-line leveling (BF method) and dual-line leveling (Cholesky / SSDP methods), auto-detecting the format from the file content.
The Trimble DiNi is a high-precision digital level used in geodetic and engineering leveling. It records staff readings, horizontal distances, and accumulated heights in the M5 data format — a fixed-width, pipe-delimited text format stored in .DAT files on the instrument’s internal memory or USB stick. The Dini Converter parses this format and organizes the data into clearly structured spreadsheet tables suitable for quality control, archiving, and reporting.
The tool opens as an embedded tab in the main SurveyTools window under Conversions > Dini Converter.
4.1.2. About the Trimble DiNi Instrument
The Trimble DiNi is a family of digital levels (DiNi 0.3, DiNi 0.7, DiNi 1.0, DiNi 1.3) designed for precise leveling work. The instrument measures staff readings electronically by analyzing the bar-code pattern on an invar leveling staff and records measurements digitally.
Key characteristics:
Electronic staff reading with bar-code recognition
Horizontal distance measurement via staff image analysis
Dual-axis compensator for automatic leveling
Built-in measurement programs: line leveling, intermediate sights, stake-out
Internal memory with project management
Data export in M5 format (
.DATfiles)
4.1.2.1. Leveling Methods
The DiNi supports several observation methods for line leveling. Each method defines the order of backsight (B) and foresight (F) readings at each instrument setup:
Single-line methods:
Method |
Reading Sequence |
Description |
|---|---|---|
BF |
Backsight, Foresight |
Simple sequence. One reading per staff per setup. |
BFFB |
Backsight, Foresight, Foresight, Backsight |
Double measurement with reversed order. Compensates for instrument settlement between readings. |
In single-line mode, each setup records one backsight (Rb) to the rear staff and one foresight (Rf) to the forward staff. The height difference at each setup is computed as \(\Delta h = Rb - Rf\). The instrument also records timestamps and horizontal distances (HD) for each reading.
Dual-line methods (Cholesky / SSDP):
Dual-line leveling runs two independent leveling lines simultaneously between the same benchmarks. Each setup observes two staffs from two different horizontal circle orientations:
Circle 1xx (e.g. 118.0) — Face I readings
Circle 2xx (e.g. 218.0) — Face II readings
The observation sequence per setup is: Rb (circle 1), Rb (circle 2), Rf (circle 2), Rf (circle 1). This produces two independent height differences per setup that can be compared for quality control.
Available dual-line methods include:
ChSp — Cholesky Simple (readings clockwise to rods)
ChAd — Cholesky Advanced (readings clockwise and anticlockwise)
HQ / HQQH / HQHQ — Single Station Dual Points methods (SSDP)
Note
Dual-line mode must be enabled in the instrument’s Configuration > Instrument Settings before starting a leveling line. See Trimble DiNi User Guide, Chapter 5, Section “Dual lines leveling”.
4.1.3. The M5 Data Format
The DiNi stores all measurement data in the M5 format, a fixed-width text format with pipe-delimited fields. Each data line is 121 characters long and contains up to 5 data blocks, each preceded by a type identifier.
4.1.3.1. M5 Line Structure
Every line in a .DAT file follows this general structure:
For M5|Adr NNNNN|FIELD2|VALUE3|VALUE4|VALUE5|
Field |
Description |
|---|---|
|
Format identifier (columns 1–6), always “For M5” |
|
Memory address (columns 8–16), sequential line number (1 to 99999) |
|
Information block (columns 18–48): record type and point identification |
|
Value block 3 (columns 50–66): first measurement value with type identifier and unit |
|
Value block 4 (columns 68–89): second measurement value |
|
Value block 5 (columns 91–117): third measurement value |
Fields are separated by the pipe character | (ASCII 124).
4.1.3.2. Record Types
The information block (FIELD2) begins with a type identifier that determines the record kind:
TO — Text/Control Record:
Used for file headers, timestamps, line start/end markers, and comments.
For M5|Adr 1|TO gn21c05.dat | | | |
For M5|Adr 2|TO Start-Line BF 63| | | |
For M5|Adr 27|TO End-Line 1| | | |
Key TO records recognized by the converter:
Start-Line— marks the beginning of a leveling span, includes the measuring method (BF, BFFB, ChSp, etc.) and span/line numberEnd-Line— marks the end of a leveling span
KD1 — Measurement Record:
Contains individual staff readings with point identification, measurement values, and optional timestamps or circle readings.
For M5|Adr 4|KD1 RIONW 10:49:313 63|Rb 1.69682 m |HD 11.444 m | |
For M5|Adr 8|KD1 1 10:53:053 63|Rf 1.44357 m |HD 18.005 m | |
For M5|Adr 9|KD1 1 10:53:05 63| | |Z 0.25325 m |
For M5|Adr 11|KD1 00-46 118.0 C 3 1|Rb 0.40115 m |HD 20.868 m | |
For M5|Adr 12|KD1 00-46 218.0 C 3 1|Rb 0.40122 m |HD 20.866 m | |
For M5|Adr 15|KD1 1 118.0 C 3 1|Rf 1.85205 m |HD 26.051 m | |
The KD1 information block contains:
Point name (8 characters) — the benchmark or turning point identifier
Timestamp (single-line mode) — format
HH:MM:SSnwherenis the number of readingsCircle reading (dual-line mode) — e.g.
118.0(Face I) or218.0(Face II)Line number (last characters) — the leveling line/span number
The value blocks carry the measurement type identifiers:
Type ID |
Description |
|---|---|
Rb |
Staff reading in backsight (meters) |
Rf |
Staff reading in foresight (meters) |
HD |
Horizontal distance to staff (meters) |
Z |
Cumulative height from span start (meters) |
Sh |
Total height difference of complete line (meters) |
Db |
Sum of backsight distances (meters) |
Df |
Sum of foresight distances (meters) |
sR |
Standard deviation of mean staff reading (multiple measurements) |
Readings marked with # in the point name (e.g. RIONEG#####) indicate rejected or repeated measurements and are excluded from calculations by the converter.
KD2 — Span Summary Record:
Written at the end of each span with accumulated distances and the total height difference.
For M5|Adr 40|KD2 RIONEG 5 63|Db 83.84 m |Df 90.43 m |Z 0.01133 m |
For M5|Adr 24|KD2 0+826 1 2 1|Db 26.36 m |Df 30.71 m |Z -0.83739 m |
For M5|Adr 26|KD2 0+826 2 2 1|Db 25.62 m |Df 30.34 m |Z -0.83778 m |
The converter uses the number of tokens in KD2 records to auto-detect the leveling mode: 5 tokens indicate dual-line mode, 4 tokens indicate single-line mode.
4.1.3.3. Format Auto-Detection
The converter performs a pre-scan of all KD2 records before parsing. If any KD2 record contains 5 space-separated tokens (point, line number, setup count, span ID), the file is classified as dual-line. Otherwise, it is processed as single-line.
This detection is fully automatic — the user does not need to specify the leveling method.
4.1.4. Getting Started
Open the Dini Converter from the sidebar under Conversions > Dini Converter. The tool opens as a tab in the main window.
Click Add to select one or more
.DATfiles exported from the Trimble DiNi instrument.The output file path is auto-filled based on the first input file. Use Browse to change it.
Select the closure tolerance method for dual-line leveling (see Closure Tolerance for detailed theory):
Distance-based (default) — select one of:
Precise — \(4 \sqrt{K}\) mm
Engineering — \(8 \sqrt{K}\) mm
Rough — \(12 \sqrt{K}\) mm
Setup-based — select an instrument preset or enter a custom \(\sigma_s\):
Precise - DiNi 0.3 — \(\sigma_s = 0.3\) mm
Engineering - DiNi 0.7 — \(\sigma_s = 0.7\) mm
Rough - Standard level — \(\sigma_s = 1.5\) mm
Custom — enter any \(\sigma_s\) value in mm
Click Convert to parse all input files and write the merged Excel workbook.
After a successful conversion, click Open File to open the result in your default spreadsheet application (e.g. LibreOffice Calc, Microsoft Excel).
Note
Multiple .DAT files can be combined into a single Excel workbook. Each file produces its own set of sheets. This is useful when a leveling campaign is split across multiple instrument projects.
4.1.5. Excel Output
The converter produces a different sheet structure depending on whether the input file uses single-line or dual-line leveling.
4.1.5.1. Single-Line Output
For each single-line .DAT file, two sheets are created:
Measurements sheet (<filename> Measurements):
One row per instrument setup, with the following columns:
Column |
Description |
|---|---|
Span |
Span/line number |
Setup |
Setup number within span (1-based) |
Start BM |
Benchmark at span start |
End BM |
Benchmark at span end |
Back Pt |
Backsight point name |
Back Time |
Backsight timestamp (HH:MM:SS) |
Rb (m) |
Backsight staff reading (meters) |
Back HD (m) |
Backsight horizontal distance (meters) |
Fore Pt |
Foresight point name |
Fore Time |
Foresight timestamp (HH:MM:SS) |
Rf (m) |
Foresight staff reading (meters) |
Fore HD (m) |
Foresight horizontal distance (meters) |
dZ (m) |
Height difference at this setup (\(Rb - Rf\)) |
Z cumul (m) |
Cumulative height from span start |
Summary sheet (<filename> Summary):
One row per span, with accumulated distances and closure:
Column |
Description |
|---|---|
Span |
Span/line number |
Start BM |
Starting benchmark |
End BM |
Ending benchmark |
Setups |
Number of instrument setups in the span |
Db (m) |
Sum of backsight distances |
Df (m) |
Sum of foresight distances |
Db-Df (m) |
Distance balance (difference between total backsight and foresight distances) |
Z (m) |
Total height difference of the span |
Setups (obs) |
Number of setups actually observed (from parsed data) |
4.1.5.2. Dual-Line Output
For each dual-line .DAT file, three sheets are created:
Line 1 (Face I) sheet:
One row per Face I setup (circle 1xx readings). Columns: Span, Setup, Start BM, End BM, Back Pt, Rb (m), Back HD (m), Fore Pt, Rf (m), Fore HD (m), dZ (m), Z cumul (m). Blank separator rows are inserted between spans for readability, with span summary rows highlighted in blue.
Line 2 (Face II) sheet:
Same structure as Line 1, using Face II data (circle 2xx readings).
Summary sheet:
Side-by-side comparison of both lines for each span:
Column |
Description |
|---|---|
Span |
Span/line number |
Start BM / End BM |
Span benchmarks |
Setups |
Number of setups (from KD2) |
Db, Df (Line 1) |
Backsight and foresight distances for Face I |
Z (Line 1) |
Height difference for Face I |
Db, Df (Line 2) |
Backsight and foresight distances for Face II |
Z (Line 2) |
Height difference for Face II |
dZ |
Difference between Line 1 and Line 2 height differences |
K (km) |
Approximate line length in kilometers: \(K = \frac{Db_1 + Df_1 + Db_2 + Df_2}{4000}\) |
Tol (mm) |
Allowable closure tolerance, computed using the selected method (distance-based or setup-based) |
Spans where \(|dZ|\) exceeds the tolerance are flagged as FAIL; spans within tolerance show OK. The title row of the summary sheet indicates which tolerance method and parameters were used.
4.1.6. Closure Tolerance
The Dini Converter provides two methods for computing the allowable misclosure of a dual-line leveling span. The user selects the method in the tolerance panel before conversion.
For dual-line leveling, the closure is the difference between the height differences measured by the two independent lines:
The span passes the tolerance check when \(|\Delta Z| \leq Tol\).
4.1.6.1. Method 1 — Distance-Based Tolerance
The classical approach assumes that random errors accumulate proportionally to the square root of the leveling line length. The tolerance formula is:
where:
\(T\) is the tolerance factor in mm (4, 8, or 12 depending on accuracy class)
\(K\) is the line length in kilometers, computed as \(K = \frac{Db_1 + Df_1 + Db_2 + Df_2}{4000}\) (average of all four distance sums)
Accuracy classes:
Class |
Formula |
Typical Application |
|---|---|---|
Precise |
\(4 \sqrt{K}\) mm |
Geodetic first-order leveling, deformation monitoring |
Engineering |
\(8 \sqrt{K}\) mm |
Engineering surveys, construction control |
Rough |
\(12 \sqrt{K}\) mm |
Reconnaissance, preliminary surveys |
When to use: This method works well when sight distances are approximately uniform across the leveling line. It is the traditional method used in most national leveling specifications and standards (e.g., ISO 17123-2).
Limitation: When sight distances vary significantly within a line — for example, very short sights in urban areas mixed with long sights in open terrain — the distance-based formula may underestimate or overestimate the expected random error. Two lines of equal length but different numbers of setups will receive the same tolerance, even though the line with more setups has more sources of random error.
4.1.6.2. Method 2 — Setup-Based Tolerance
The setup-based approach is a more rigorous formulation that accounts for the actual number of instrument setups. Each setup introduces independent random errors from staff reading uncertainty, compensator settling, rod plumbness, and local atmospheric refraction. Since these errors are statistically independent, the total standard deviation of the accumulated height difference grows with the square root of the number of setups.
Mathematical basis:
If \(\sigma_s\) is the standard deviation of a single height difference (one backsight-foresight pair), then for \(n\) independent setups, the standard deviation of the total height difference is:
The tolerance at 95% confidence (approximately 2 standard deviations) is:
where:
\(\sigma_s\) is the standard deviation per setup in mm (depends on instrument precision)
\(n\) is the number of instrument setups in the span (from the KD2 record)
The factor 2 corresponds to approximately 95% confidence level
Instrument presets:
Preset |
\(\sigma_s\) |
Formula (95%) |
Instrument Type |
|---|---|---|---|
Precise |
0.3 mm |
\(0.6 \sqrt{n}\) mm |
Trimble DiNi 0.3 (0.3 mm/km std. dev.) |
Engineering |
0.7 mm |
\(1.4 \sqrt{n}\) mm |
Trimble DiNi 0.7 / DiNi 1.0 |
Rough |
1.5 mm |
\(3.0 \sqrt{n}\) mm |
Standard optical / digital levels |
Custom |
user-defined |
\(2 \sigma_s \sqrt{n}\) mm |
Any instrument with known per-setup precision |
When to use: The setup-based method is preferred when:
Sight distances vary significantly within a line (urban/rural transitions)
The number of setups differs substantially between spans of similar length
The instrument’s per-setup precision is well-characterized (from calibration or ISO 17123-2 testing)
Higher rigor is required in the tolerance assessment
Example comparison:
Consider two leveling spans of equal total distance (0.8 km) but different configurations:
Scenario |
Setups |
Avg. sight |
K (km) |
Tol (distance) |
Tol (setup) |
|---|---|---|---|---|---|
Long sights |
5 |
80 m |
0.80 |
3.6 mm |
1.3 mm |
Short sights |
20 |
20 m |
0.80 |
3.6 mm |
2.7 mm |
The distance-based method gives identical tolerances for both scenarios. The setup-based method correctly assigns a tighter tolerance to the 5-setup line (fewer error sources) and a wider tolerance to the 20-setup line (more error sources).
4.1.6.3. Relationship Between the Two Methods
The two formulas are equivalent when sight distances are uniform. If each setup has an average sight distance \(d\) (meters) for both backsight and foresight, then:
Substituting into the distance-based formula:
This has the same \(\sqrt{n}\) dependence as the setup-based formula. At a typical average sight distance of 30 m:
So the precise class \(4\sqrt{K}\) is equivalent to \(0.98\sqrt{n}\) mm, which aligns well with the setup-based precise class (\(0.6\sqrt{n}\) mm at \(1\sigma\), or \(1.2\sqrt{n}\) mm at \(2\sigma\)).
4.1.7. References
Trimble Inc. — Trimble DiNi Digital Level User Guide, Version 6.0, Revision A, September 2017, P/N 57345002. Comprehensive instrument documentation including the M5 data format specification (Chapter 7), leveling measurement programs (Chapter 5), and line adjustment procedures (Chapter 8).
Trimble Inc. — Trimble DiNi Digital Level Quick Start Guide. Abbreviated setup and measurement instructions included with the instrument.
ISO 17123-2 — Optics and optical instruments — Field procedures for testing geodetic and surveying instruments — Part 2: Levels. International standard for testing and calibrating leveling instruments.
Kahmen, H. and Faig, W. — Surveying. Walter de Gruyter, Berlin. Chapter on precise leveling, closure tolerances, and systematic error sources in height determination.