Alignment direction เป็นการคำนวณหาค่าพิกัด 3 มิติ (3D-Coordinate) ที่ระยะ Chainage และระยะ Offset ใดๆ หรือการคำนวณหาระยะ Chainage และระยะ Offset ที่ค่าพิกัด 3 มิติ (3D-Coordinate) ใดๆ จากข้อมูล Setting-out Alignment (ARRAY) สำหรับการทำงานสำรวจ เช่น วางตำแหน่งแนวอุโมงทุกๆระยะ Chainage 25 เมตร ในโครงการ, นำข้อมูลแนวอุโมงค์ทุกๆระยะ Chainage 50 เซนติเมตร ใส่ในหัวเจาะอุโมงค์ (Tunnel Boring Machine) เป็นต้น
ผู้เขียนได้ขียนโค้ดสำหรับการคำนวณ Alignment Direction ไว้ 2 ภาษา คือภาษา Python และภาษา VBA Excel
Python libraries : Numpy, Pandas
-
เตรียมข้อมูล Alignment ที่ตำแหน่งใดๆ ตาม Format Import Alignment Direction Data.xlsx
-
เตรียมข้อมูล Setting-out Alignment (ARRAY) ตาม Format Export Hor-Alignment.xlsx และ Export Ver-Alignment.xlsx
-
ตั้งไฟล์ Path
Alignment_Direction_CHOStoENZ_Rev01.py
# Path files Import_chos_data_path = "Import Alignment Direction Data.xlsx" Import_hor_array_path = "Export Hor-Alignment.xlsx" Import_ver_array_path = "Export Ver-Alignment.xlsx" Export_data_path = "Export Alignment-CHOS to ENZ.xlsx"
Alignment_Direction_ENZtoCHOS_Rev01.py
# Path files Import_enz_data_path = "Import Alignment Direction Data.xlsx" Import_hor_array_path = "Export Hor-Alignment.xlsx" Import_ver_array_path = "Export Ver-Alignment.xlsx" Export_data_path = "Export Alignment-ENZ to CHOS.xlsx"
-
รันไฟล์ Python
-
เปิดไฟล์ VBA - Alignment Direction & Survey Program Rev.09.xlsm
-
เพิ่มข้อมูล Setting-out Alignmet (Array) sheet ไปที่ VBA - Alignment Direction & Survey Program Rev.09.xlsm และตั้งเป็น Array โดยไปที่ Fomulars --> Name Manager
-
สร้างตารางสำหรับการคำนวณและเตรียมข้อมูล Chainage, Hor.Offset, Ver.Offset หรือพิกัด 3 มิติ (3D-Coordinate; Easting, Northing, Elevation)
-
ผู้เขียนได้ขียนโค้ด VBA แบบ Function ตามชื่อด้านล่าง
4.1 รู้ค่า Chainage, Hor.Offset, Hor.Array name ต้องการคำนวณ Easting, Northing, Azimuth : Hor(Chainage, Hor.Offset, Hor.Array name, "E or N or W") Note."E" = Easting, "N" = Northing, "W" = Azimuth
4.2 รู้ค่า Easting, Northing, Hor.Array name ต้องการคำนวณ Chainage, Hor.Offset : HorP(Easting, Northing, Hor.Array name "C or O", 0) Note."C" = Chainage, "O" = Hor.Offset
4.3 รู้ค่า Chainage, Ver.Array name ต้องการคำนวณ Elevation : Ver(Chainage, Ver.Array name)
4.4 ต้องการหา Horizontal and Vertical Type : HorType(Chainage, Hor.Array name), VerType(Chainage, Ver.Array name)
4.5 ต้องการแปลง Azimuth องศา (Degrees) เป็น องศา-ลิปดา-พิลิปดา (Degree-Minute-Second; DD-MM-SS) : DegtoDMSStr2(deg)
Export Alignment-CHOS to ENZ.xlsx
Export Alignment-ENZ to CHOS.xlsx
VBA - Alignment Direction & Survey Program Rev.09.xlsm
สามารถดู VBA function ที่ Main Pro.-CHOS to ENZ sheet และ Main Pro.-ENZ to CHOS sheet

