Basic Applications

Description

Module: geocompy.geo.bap

Definitions for the GeoCOM Basic applications subsystem.

Types

  • GeoComBAP

Definitions

class GeoComBAP(parent: GeoComType)[source]

Basic applications subsystem of the GeoCOM protocol.

This subsystem contains high-level functions that are also accessible through the user interface. The commands combine several subcommands for ease of operation.

Parameters:
parent: GeoComType

The parent protocol instance of this subsystem.

get_atr_setting() GeoComResponse[ATRMode][source]

RPC 17034, BAP_GetATRSetting

Added in version GeoCOM-TPS1200.

Gets the current ATR setting.

Returns:

Params:
  • ATRMode: Current ATR setting.

Return type:

GeoComResponse

See also

set_atr_setting

get_last_displayed_error() GeoComResponse[tuple[int, int]][source]

RPC 17003, BAP_GetLastDisplayedError

Removed in version GeoCOM-TPS1200.

Retrieves the number of the last displayed system error.

Returns:

Params:
  • int: Last error, warning or info number.

  • int: Corresponding GSI error number.

Error codes:
  • IVRESULT: No error was displayed since last call.

Return type:

GeoComResponse

Note

The error code will be reset once command is executed. A repeated call will be unsuccessful.

get_measurement_program() GeoComResponse[UserProgram][source]

RPC 17018, BAP_GetMeasPrg

Gets the current measurement program.

Returns:

Params:
  • UserProgram: Current measurement program.

Return type:

GeoComResponse

get_precise_atr_status() GeoComResponse[bool][source]

RPC 17039, BAP_GetATRPrecise

Added in version GeoCOM-VivaTPS.

Gets the current state of the precise ATR mode.

Returns:

Params:
  • bool: Precise ATR mode is enabled.

Return type:

GeoComResponse

get_prism_definition(prism: Prism | str) GeoComResponse[tuple[str, float, Reflector]][source]

RPC 17023, BAP_GetPrismDef

Added in version GeoCOM-TPS1100.

Gets the definition of the default prism.

Parameters:
prism: Prism | str

Prism type to query.

Returns:

Params:
  • str: Name of the prism.

  • float: Additive prism constant.

  • Reflector: Reflector type.

Error codes:
  • IVPARAM: Invalid prism type.

Return type:

GeoComResponse

get_prism_type() GeoComResponse[Prism][source]

RPC 17009, BAP_GetPrismType

Added in version GeoCOM-TPS1100.

Gets the current prism type.

Returns:

Params:
  • Prism: Current prism type.

Error codes:
  • IVRESULT: EDM is set to reflectorless mode.

Return type:

GeoComResponse

See also

set_prism_type

get_prism_type_name() GeoComResponse[tuple[Prism, str]][source]

RPC 17031, BAP_GetPrismType2

Added in version GeoCOM-TPS1200.

Gets the current prism type and name.

Returns:

Params:
  • Prism: Current prism type.

  • str: Prism type name.

Return type:

GeoComResponse

get_reduced_atr_fov_status() GeoComResponse[bool][source]

RPC 17036, BAP_GetRedATRFov

Added in version GeoCOM-TPS1200.

Gets the state of the reduced ATR field of view mode.

Returns:

Params:
  • bool: Reduced field of view ATR is enabled.

Return type:

GeoComResponse

get_target_type() GeoComResponse[Target][source]

RPC 17022, BAP_GetTargetType

Added in version GeoCOM-TPS1100.

Gets the current EDM target type.

Returns:

Params:
  • Target: Current EMD target type.

Return type:

GeoComResponse

See also

set_target_type

get_user_prism_definition(name: str) GeoComResponse[tuple[float, Reflector, str]][source]

RPC 17033, BAP_GetUserPrismDef

Added in version GeoCOM-TPS1200.

Gets the definition of a user defined prism.

Parameters:
name: str

Name of the prism.

Returns:

Params:
  • float: Additive prism constant.

  • Reflector: Reflector type.

  • str: Creator of the prism definition.

Error codes:
  • IVPARAM: Invalid prism definition.

Return type:

GeoComResponse

measure_distance_angle(mode: Program | str = Program.DISTANCE) GeoComResponse[tuple[Angle, Angle, float, Program]][source]

RPC 17017, BAP_MeasDistanceAngle

Take an angle and distance measuremnt depending on the distance mode.

Parameters:
mode: Program | str = Program.DISTANCE

Distance measurement mode to use, by default Program.DISTANCE

Returns:

Params:
  • Angle: Horizontal angle.

  • Angle: Vertical angle.

  • float: Slope distance.

  • MEASUREPRG: Actual distance mode.

Info codes:
  • TMC_ACCURACY_GUARANTEE: Accuracy cannot be guaranteed.

  • TMC_ANGLE_ACCURACY_GUARANTEE: Only angle measurement valid, accuracy cannot be guaranteed.

Warning codes:
  • TMC_ANGLE_NO_FULL_CORRECTION: Only angle measurement valid, accuracy cannot be guaranteed.

  • TMC_ANGLE_OK: Only angle measurement valid.

  • TMC_NO_FULL_CORRECTION: Measurement without full correction.

