common.tcl
Ulyxes - an open source project to drive total stations and publish observation results
GPL v2.0 license
Copyright (C) 2010-2012 Zoltan Siki
| Procedure Summary |
|---|
::Bearing { ea na eb nb }Bearing function: Calculate whole circle bearing counter clockwise from north |
::Beep { repeat }Beep the pc speaker |
::ChangeAngle { angle {in DMS} {out RAD} }Conversion function: Universal angle conversion function |
::Deg2Rad { deg }Conversion function: Convert sexagesimal angle to radian |
::DelVal { codes buf }List handling function: Delete sublist from list |
::DisplayAngles { anglist {unit DMS} }Instrument handling (instrument type independent functions): Display angles on standard output |
::Distance { ea na eb nb }Distance function: Calculate 2D distance between two points |
::DM2Rad { dm }Conversion function: Convert angle from DM (NMEA format) to radian |
::DMS { val }Conversion function: Convert radian to DMS (sexagesimal) |
::DMS2Rad { dms }Conversion function: Convert angle from DMS (sexagesimal) to radian |
::GetFace { }Instrument handling (instrument type independent functions): Get Face info from instrument |
::GetVal { codes buf }List handling function: Get value from list of lists like {{code1 value1} {code2 value2} ...} |
::Gon2Rad { angle }Conversion function: Convert angle from gon to radian |
::Line2D { e1 n1 e2 n2 }Line2D calculates the equation of a line going through two points a * e + b * n + c = 0 |
::LinePointDist { a b c e n }LinePointDist calculates distance between a point and a line |
::LoadCoo { fn }Load GeoEasy coordinate file into global array coo WARNING previous content of coo array lost! Returned error codes: -1: cannot open file positive value: line number with error |
::LoadGeo { fn }Load GeoEasy fieldbook (.geo file) into memory array geo WARNING previous content of geo array lost! Returned error codes: -1: cannot open file positive value: line number with error |
::MoveRel { hz_rel v_rel {units RAD} {atr 0} }Instrument handling (instrument type independent functions): Rotate instrument relative to the actual position |
::Rad2Deg { angle }Conversion function: Convert radian to sexagesimal into pseudo dms (ddd.mmss) format |
::Rad2Gon { angle }Conversion function: Convert angle from radian to gon |
::Rad2Sec { rad }Conversion function: Convert angle from radian to seconds (ss) |
| Procedure Detail |
|---|
proc ::Bearing { ea na eb nb }
ea,na - coordinates of station
eb,nb - coordinates of reference pointproc ::Beep { repeat }
repeat - number of short beepsproc ::ChangeAngle { angle {in DMS} {out RAD} }
angle - the angle to convert
in - actual unit of angle (DMS/DEG/RAD/GON)
out - target unit for result (DMS/DEG/RAD/GON)proc ::Deg2Rad { deg }
angle - in pseudo dms format (ddd.mmss)proc ::DelVal { codes buf }
codes - list of codes to remove from buf
buf - list of pair of elements like {{code1 value1} {code2 value2} ...}proc ::DisplayAngles { anglist {unit DMS} }
anglist - code list with angle values in radian {{7 hz} {8 v} ...}
unit - for outputproc ::Distance { ea na eb nb }
ea,na - coordinates of station
eb,nb - coordinates of reference pointproc ::DM2Rad { dm }
angle - in DM (degmin.nnnn) to convert into radianproc ::DMS { val }
val - angle in radianproc ::DMS2Rad { dms }
angle - in DMS (deg-min-sec) to convert into radianproc ::GetFace { }
proc ::GetVal { codes buf }
codes - list of codes to look for in buf
buf - list of pair of elements like {{code1 value1} {code2 value2} ...}proc ::Gon2Rad { angle }
angle - value in gonproc ::Line2D { e1 n1 e2 n2 }
e1,n1 - easting and northing coordinates of startpoint
e2,n2 - easting and northing coordiates of endpointproc ::LinePointDist { a b c e n }
a,b,c - coefficients of the equation of the line
e,n - easting and northing coordinates of pointproc ::LoadCoo { fn }
Returned error codes:
fn - input file nameproc ::LoadGeo { fn }
Returned error codes:
fn - file name of GeoEasy data setproc ::MoveRel { hz_rel v_rel {units RAD} {atr 0} }
hz_rel - relative horizontal movement, + to right, - to left
v_rel - relative vertical movement, + to down, - to up
units - input angle unit (RAD/DMS/DEG/GON), optional
atr - 0/1 move without ATR/move with ATR, optionalproc ::Rad2Deg { angle }
angle - value in radianproc ::Rad2Gon { angle }
angle - angle value in radianproc ::Rad2Sec { rad }
angle - angle value in radian