Skip to content

Use pyhotn and vba to compute 3d-coordinate by known chainage&offset and compute chainage&offset by known 3d-coordinate.

License

Notifications You must be signed in to change notification settings

suben-mk/Alignment-Direction-for-Tunnel-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Alignment Direction

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

Workflow

Python

Python libraries : Numpy, Pandas

  1. เตรียมข้อมูล Alignment ที่ตำแหน่งใดๆ ตาม Format Import Alignment Direction Data.xlsx

  2. เตรียมข้อมูล Setting-out Alignment (ARRAY) ตาม Format Export Hor-Alignment.xlsx และ Export Ver-Alignment.xlsx

  3. ตั้งไฟล์ 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"
  4. รันไฟล์ Python

VBA

  1. เปิดไฟล์ VBA - Alignment Direction & Survey Program Rev.09.xlsm

  2. เพิ่มข้อมูล Setting-out Alignmet (Array) sheet ไปที่ VBA - Alignment Direction & Survey Program Rev.09.xlsm และตั้งเป็น Array โดยไปที่ Fomulars --> Name Manager

    image

  3. สร้างตารางสำหรับการคำนวณและเตรียมข้อมูล Chainage, Hor.Offset, Ver.Offset หรือพิกัด 3 มิติ (3D-Coordinate; Easting, Northing, Elevation)

  4. ผู้เขียนได้ขียนโค้ด 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)

    image

Output

Python

Export Alignment-CHOS to ENZ.xlsx
Export Alignment-ENZ to CHOS.xlsx

VBA

VBA - Alignment Direction & Survey Program Rev.09.xlsm
สามารถดู VBA function ที่ Main Pro.-CHOS to ENZ sheet และ Main Pro.-ENZ to CHOS sheet

About

Use pyhotn and vba to compute 3d-coordinate by known chainage&offset and compute chainage&offset by known 3d-coordinate.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published