leica_gsi
– GSI¶
New in version 0.4.
GEO Serial Interface (GSI) is a very popular data format, used by many Leica total stations (TPS) or Digital Levels (DNA). It is stored as ASCII text, with one line per measurement. In each line, there can be several blocks of data, with a blank space as a separation.
There are two variants of GSI:
GSI8
GSI16
but they only differ in the size of a single block.
GSI is a very rich format, and it can hold both cartesian and polar coordinates with a detailed recording of all commands executed by the device and with explicit indication of the measurement units.
GSI variants¶
GSI8¶
GSI8 has data information recorded in 8 bit words.
110001+0000A110 81..00+00005387 82..00-00000992
110002+0000A111 81..00+00007586 82..00-00003031
GSI6¶
GSI16 has data information recorded in 16 bit words.
110001+000000000PNC0055 21.002+0000000013384650 22.002+0000000005371500
110002+000000000PNC0056 21.002+0000000012802530 22.002+0000000005255000
110003+000000000PNC0057 21.002+0000000011222360 22.002+0000000005433800
110004+000000000PNC0058 21.002+0000000010573550 22.002+0000000005817600
110005+000000000PNC0059 21.002+0000000009983610 22.002+0000000005171400
GSI Block Information¶
Datablock structure¶
Each line is a datablock composed in a sequence of data words, ending with a terminator (CR or CR/LF). There is two types of datablocks specified by the first data word :
Block of measurement (beginning usually with 11)
Block of code (beginning usually with 41)
TPS¶
Data word structure¶
Every word starts with two characters specifying the data type within the word.
Pos.1-3: Word Index (WI)
Pos.4-6: Information related to data
Pos.7: Sign
Pos.8-15/8-23: GSI8/16 data
Pos.16/24: Blank (=separating character)
Position |
Explanation |
Applicable for |
---|---|---|
1-3 |
Word Index |
All words |
4 |
AUTOMATIC INDEX INFORMATION |
All words containing angle information |
5 |
INPUT MODE |
Measured data |
6 |
UNITS |
Measured data |
7 |
SIGN |
Measured data |
8-15 (8-23) |
DATA |
Measured data |
16 (24) |
SEPARATING CHARACTER |
All words |
Word Index¶
WI |
FUNCTION |
Access/Example |
1 |
2 |
3 |
---|---|---|---|---|---|
11* |
Pointnumber |
11… .+00000H66 |
x |
x |
x |
12 |
Serial number |
12….+00640054 |
x |
x |
|
13 |
Instrument type |
13….+00TCR305 |
x |
x |
|
16 |
Station Pointnumbe |
16….+00000100” |
x |
||
17 |
Date |
17….+08022000 |
x |
||
18 |
Year Second |
18….+01130000 |
x |
||
19 |
Time |
19….+02081029 |
x |
x |
|
21* |
Horizontal Angle |
21.102+17920860 |
x |
x |
x |
22* |
Vertical Angle |
22.102+07567500 |
x |
x |
x |
25* |
Horizontal circle difference |
? |
? |
? |
|
31* |
Slope distance |
31..00+00003387 |
x |
x |
x |
32* |
Horizontal distance |
32..00+00003198 |
x |
x |
x |
33* |
Height difference |
33..00+00001119 |
x |
x |
x |
41* |
Code-Block ID |
41….+00000013 |
x |
x |
|
42* |
Information 1 |
42….+000TREES |
x |
x |
|
43* |
Information 2 |
43….+000004.5 |
x |
x |
|
44* |
Information 3 |
44….+00CAT.02 |
x |
x |
|
45* |
Information 4 |
45….+000000NN |
x |
x |
|
46* |
Information 5 |
46….+000000NN |
x |
x |
|
47* |
Information 6 |
47….+000000NN |
x |
x |
|
48* |
Information 7 |
48….+000000NN |
x |
x |
|
49* |
Information 8 |
49….+000000NN |
x |
x |
|
51* |
PPM and Prism constant |
51… .+0220+002 |
x |
x |
|
52 |
Measurement number Standard deviation |
? |
? |
? |
|
53 |
Signal power |
? |
? |
? |
|
58* |
Prism constant |
58..16+00000020 |
x |
x |
x |
59* |
PPM |
59..16+02200000 |
x |
x |
x |
71* |
Remark1 |
71….+0000REM1 |
x |
||
72* |
Remark2 |
72….+0000REM2 |
x |
||
73* |
Remark3 |
73….+0000REM3 |
x |
||
74* |
Remark4 |
74….+0000REM4 |
x |
||
75* |
Remark5 |
75….+0000REM5 |
x |
||
76* |
Remark6 |
76….+0000REM6 |
x |
||
77* |
Remark7 |
77….+0000REM7 “REM7” |
x |
||
78* |
Remark8 |
78….+0000REM8 |
x |
||
79* |
Remark9 |
79….+0000REM9 |
x |
||
81* |
Target Easting (E) |
81..00+01999507 |
x |
x |
x |
82* |
Target Northing (N) |
82..00-00213159 |
x |
x |
x |
83* |
Target Elevation (H) |
83..00+00032881 |
x |
x |
x |
84* |
Station Easting (E0) |
84..11+00393700 |
x |
x |
x |
85* |
Station Northing (N0) |
85..11+06561220 |
x |
x |
x |
86* |
Station Height (H0) |
86..11+00065618 |
x |
x |
x |
87* |
Reflector height (hr) |
87..11+00001700 |
x |
x |
x |
88* |
Instrument height (hi) |
88..11+00001550 |
x |
x |
x |
531 |
Atmos. correction: |
531.16+10130000 |
x |
||
538 |
Coefficient of refraction |
538.16+00001300 |
x |
||
560 |
Time: |
560..6+00105018 |
x |
||
561 |
Date: |
561..6+00020800 |
x |
||
562 |
Year: |
562…+00002000 |
x |
||
590 |
SW-Version: |
590..6+00021000 |
x |
||
591 |
SW-Version: |
591..6+00020000 |
x |
||
592 |
SW-Version: |
592..6+00010000 |
x |
||
593 |
SW-Version: |
593..6+00022000 |
x |
||
594 |
SW-Version: |
594..6+00010000 |
x |
||
595 |
SW-Version: |
595..6+00011100 |
x |
||
913 |
Job |
913…+BLDG.A12 |
x |
||
914 |
Operator |
914…+0MM-3519 |
x |
* implemented WI
- TPS100 Series:
TC403L, TC600, TC800,
TC605/L, TC805/L TC905/L
- TPS300/700 Series:
TC302, TC303, TC305, TC307,
TCR302, TCR303, TCR305, TCR307,
TC702, TC703, TC705,
TCR702, TCR703, TCR705,
TC(R)702 auto, TC(R)703 auto, TC(R)705 auto
- TPS1000/1100 Series:
TC1100/L, TC1500/L, TC1700/L, TC1800/L,
TCM1100/L, TCM1800/L,
TCA1100/L, TCA1800/L· TC1101, TC1102, TC1103, TC1105,
TCR1101, TCR1102, TCR1103, TCR1105,
TCM1101, TCM1102, TCM1103, TCM1105,
TCRM1101, TCRM1102, TCRM1103, TCRM1105,
TCA1101, TCA1102, TCA1103, TCA1105,
TCRA1101, TCRA1102, TCRA1103, TCRA1105
DNA¶
Only for DNA03/DNA10
Data word structure¶
Every word starts with two characters specifying the data type within the word.
Pos.1-3: Word Index (WI)
Pos.4-6: Information related to data
Pos.7: Sign
Pos.8-15/8-23: GSI8/16 data
Pos.16/24: Blank (=separating character)
Position |
Explanation |
Applicable for |
---|---|---|
1-3 |
Word Index |
All words |
4 |
Empty, marked as dot (.) |
All words containing |
5 |
Information about the measurement and
earth-curvature correction. |
Measured data |
6 |
UNITS |
Measured data |
7-15 (7-23) |
DATA |
Measured data |
16 (24) |
SEPARATING CHARACTER |
All words |
Word Index¶
WI |
FUNCTION |
---|---|
11 |
PointID |
12 |
Serial number |
13 |
Instrument type |
17 |
Date Year |
19 |
Day time |
32 |
Horizontal distance |
35 |
Setting-out difference |
41 |
Code-Block ID |
42 |
Information 1 |
43 |
Information 2 |
44 |
Information 3 |
45 |
Information 4 |
46 |
Information 5 |
47 |
Information 6 |
48 |
Information 7 |
49 |
Information 8 |
71 |
Remark |
83 |
Ground height (starting point height or measured height |
95 |
Instrument temperature [°C] |
330 |
Staff reading in “Meas Only” |
331 |
Staff reading, backsight or B1 |
332 |
Staff reading, foresight or F1 |
333 |
Staff reading, intermediate sight |
334 |
Staff reading, setting-out sight |
335 |
Staff reading, B2 |
336 |
Staff reading, F2 |
374 |
Setting-out difference of height measurements |
390 |
Count of repeated measurements |
391 |
Mean mode: Standard deviation of the single measurement |
392 |
Mean mode: Spread of measurements |
560 |
Time: [hh.mm.ss] |
561 |
Date: [mm.dd] |
562 |
Year: [yyyy] |
571 |
Station difference |
572 |
Cumulative station difference |
573 |
Distance balance |
574 |
Total distance (=line length) |
599 |
SoftWare Version |
Units¶
The unit in position 6 of the word is used as following :
Unit |
Number of decimal |
Exemple |
---|---|---|
0: Meter (last digit: 1mm) |
3 |
12345.678 |
1: Feet (last digit: 1/1000ft) |
3 |
12345.678 |
2: 400 gon |
5 |
123.45678 |
3: 360° decimal |
5 |
123.45678 |
4: 360° sexagesimal |
5 |
123.45678 |
5: 6400 mil |
4 |
1234.5678 |
6: Meter (last digit: 1/10mm) |
4 |
1234.5678 |
7: Feet (last digit: 1/10‘000ft) |
4 |
1234.5678 |
8: Meter (last digit: 1/100mm) |
5 |
123.45678 |
Default patterns¶
Most of the time, a GSI file is composed of three type of lines:
a station point with WI 11 [, 25], 84, 85, 86 [, 87], 88
a direct point with WI 11, 81, 82, 83
a measurement with WI 11, 21, 22, 31 or 32 [, 51], 87 [, 88] [, 81, 82, 83]
a comment with WI 41, [42, 43, 44, 45, 46, 47, 48, 49]
WI in [] are optional.
Known limitations¶
- Support for raw measurements is still incomplete, here is a list of TODO:
get coordinates order (NEZ or ENZ)
add missing code for TPS (not with an asterisk on the WI list)
add DNA support
add an option to link comment(s) to either the previous or the next line
add an option to link attribut(s) with his point
add the possibility to customize code
add specific raise functions
Acknowledgements¶
Support for this format was added thanks to Anna Hodgkinson and Hannah Petten at the University of Liverpool. Some details of the implementation are based on the SurveyTools QGIS plugin developed by Stefan Ziegler.
See also
- GSI Online for Leica TPS
Documentation for GSI from Leica.