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 0: Automatic index OFF 1: Automatic index OPERATING 3: Automatic index OPERATING |
All words containing angle information |
5 | INPUT MODE 0: Original measured values transferred from the instrument 1: Manual input from keyboard 2: Measured value, Hz-Correction ON 3: Measured value, Hz-Correction OFF 4: Result of special function |
Measured data |
6 | UNITS 0: Meter (last digit: 1mm) 1: Feet (last digit: 1/1000ft) 2: 400 gon 3: 360° decimal 4: 360° sexagesimal 5: 6400 mil 6: Meter (last digit: 1/10mm) 7: Feet (last digit: 1/10‘000ft) 8: Meter (last digit: 1/100mm) |
Measured data |
7 | SIGN +: Positive value -: Negative value |
Measured data |
8-15 (8-23) | DATA Data includes a sequence of 8(16) numerical or alphanumerical characters. Note that certain data words are allowed to carry more than 1 value (e.g. PPM/MM). Those data are automatically transferred with a sign before each single value. |
Measured data |
16 (24) | SEPARATING CHARACTER _: Blank |
All words |
Word Index¶
WI | FUNCTION | Access/Example | 1 | 2 | 3 |
---|---|---|---|---|---|
11* | Pointnumber | 11… .+00000H66 PtNo=“H66“ |
x | x | x |
12 | Serial number | 12….+00640054 S.No. “640054” |
x | x | |
13 | Instrument type | 13….+00TCR305 Instr. “TCR305” |
x | x | |
16 | Station Pointnumbe | 16….+00000100” St.No. “100” |
x | ||
17 | Date [DD.MM.YYYY] |
17….+08022000 “Feb. 8th 2000” |
x | ||
18 | Year Second [YY.SS.mSmSmS] |
18….+01130000 | x | ||
19 | Time [MM.DD.hh.mm] |
19….+02081029 “Feb. 8th ; 10:29” |
x | x | |
21* | Horizontal Angle Hz |
21.102+17920860 Hz „179.086“ gon |
x | x | x |
22* | Vertical Angle V |
22.102+07567500 V: „75.675“ gon |
x | x | x |
25* | Horizontal circle difference Hz0 - Hz |
? | ? | ? | |
31* | Slope distance | 31..00+00003387 Sdist: „3.387“ m |
x | x | x |
32* | Horizontal distance | 32..00+00003198 Hdist: „3.198“ m |
x | x | x |
33* | Height difference | 33..00+00001119 Hdiff: „1.119“ m |
x | x | x |
41* | Code-Block ID | 41….+00000013 Code: „13“ m |
x | x | |
42* | Information 1 | 42….+000TREES Info1: „TREES“ |
x | x | |
43* | Information 2 | 43….+000004.5 Info2: „4.5“ |
x | x | |
44* | Information 3 | 44….+00CAT.02 Info3: „CAT.02“ |
x | x | |
45* | Information 4 | 45….+000000NN Info4: „NN“ |
x | x | |
46* | Information 5 | 46….+000000NN Info5: „NN“ |
x | x | |
47* | Information 6 | 47….+000000NN Info6: „NN“ |
x | x | |
48* | Information 7 | 48….+000000NN Info7: „NN“ |
x | x | |
49* | Information 8 | 49….+000000NN Info8: „NN“ |
x | x | |
51* | PPM and Prism constant | 51… .+0220+002 PPM „220“ and Prism const „2“ mm |
x | x | |
52 | Measurement number Standard deviation | ? | ? | ? | |
53 | Signal power | ? | ? | ? | |
58* | Prism constant | 58..16+00000020 Prism „2“ mm |
x | x | x |
59* | PPM | 59..16+02200000 PPM „220“ |
x | x | x |
71* | Remark1 (or Attribute 1) |
71….+0000REM1 “REM1” |
x | ||
72* | Remark2 (or Attribute 2) |
72….+0000REM2 “REM2” |
x | ||
73* | Remark3 (or Attribute 3) |
73….+0000REM3 “REM13” |
x | ||
74* | Remark4 (or Attribute 4) |
74….+0000REM4 “REM4” |
x | ||
75* | Remark5 (or Attribute 5) |
75….+0000REM5 “REM5” |
x | ||
76* | Remark6 (or Attribute 6) |
76….+0000REM6 “REM6” |
x | ||
77* | Remark7 (or Attribute 7) |
77….+0000REM7 “REM7” | x | ||
78* | Remark8 (or Attribute 8) |
78….+0000REM8 “REM8” |
x | ||
79* | Remark9 (or Attribute 9) |
79….+0000REM9 “REM9” |
x | ||
81* | Target Easting (E) | 81..00+01999507 E: “1999.507”m |
x | x | x |
82* | Target Northing (N) | 82..00-00213159 N: “-2139.159”m |
x | x | x |
83* | Target Elevation (H) | 83..00+00032881 H: “32.881”m |
x | x | x |
84* | Station Easting (E0) | 84..11+00393700 E: “393.700”m |
x | x | x |
85* | Station Northing (N0) | 85..11+06561220 N: “6561.220”m |
x | x | x |
86* | Station Height (H0) | 86..11+00065618 H: “65.618”m |
x | x | x |
87* | Reflector height (hr) | 87..11+00001700 hr: “1.700” m |
x | x | x |
88* | Instrument height (hi) | 88..11+00001550 hi: “1.550” m |
x | x | x |
531 | Atmos. correction: pressure |
531.16+10130000 “1013” |
x | ||
538 | Coefficient of refraction | 538.16+00001300 1.300” |
x | ||
560 | Time: [hh.mm.ss] |
560..6+00105018 “10:50:18” |
x | ||
561 | Date: [mm.dd] |
561..6+00020800 “2.8.2000” |
x | ||
562 | Year: [yyyy] |
562…+00002000 year “2000” |
x | ||
590 | SW-Version: Application |
590..6+00021000 “V2.10” |
x | ||
591 | SW-Version: Operating system |
591..6+00020000 “V2.00” |
x | ||
592 | SW-Version: OS interface |
592..6+00010000 “V1.00” |
x | ||
593 | SW-Version: GEOCOM |
593..6+00022000 “V2.20” |
x | ||
594 | SW-Version: Gsi communication |
594..6+00010000 “V1.00” |
x | ||
595 | SW-Version: Edm Device |
595..6+00011100 “V1.11” |
x | ||
913 | Job | 913…+BLDG.A12 “BLDG.A12” |
x | ||
914 | Operator | 914…+0MM-3519 “MM-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. 0 = measured; without earth-curvature correction. 1 = entered manually; without earth-curvature correction. 2 = measured; with earth-curvature correction. 5 = entered manually; with earth-curvature correction. |
Measured data |
6 | UNITS 0: Meter (last digit: 1mm) 1: Feet (last digit: 1/1000ft) 6: Meter (last digit: 1/10mm) 7: Feet (last digit: 1/10‘000ft) 8: Meter (last digit: 1/100mm) |
Measured data |
7-15 (7-23) | DATA Data includes a sequence of 8(16) numerical or alphanumerical characters. |
Measured data |
16 (24) | SEPARATING CHARACTER _: Blank |
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.