Skip to content

Commit

Permalink
3.2.0: fix GON output to calculation results
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed Jun 17, 2022
1 parent 228a43e commit 20f909f
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 45 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ See the [doc](./doc) folder for various reStructuredText files, the [wiki](https

## Installation

Installation binaries for latest stabile version (3.1.3):
Installation binaries for latest stabile version (3.2.0):

* [Debian/Ubuntu](http://digikom.hu/download/geoeasy_3.1.3.deb)
* [Windows](http://digikom.hu/download/Gizi313Setup.exe)
* [Windows portable (zip)](http://digikom.hu/download/GeoEasy313.zip)
* [Debian/Ubuntu](http://digikom.hu/download/geoeasy_3.2.0.deb)
* [Windows](http://digikom.hu/download/Gizi320Setup.exe)
* [Windows portable (zip)](http://digikom.hu/download/GeoEasy320.zip)

Users can select source or [beta binary or older releases](http://digikom.hu/english/geo_easy_e.html). Linux, OSX and Windows operating
systems are supported. See the [installation guide](doc/install.rst).
Expand Down
26 changes: 13 additions & 13 deletions src/calcgeo.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ proc Orientation {geo lineno {flag 0}} {
if {$e > [Rad2Sec $PI]} { set e [expr {$e - [Rad2Sec $PI2]}] }
if {$e < "-[Rad2Sec $PI]"} { set e [expr {$e + [Rad2Sec $PI2]} ]}
set E [expr {$e / 206264.8 * [lindex $items 4]}]
GeoLog1 [format "%-10s %-10s %s %s %s %8.${decimals}f %4d %4d %8.${decimals}f"\
GeoLog1 [format "%-10s %-10s %11s %11s %11s %8.${decimals}f %4d %4d %8.${decimals}f"\
[lindex $items 1] \
[string range [GetPCode [lindex $items 1] 1] 0 9]\
[ANG [lindex $items 5]] [ANG [lindex $items 6]] \
Expand All @@ -183,7 +183,7 @@ proc Orientation {geo lineno {flag 0}} {
warning 0 OK
}
}
GeoLog1 [format "%-47s %s" $geoCodes(101) [ANG $z]]
GeoLog1 [format "%-46s%11s" $geoCodes(101) [ANG $z]]
}
return $z
} else {
Expand Down Expand Up @@ -525,12 +525,12 @@ proc GeoSec {pn {w ""}} {
GeoLog1
GeoLog $geoEasyMsg(menuPopupSec)
GeoLog1 $geoEasyMsg(head1Sec)
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %s" \
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %11s" \
[lindex $arec 2] \
[string range [GetPCode [lindex $arec 2] 1] 0 9] \
[GetVal {38} $aco] [GetVal {37} $aco] \
[ANG [lindex $arec 3]]]
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %s" \
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %11s" \
[lindex $brec 2] \
[string range [GetPCode [lindex $brec 2] 1] 0 9] \
[GetVal {38} $bco] [GetVal {37} $bco] \
Expand Down Expand Up @@ -673,15 +673,15 @@ proc GeoRes {pn {w ""}} {
GeoLog1
GeoLog $geoEasyMsg(menuPopupRes)
GeoLog1 $geoEasyMsg(head1Res)
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %s %s" \
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %11s %11s" \
[lindex $arec 2] [string range [GetPCode [lindex $arec 2] 1] 0 9] \
[GetVal 38 $aco] [GetVal 37 $aco] \
[ANG [lindex $arec 3]] [ANG $alpha]]
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %s %s" \
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %11s %11s" \
[lindex $brec 2] [string range [GetPCode [lindex $brec 2] 1] 0 9] \
[GetVal 38 $bco] [GetVal 37 $bco] \
[ANG [lindex $brec 3]] [ANG $beta]]
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %s" \
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %11s" \
[lindex $crec 2] [string range [GetPCode [lindex $crec 2] 1] 0 9] \
[GetVal 38 $cco] [GetVal 37 $cco] \
[ANG [lindex $crec 3]]]
Expand Down Expand Up @@ -1558,10 +1558,10 @@ proc GeoBearingDistance {pn {w ""}} {
set geoRes($w) [format "%s-%s: %s %.${decimals}f" $pn $pn1 [ANG $b] $d]
}
if {$d3d == ""} {
GeoLog1 [format "%-10s %-10s %s %8.${decimals}f" \
GeoLog1 [format "%-10s %-10s %11s %8.${decimals}f" \
$pn $pn1 [ANG $b] $d]
} else {
GeoLog1 [format "%-10s %-10s %s %8.${decimals}f %8.${decimals}f %s" \
GeoLog1 [format "%-10s %-10s %11s %8.${decimals}f %8.${decimals}f %s" \
$pn $pn1 [ANG $b] $d $d3d [ANG $za]]
}
}
Expand Down Expand Up @@ -1614,7 +1614,7 @@ proc GeoAngle {pn {w ""}} {
set si_b [expr {sin($b)}]
set co_b [expr {cos($b)}]
# output reference
GeoLog1 [format "%-10s %s %8.${decimals}f" \
GeoLog1 [format "%-10s %11s %8.${decimals}f" \
$pn1 [ANG $b] $d]

# remove reference point from list
Expand Down Expand Up @@ -1665,7 +1665,7 @@ proc GeoAngle {pn {w ""}} {
set geoRes($w) [format "%s-%s: %s %.${decimals}f" \
$pn $pn1 [ANG $b] $d]
}
GeoLog1 [format "%-10s %s %8.${decimals}f %s %s \
GeoLog1 [format "%-10s %s %8.${decimals}f %11s %11s \
%12.${decimals}f %12.${decimals}f" \
$pn1 [ANG $b] $d [ANG $alfa] [ANG $alfa0] $abc $ord]
set _temp_geo($i) [list "5 $pn1" "7 $alfa0" "11 $d"]
Expand Down Expand Up @@ -1755,13 +1755,13 @@ proc LineLine {pn1 pn2 pn3 pn4} {
GeoLog1
GeoLog $geoEasyMsg(menuCalLine)
GeoLog1 $geoEasyMsg(head1Sec)
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %s" \
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %11s" \
[GetVal {5} $pn1coo] [GetVal {4} $pn1coo] \
[GetVal {38} $pn1coo] [GetVal {37} $pn1coo] [ANG $b12]]
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f" \
[GetVal {5} $pn2coo] [GetVal {4} $pn2coo] \
[GetVal {38} $pn2coo] [GetVal {37} $pn2coo]]
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %s" \
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f %11s" \
[GetVal {5} $pn3coo] [GetVal {4} $pn3coo] \
[GetVal {38} $pn3coo] [GetVal {37} $pn3coo] [ANG $b34]]
GeoLog1 [format "%-10s %-10s %12.${decimals}f %12.${decimals}f" \
Expand Down
7 changes: 4 additions & 3 deletions src/geo_easy.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,10 @@ proc GeoEasy {top} {
set w ""
# get the language of the operating system
if {$tcl_platform(platform) != "unix"} {
set ww ""
set ww "0000"
catch {set ww [string toupper [registry get HKEY_LOCAL_MACHINE\\SYSTEM\\CONTROLSET001\\control\\nls\\language InstallLanguage]]}
if {[lsearch -exact [array names langCodes] $ww] > -1} {
# search for language groups only
if {[lsearch -regexp [array names langCodes] "[string range $ww 2 3]$"] > -1} {
set w $langCodes($ww)
} else {
set w eng
Expand Down Expand Up @@ -300,7 +301,7 @@ proc GeoEasy {top} {
regsub "\}$" $name "" name
switch -glob -- $name {
*.geo {
MenuLoad $top $name
MenuLoad $top [file normalize $name]
}
*.gpr { GeoProjLoad $top $name }
*.msk -
Expand Down
8 changes: 4 additions & 4 deletions src/geodimet.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ proc Geodimeter {fn fa} {
if {[llength $hz] > 1} {
foreach h $hz {
set coll [expr {$w - $h}]
GeoLog1 [format "%-10s %10s kollimacio" \
GeoLog1 [format "%-10s %11s kollimacio" \
[string range $pno 0 9] [ANG $coll]]
if {[expr {abs($coll)}] > [expr {$maxColl / $RO}]} {
GeoLog1 "$geoEasyMsg(faces) $geoEasyMsg(error): $pno $geoCodes(7)"
Expand All @@ -93,7 +93,7 @@ proc Geodimeter {fn fa} {
if {[llength $v] > 1} {
foreach h $v {
set ind [expr {$w - $h}]
GeoLog1 [format "%-10s %10s index" \
GeoLog1 [format "%-10s %11s index" \
[string range $pno 0 9] [ANG $ind]]
if {[expr {abs($ind)}] > [expr {$maxIndex / $RO}]} {
# too large error > 6'
Expand Down Expand Up @@ -223,7 +223,7 @@ proc Geodimeter {fn fa} {
if {[llength $hz] > 1} {
foreach h $hz {
set coll [expr {$w - $h}]
GeoLog1 [format "%-10s %10s kollimacio" \
GeoLog1 [format "%-10s %11s kollimacio" \
[string range $pno 0 9] [ANG $coll]]
if {[expr {abs($coll)}] > [expr {$maxColl / $RO}]} {
GeoLog1 "$geoEasyMsg(faces) $geoEasyMsg(error): $pno $geoCodes(7)"
Expand All @@ -238,7 +238,7 @@ proc Geodimeter {fn fa} {
if {[llength $v] > 1} {
foreach h $v {
set ind [expr {$w - $h}]
GeoLog1 [format "%-10s %10s index" \
GeoLog1 [format "%-10s %11s index" \
[string range $pno 0 9] [ANG $ind]]
if {[expr {abs($ind)}] > [expr {$maxIndex / $RO}]} {
# too large error > 6'
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/geo_easy.cze
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ set geoEasyMsg(head1Ele) "Číslo bodu Kód Výška Vzdálen
set geoEasyMsg(head1Det) " Orientováno Zhorizontováno"
set geoEasyMsg(head2Det) "Číslo bodu Kód Y X H Stanovisko směr vzdálenost"
set geoEasyMsg(head1Ori) "Číslo bodu Kód Směr Směr Orientační směr Vzdálenost e\" e\"max X(m)"
set geoEasyMsg(head1Dis) "Číslo bodu Číslo bodu Směrník Vzdálenost Sklon dis Zenitový úhel"
set geoEasyMsg(head1Dis) "Číslo bodu Číslo bodu Směrník Vzdálenost Sklon dis Zenitový úhel"
set geoEasyMsg(head1Angle) "Číslo bodu Směrník Vzdálenost Úhel Úhel z prvního Local X Local Y"
# transformation
set geoEasyMsg(head1Tran) "Číslo bodu y x Y X dY dX vzdálenost"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/geo_easy.eng
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ set geoEasyMsg(head1Ele) "Point num Code Height Distance"
set geoEasyMsg(head1Det) " Oriented Horizontal"
set geoEasyMsg(head2Det) "Point num Code E N H Station direction distance"
set geoEasyMsg(head1Ori) "Point num Code Direction Bearing Orient ang Distance e\" e\"max E(m)"
set geoEasyMsg(head1Dis) "Point num Point num Bearing Distance Slope dis Zenith angle"
set geoEasyMsg(head1Dis) "Point num Point num Bearing Distance Slope dis Zenith angle"
set geoEasyMsg(head1Angle) "Point num Bearing Distance Angle Angle from 1st Local E Local N"
# transformation
set geoEasyMsg(head1Tran) "Point num e n E N dE dN dist"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/geo_easy.es
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ set geoEasyMsg(head1Ele) "Punto n\u00FAm C\u00F3digo Height Dis
set geoEasyMsg(head1Det) " Oriented Horizontal"
set geoEasyMsg(head2Det) "Punto n\u00FAm C\u00F3digo E N H Estaci\u00F3n direcci\u00F3n distancia"
set geoEasyMsg(head1Ori) "Punto n\u00FAm C\u00F3digo Direcci\u00F3n Bearing Orient ang Distancia e\" e\"max E(m)"
set geoEasyMsg(head1Dis) "Punto n\u00FAm Punto n\u00FAm Bearing Distancia Pendiente dis Zenith \u00E1ngulo"
set geoEasyMsg(head1Dis) "Punto n\u00FAm Punto n\u00FAm Bearing Distancia Pendiente dis Zenith \u00E1ngulo"
set geoEasyMsg(head1Angle) "Punto n\u00FAm Bearing Distancia \u00C1ngulo \u00C1ngulo from 1st Local E Local N"
# transformation
set geoEasyMsg(head1Tran) "Punto n\u00FAm e n E N dE dN dist"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/geo_easy.ger
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ set geoEasyMsg(head1Ele) "Punktnr. Punktcode Z Strecke"
set geoEasyMsg(head1Det) " orientierte Horizontal-"
set geoEasyMsg(head2Det) "Punktnr. Punktcode Y X M Standpunkt Richtungen distanz"
set geoEasyMsg(head1Ori) "Punktnr. Punktcode Hz-Winkel Azimut Orientierung Strecke e\" e\"max E(m)"
set geoEasyMsg(head1Dis) "Punktnr. Punktnr. Azimut Strecke Schrägdist Zenitwinkel"
set geoEasyMsg(head1Dis) "Punktnr. Punktnr. Azimut Strecke Schrägdist Zenitwinkel"
set geoEasyMsg(head1Angle) "Punktnr. Azimut Strecke Brechwinkel auf Null Absz. Ord."
# transformation
set geoEasyMsg(head1Tran) "Punktnr. y x Y X dY dX dt"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/geo_easy.hun
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ set geoEasyMsg(head1Ele) "Pontszám Pontkód M Távolság"
set geoEasyMsg(head1Det) " Tájékozott Vízszintes"
set geoEasyMsg(head2Det) "Pontszám Pontkód Y X M Álláspont irányérték távolság"
set geoEasyMsg(head1Ori) "Pontszám Pontkód Irányérték Irányszög Táj.szög Távolság e\" e\"max E(m)"
set geoEasyMsg(head1Dis) "Pontszám Pontszám Irányszög Távolság Ferde táv Zenit sz."
set geoEasyMsg(head1Dis) "Pontszám Pontszám Irányszög Távolság Ferde táv Zenit sz."
set geoEasyMsg(head1Angle) "Pontszám Irányszög Távolság Törésszög 0-ra forg. Absz. Ord."
# transformation
set geoEasyMsg(head1Tran) "Pontszám y x Y X dY dX dt"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/geo_easy.rus
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ set geoEasyMsg(head1Ele) "Point num Code Height Distance"
set geoEasyMsg(head1Det) " Oriented Horizontal"
set geoEasyMsg(head2Det) "Point num Code E N H Station direction distance"
set geoEasyMsg(head1Ori) "Point num Code Direction Bearing Orient ang Distance e\" e\"max E(m)"
set geoEasyMsg(head1Dis) "Point num Point num Bearing Distance Slope dis Zenith angle"
set geoEasyMsg(head1Dis) "Point num Point num Bearing Distance Slope dis Zenith angle"
set geoEasyMsg(head1Angle) "Point num Bearing Distance Angle Angle from 1st Local E Local N"
# transformation
set geoEasyMsg(head1Tran) "Point num e n E N dE dN dist"
Expand Down
2 changes: 1 addition & 1 deletion src/leica.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ proc AvgFaces {f1 f2} {
GeoLog1 $geoEasyMsg(face2)
GeoLog1 $geoEasyMsg(face3)
}
GeoLog1 [format "%-10s %10s %10s %6.4f %6.3f" \
GeoLog1 [format "%-10s %11s %11s %6.4f %6.3f" \
[string range [GetVal {5 62} $f1] 0 9] \
[ANG $collimationError] [ANG $indexError] $dt $dj]
return $f1
Expand Down
28 changes: 15 additions & 13 deletions src/travgeo.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,14 @@ proc GetTraverse {{codes {37 38}} {stopAt ""}} {
set ref [lindex $stlist 0]
}
default {
set ref [lindex [GeoListbox $stlist {0 1} \
set vlist [InternalToShort $stlist]
set vlist [lindex [GeoListbox $vlist {0 1} \
$geoEasyMsg(lbTitle3) 1] 0]
if {$ref == ""} {
if {$vlist == ""} {
Beep
return ""
}
set ref [ShortToInternal $vlist]
}
}
lappend ref $pn
Expand Down Expand Up @@ -552,25 +554,25 @@ proc CalcTraverse {stlist {node 0}} {
set pcode [string range [GetPCode [lindex [lindex $stlist $i] 2] 1] 0 9]
if {[info exists t1($i)]} { set t_1 [format "%8.${decimals}f" $t1($i)] } else { set t_1 "-" }
if {[info exists t2($i)]} { set t_2 [format "%8.${decimals}f" $t2($i)] } else { set t_2 "-" }
GeoLog1 [format " %10s %8s" [ANG [expr {$delta($i) / $RO}]] $t_1]
GeoLog1 [format " %11s %8s" [ANG [expr {$delta($i) / $RO}]] $t_1]
if {$i > 0} {
if {$beta($i) == ""} {
GeoLog1 [format "%-10s %10s %8.${decimals}f %8.${decimals}f %8.${decimals}f %10.${decimals}f %10.${decimals}f" \
[lindex [lindex $stlist $i] 2] "" $t($i) \
$dx($i) $dy($i) [expr {$dx($i) + $vx($i)}] \
[expr {$dy($i) + $vy($i)}]]
} else {
GeoLog1 [format "%-10s %10s %8.${decimals}f %8.${decimals}f %8.${decimals}f %10.${decimals}f %10.${decimals}f" \
GeoLog1 [format "%-10s %11s %8.${decimals}f %8.${decimals}f %8.${decimals}f %10.${decimals}f %10.${decimals}f" \
[lindex [lindex $stlist $i] 2] [ANG [expr {$beta($i) / $RO}]] $t($i) \
$dx($i) $dy($i) [expr {$dx($i) + $vx($i)}] \
[expr {$dy($i) + $vy($i)}]]
}
} else {
if {$beta($i) == ""} {
GeoLog1 [format "%-10s %10s" \
GeoLog1 [format "%-10s %11s" \
[lindex [lindex $stlist $i] 2] ""]
} else {
GeoLog1 [format "%-10s %10s" \
GeoLog1 [format "%-10s %11s" \
[lindex [lindex $stlist $i] 2] [ANG [expr {$beta($i) / $RO}]]]
}
}
Expand All @@ -584,11 +586,11 @@ proc CalcTraverse {stlist {node 0}} {
}
if {$beta(0) == "" || $beta($n1) == ""} {
GeoLog1 [format \
"%-10s %10s %8s %8s %8s %10.${decimals}f %10.${decimals}f" \
"%-10s %11s %8s %8s %8s %10.${decimals}f %10.${decimals}f" \
$pcode "" $t_2 $w1 $w2 $x($i) $y($i)]
} else {
GeoLog1 [format \
"%-10s %10s %8s %8.${decimals}f %8.${decimals}f %10.${decimals}f %10.${decimals}f" \
"%-10s %11s %8s %8.${decimals}f %8.${decimals}f %10.${decimals}f %10.${decimals}f" \
$pcode [ANG [expr {$vbeta($i) / $RO}]] $t_2 $vx($i) $vy($i) $x($i) $y($i)]
}
} else {
Expand All @@ -598,7 +600,7 @@ proc CalcTraverse {stlist {node 0}} {
$pcode "" $x($i) $y($i)]
} else {
GeoLog1 [format \
"%-10s %10s %10.${decimals}f %10.${decimals}f" \
"%-10s %11s %10.${decimals}f %10.${decimals}f" \
$pcode [ANG [expr {$vbeta($i) / $RO}]] $x($i) $y($i)]
}
}
Expand All @@ -615,13 +617,13 @@ proc CalcTraverse {stlist {node 0}} {
GeoLog1 [format " %10s %8.${decimals}f %8.${decimals}f" "" $ddx $ddy]
}
} else {
GeoLog1 [format " %10s %10.${decimals}f %10.${decimals}f" \
GeoLog1 [format " %11s %10.${decimals}f %10.${decimals}f" \
[ANG 0] [expr {$x($n1) - $x(0)}] [expr {$y($n1) - $y(0)}]]
GeoLog1 [format " %10s %8.${decimals}f %8.${decimals}f %8.${decimals}f" \
GeoLog1 [format " %11s %8.${decimals}f %8.${decimals}f %8.${decimals}f" \
[ANG [expr {$sumbeta / $RO}]] $sumt $sumdx $sumdy]
GeoLog1 [format " %10s" \
GeoLog1 [format " %11s" \
[ANG [expr {$n1 * $PI}]]]
GeoLog1 [format " %10s %8.${decimals}f %8.${decimals}f" \
GeoLog1 [format " %11s %8.${decimals}f %8.${decimals}f" \
[ANG [expr {$dbeta / $RO}]] $ddx $ddy]
}
if {! $free} {
Expand Down
2 changes: 1 addition & 1 deletion src/xmlgeo.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,7 @@ proc GamaShortOutput {l} {
set adj [Gon2Rad $adj]
set mea [Gon2Rad $mea]
set v [expr {$adj - $mea}]
GeoLog1 [format "%-10s %-10s %10s %8.${mmdec}f %8.${mmdec}f %s" $from $to [ANG $adj] [Rad2Sec $v] [expr {$stdev / $SEC2CC}] $type]
GeoLog1 [format "%-10s %-10s %11s %8.${mmdec}f %8.${mmdec}f %s" $from $to [ANG $adj] [Rad2Sec $v] [expr {$stdev / $SEC2CC}] $type]
}
"height-diff" { set type "DM"
GeoLog1 [format "%-10s %-10s %10.${decimals}f %8.${mmdec}f %8.${mmdec}f %s" $from $to $adj [expr {$adj - $mea}] $stdev $type]
Expand Down

0 comments on commit 20f909f

Please sign in to comment.