Python library for Leica GeoCOM Total Station communication
Project description
pyGeoCOM
Python library for Leica GeoCOM Total Station communication
Overview
pyGeoCOM is a Python module designed to facilitate communication with Leica GeoCOM-compatible total stations. It provides a clean and modular interface to control total stations, perform measurements, and manage geodetic data efficiently.
Features
- Control Leica total stations via serial communication
- Support for various measurement modes and instrument settings
- Enum-based constants for clear and safe API usage
- Modular design with separated geodetic classes and communication logic
- Easily extendable for different Leica GeoCOM models
Implemented GeoCOM Commands
| Method | Command Format | Description |
|---|---|---|
do_measure(command, mode) |
%R1Q,2008:{command.value},{mode.value} |
Start measurement with mode and sensor program |
edm_laserpointer(state) |
%R1Q,1004:{state.value} |
Enable/disable laser pointer |
fine_adjust(hz_area, v_area) |
%R1Q,9037:{hz_area},{v_area},0 |
Perform fine adjustment |
get_angle1(mode) |
%R1Q,2003:{mode.value} |
Get complete angle measurement |
get_atm_correction() |
%R1Q,2029: |
Get atmospheric correction data |
get_edm_mode() |
%R1Q,2021: |
Get EDM measurement mode |
get_fine_adjust_mode() |
%R1Q,9030: |
Get fine adjustment mode |
get_incline_switch() |
%R1Q,2007: |
Get inclination switch status |
get_instrument_name() |
%R1Q,5004: |
Get instrument name |
get_instrument_number() |
%R1Q,5003: |
Get instrument number |
get_internal_temperature() |
%R1Q,5011: |
Get internal temperature |
get_prism_constant() |
%R1Q,2023: |
Get prism constant |
get_software_version() |
%R1Q,5034: |
Get software version |
get_simple_measurement(...) |
%R1Q,2108:{wait_time},{mode.value} |
Request simple measurement |
search_target() |
%R1Q,17020:0 |
Start target search |
set_atm_correction(atm) |
%R1Q,2028:{atm} |
Set atmospheric correction data |
set_fine_adjust_mode(adj_mode) |
%R1Q,9031:{adj_mode} |
Set fine adjustment mode |
set_incline_switch(state) |
%R1Q,2006:{state.value} |
Set inclination switch status |
set_telescope_position(...) |
%R1Q,9027:{direction},{zenith},{pos_mode},{atr_mode},0 |
Set telescope position |
set_telescope_to_second_face(...) |
%R1Q,9028:{pos_mode},{atr_mode},0 |
Set telescope to second face |
set_user_atr_state(state) |
%R1Q,18005:{state.value} |
Set user ATR state |
turn_off() |
%R1Q,112:0 |
Turn off instrument |
wake_up() |
%R1Q,18006:\r\n |
Wake up instrument |
High-Level Adapter Methods
The library provides additional high-level helper methods that simplify common TotalStation workflows such as positioning, atmospheric correction, and automated measurements.
Measure Current Target
measurement = ts.measure(
target_nr="P100",
atmo=atmo,
measure_time=datetime.now()
)
Starts a measurement cycle and automatically retries until a valid distance is returned.
Move Telescope to Target
ts.move_to(
target,
face=FaceDef.TMC_FACE_NORMAL
)
Moves the telescope to the specified target position. Second-face measurements are supported automatically.
Measure Target
measurement = ts.measure_target(
target,
atmospheric_data,
datetime.now()
)
Combines:
- telescope positioning
- atmospheric correction setup
- distance measurement
into a single high-level workflow.
Create Atmospheric Correction
atm = ts.create_atm_correction(atmospheric_data)
Creates GeoCOM-compatible atmospheric correction data from pressure and temperature values.
Installation
Install via pip:
pip install pygeocom
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygeocom-0.2.0.tar.gz.
File metadata
- Download URL: pygeocom-0.2.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f59eacafd72526559fc8759a36ecf6b55f36887cf60ca0467d380efd2f15ba8
|
|
| MD5 |
cdee66ffb38266f83aa63d28f55e30c3
|
|
| BLAKE2b-256 |
7eb3ef294855dd624ca88afbe049d593652d5360604e22f03e6ec3cc9007e483
|
File details
Details for the file pygeocom-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pygeocom-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
501e9425afb5d1ccf6b687a06d4722662fe728bee8e1fb7b72d5a7372af9fe01
|
|
| MD5 |
0a8680353606b1366e2524b1779eef53
|
|
| BLAKE2b-256 |
deeb7f07bc9e7ce8e87957f2293eaaf16bc5c3a7042ae30be7f6f7ba34d7bf30
|