|
29 | 29 |
|
30 | 30 | import re |
31 | 31 | import math |
32 | | -from enum import Enum |
| 32 | +from enum import Enum, Flag |
33 | 33 | from typing import ( |
34 | 34 | TypeAlias, |
35 | 35 | Literal, |
@@ -926,3 +926,150 @@ class Coordinate(Vector): |
926 | 926 | 3.0 |
927 | 927 |
|
928 | 928 | """ |
| 929 | + |
| 930 | + |
| 931 | +class POSITION(Enum): |
| 932 | + """Positioning mode.""" |
| 933 | + NORMAL = 0 |
| 934 | + PRECISE = 1 |
| 935 | + |
| 936 | + |
| 937 | +class ADJUST(Enum): |
| 938 | + """ATR adjustment tolerance mode.""" |
| 939 | + NORMAL = 0 |
| 940 | + POINT = 1 |
| 941 | + |
| 942 | + |
| 943 | +class ATR(Enum): |
| 944 | + """ATR mode.""" |
| 945 | + POSITION = 0 # : Position to angles. |
| 946 | + TARGET = 1 # : Position to target near angles. |
| 947 | + |
| 948 | + |
| 949 | +class TURN(Enum): |
| 950 | + """Turning direction.""" |
| 951 | + CLOCKWISE = 1 |
| 952 | + COUNTERCLOCKWISE = -1 |
| 953 | + |
| 954 | + |
| 955 | +class MEASUREPROGRAM(Enum): |
| 956 | + NOMEASURE = 0 # : No measurement, take last value. |
| 957 | + NODISTANCE = 1 # : No distance measurement, angles only. |
| 958 | + DISTANCE = 2 # : Default distance measurement. |
| 959 | + TRACK = 3 # : Tracking distance measurement. |
| 960 | + RAPIDTRACK = 4 # : Rapid tracking distance measurement. |
| 961 | + CLEAR = 5 # : Clear distances. |
| 962 | + STOPTRACK = 6 # : Stop tracking. |
| 963 | + |
| 964 | + |
| 965 | +class SHUTDOWN(Enum): |
| 966 | + """Instrument software stop mode.""" |
| 967 | + SHUTDOWN = 0 |
| 968 | + SLEEP = 1 |
| 969 | + |
| 970 | + |
| 971 | +class STARTUP(Enum): |
| 972 | + """Instrument startup mode.""" |
| 973 | + LOCAL = 0 # : Manual mode. |
| 974 | + REMOTE = 1 # : GeoCom mode. |
| 975 | + |
| 976 | + |
| 977 | +class DEVICECLASS(Enum): |
| 978 | + """Instrument accuracy class.""" |
| 979 | + CLASS_1100 = 0 #: TPS1000 3" |
| 980 | + CLASS_1700 = 1 #: TPS1000 1.5" |
| 981 | + CLASS_1800 = 2 #: TPS1000 1" |
| 982 | + CLASS_5000 = 3 #: TPS2000 |
| 983 | + CLASS_6000 = 4 #: TPS2000 |
| 984 | + CLASS_1500 = 5 #: TPS1000 |
| 985 | + |
| 986 | + |
| 987 | +class CAPABILITIES(Flag): |
| 988 | + """Instrument capabilities.""" |
| 989 | + T = 0x00000 #: Theodolite |
| 990 | + TC1 = 0x00001 # TPS1000 |
| 991 | + TC2 = 0x00002 # TPS1000 |
| 992 | + MOT = 0x00004 #: Motorized |
| 993 | + ATR = 0x00008 #: ATR |
| 994 | + EGL = 0x00010 #: Guide Light |
| 995 | + DB = 0x00020 #: Database |
| 996 | + DL = 0x00040 #: Diode laser |
| 997 | + LP = 0x00080 #: Laser plumb |
| 998 | + # SIM = 0x04000 # TPSSim |
| 999 | + |
| 1000 | + |
| 1001 | +class TRACKLIGHT(Enum): |
| 1002 | + """Tracking light brightness""" |
| 1003 | + LOW = 0 |
| 1004 | + MID = 1 |
| 1005 | + HIGH = 2 |
| 1006 | + |
| 1007 | + |
| 1008 | +class ATRLOCK(Enum): |
| 1009 | + """ATR lock status.""" |
| 1010 | + NONE = 0 |
| 1011 | + LOCK = 1 |
| 1012 | + PREDICT = 2 |
| 1013 | + |
| 1014 | + |
| 1015 | +class STOPMODE(Enum): |
| 1016 | + """Servo motor stopping mode.""" |
| 1017 | + NORMAL = 0 # : Slow down with current acceleration. |
| 1018 | + SHUTDOWN = 1 # : Slow down by motor power termination. |
| 1019 | + |
| 1020 | + |
| 1021 | +class CONTROLLER(Enum): |
| 1022 | + """Motor controller operation mode.""" |
| 1023 | + POSITIONING = 0 # : Relative positioning. |
| 1024 | + MOVE = 1 # : Constant speed. |
| 1025 | + MANUAL = 2 # : Manual positioning. |
| 1026 | + LOCK = 3 # : Lock-in controller. |
| 1027 | + BREAK = 4 # : Break controller. |
| 1028 | + # 5, 6 do not use (why?) |
| 1029 | + TERMINATE = 7 # : Terminate current task. |
| 1030 | + |
| 1031 | + |
| 1032 | +class AUTOPOWER(Enum): |
| 1033 | + """Automatic power off mode.""" |
| 1034 | + DISABLED = 0 # : Automatic poweroff disabled. |
| 1035 | + SLEEP = 1 # : Put instument into sleep mode. |
| 1036 | + SHUTDOWN = 2 # : Poweroff instrument. |
| 1037 | + |
| 1038 | + |
| 1039 | +class INCLINATION(Enum): |
| 1040 | + """Inclination calculation mode.""" |
| 1041 | + MEASURE = 0 # : Measure inclination. |
| 1042 | + AUTO = 1 # : Automatic inclination handling. |
| 1043 | + PLANE = 2 # : Model inclination from previous measurements. |
| 1044 | + |
| 1045 | + |
| 1046 | +class MEASURE(Enum): |
| 1047 | + STOP = 0 # : Stop measurement program. |
| 1048 | + DISTANCE = 1 # : Default distance measurement. |
| 1049 | + TRACK = 2 # : Track distance. |
| 1050 | + CLEAR = 3 # : Clear current measurement data. |
| 1051 | + SIGNAL = 4 # : Signal intensity measurement. |
| 1052 | + RAPIDTRACK = 8 # : Rapid track distance. |
| 1053 | + |
| 1054 | + |
| 1055 | +class EDMMODE(Enum): |
| 1056 | + """Distance measurement mode.""" |
| 1057 | + SINGLE_STANDARD = 0, # : Standard single measurement. |
| 1058 | + SINGLE_EXACT = 1, # : Exact single measurement. |
| 1059 | + SINGLE_FAST = 2, # : Fast single measurement. |
| 1060 | + CONT_STANDARD = 3, # : Repeated measurement. |
| 1061 | + CONT_EXACT = 4, # : Repeated average measurement. |
| 1062 | + CONT_FAST = 5, # : Fast repeated measurement. |
| 1063 | + UNDEFINED = 6 # : Not defined. |
| 1064 | + |
| 1065 | + |
| 1066 | +class FACEDEF(Enum): |
| 1067 | + """Instrument view face.""" |
| 1068 | + NORMAL = 0 |
| 1069 | + TURN = 1 |
| 1070 | + |
| 1071 | + |
| 1072 | +class FORMAT(Enum): |
| 1073 | + """Recording format.""" |
| 1074 | + GSI8 = 0 |
| 1075 | + GSI16 = 1 |
0 commit comments