Error codes:
  • AUT_ANGLE_ERROR: Angle measurement error.

  • AUT_BAD_ENVIRONMENT: Bad environmental conditions.

  • AUT_CALACC: ATR calibration failed.

  • AUT_DETECTOR_ERROR: Error in target acquisition.

  • AUT_DETENT_ERROR: Positioning not possible.

  • AUT_DEV_ERROR: Error in angle deviation calculation.

  • AUT_INCACC: Position not exactly reached.

  • AUT_MOTOR_ERROR: Motorization error.

  • AUT_MULTIPLE_TARGETS: Multiple targets detected.

  • AUT_NO_TARGET: No target detected.

  • AUT_TIMEOUT: Position not reached.

  • BAP_CHANGE_ALL_TO_DIST: Prism not detected, changed command to ALL.

  • TMC_ANGLE_ERROR: No valid angle measurement.

  • TMC_BUSY: TMC submodule already in use by another subsystem, command not processed.

  • TMC_DIST_ERROR: An error occurred during distance measurement.

  • TMC_DIST_PPM: Wrong PPM setting.

  • TMC_SIGNAL_ERROR: No signal on EDM (only in signal mode).

  • ABORT: Measurement aborted.

  • COM_TIMEDOUT: Communication timeout.

  • IVPARAM: Invalid distance mode.

  • SHUT_DOWN: System stopped.

Return type:

GeoComResponse

search_target() GeoComResponse[None][source]

RPC 17020, BAP_SearchTarget

Added in version GeoCOM-TPS1100.

Executes target search in the predefined window.

Returns:

Error codes:
  • AUT_BAD_ENVIRONMENT: Bad environmental conditions.

  • AUT_DEV_ERROR: Error in angle deviation calculation.

  • AUT_ANGLE_ACCURACY: Position not exactly reached.

  • AUT_MOTOR_ERROR: Motorization error.

  • AUT_MULTIPLE_TARGETS: Multiple targets detected.

  • AUT_NO_TARGET: No target detected.

  • AUT_TIMEOUT: Position not reached.

  • ABORT: Measurement aborted.

  • FATAL: Fatal error.

Return type:

GeoComResponse

See also

aut.get_spiral, aut.set_spiral, aut.get_search_area, aut.set_search_area

set_atr_setting(mode: ATRMode | str) GeoComResponse[None][source]

RPC 17035, BAP_SetATRSetting

Added in version GeoCOM-TPS1200.

Sets the ATR setting.

Parameters:
mode: ATRMode | str

ATR setting to activate.

See also

get_atr_setting

set_measurement_program(program: UserProgram | str) GeoComResponse[None][source]

RPC 17019, BAP_SetMeasPrg

Sets a new measurement program.

Parameters:
program: UserProgram | str

Measurement program to set.

Returns:

Error codes:
  • IVPARAM: Measurement program is not available.

Return type:

GeoComResponse

set_prism_definition(prism: Prism | str, name: str, const: float, reflector: Reflector | str) GeoComResponse[None][source]

RPC 17024, BAP_SetPrismDef

Added in version GeoCOM-TPS1100.

Removed in version GeoCOM-TPS1200.

Defines a user prism.

Parameters:
prism: Prism | str

Type of the new prism. (Can be USER1, 2 and 3.)

name: str

Definition name. (Maximum 16 characters. Longer names will be truncated.)

const: float

Additive prism constant.

reflector: Reflector | str

Reflector type.

Returns:

Error codes:
  • IVPARAM: Invalid prism type.

Return type:

GeoComResponse

set_prism_type(prism: Prism | str) GeoComResponse[None][source]

RPC 17008, BAP_SetPrismType

Added in version GeoCOM-TPS1100.

Sets the prism type. Prism change also overwrites the current prism constant.

Parameters:
prism: Prism | str

New prism type to set.

Returns:

Error codes:
  • IVPARAM: Prism type is not available.

Return type:

GeoComResponse

See also

get_prism_type

set_prism_type_name(prism: Prism | str, name: str) GeoComResponse[None][source]

RPC 17030, BAP_SetPrismType2

Added in version GeoCOM-TPS1200.

Sets the prism type and name.

Parameters:
prism: Prism | str

Prism type to set.

name: str

Name of the prism type.

Returns:

Error codes:
  • IVPARAM: Prism type is not available, a user prism is not defined.

Return type:

GeoComResponse

See also

get_prism_type_name, tmc.set_prism_correction

set_target_type(target: Target | str) GeoComResponse[None][source]

RPC 17021, BAP_SetTargetType

Added in version GeoCOM-TPS1100.

Sets the EDM target type. The last target type is remembered for all EDM modes.

Parameters:
target: Target | str

New EDM target type to set.

Returns:

Error codes:
  • IVPARAM: Target type is not available.

Return type:

GeoComResponse

set_user_prism_definition(name: str, const: float, reflector: Reflector | str, creator: str) GeoComResponse[None][source]

RPC 17032, BAP_SetUserPrismDef

Added in version GeoCOM-TPS1200.

Defines a new user defined prism.

Parameters:
name: str

Name of the prism.

const: float

Additive prism constant.

reflector: Reflector | str

Reflector type.

creator: str

Name of the creator.

Returns:

Error codes:
  • IVPARAM: Invalid prism definition.

  • IVRESULT: Prism definition is not set.

Return type:

GeoComResponse

switch_precise_atr(enabled: bool) GeoComResponse[None][source]

RPC 17040, BAP_SetATRPrecise

Added in version GeoCOM-VivaTPS.

Sets the state of the precise ATR mode.

Parameters:
enabled: bool

Precise ATR mode is enabled.

Return type:

GeoComResponse

switch_reduced_atr_fov(enabled: bool) GeoComResponse[None][source]

RPC 17037, BAP_SetRedATRFov

Added in version GeoCOM-TPS1200.

Sets the state of the reduced ATR field of view mode.

Parameters:
enabled: bool

Reduced field of view ATR is enabled.