Your message dated Sun, 19 Mar 2017 19:50:28 +0000
with message-id <[email protected]>
and subject line Bug#852718: fixed in tunnelx 20160713-4
has caused the Debian Bug report #852718,
regarding tunnelx: Exception reported when using scaled angle units
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
852718: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852718
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: tunnelx
Version: 20160713-3
Severity: normal
Tags: patch
I'm too lazy to type decimal points, so my Survex data files have
/--------
| *units tape 0.001 metres
| *units compass clino 0.1 degrees
\--------
When I import this as centreline, Tunnel does nothing, but prints an
exception to its output. It will only accept angle units that are
exactly 1.0 of the known measures.
I've written a patch to permit angle units of any size. As I couldn't
find any unit tests in the source package, it's just been tested with my
own data files (as above), and I don't use grads or percent, so those
are tested only by inspection. However, the patch is probably still
suitable for forwarding upstream.
Index: tunnelx-20160713/src/LegLineFormat.java
===================================================================
--- tunnelx-20160713.orig/src/LegLineFormat.java
+++ tunnelx-20160713/src/LegLineFormat.java
@@ -28,9 +28,10 @@ import java.util.ArrayList;
//
public class LegLineFormat// implements Cloneable
{
- static int DEGREES = 0;
- static int GRADS = 1;
- static int PERCENT = 2;
+ // angular units are positive for degrees; negative for percent
+ static final float DEGREES = 1;
+ static final float GRADS = 400F / 360F;
+ static final float PERCENT = 1;
static float TAPEFAC_M = 1.0F;
static float TAPEFAC_CM = 0.01F;
@@ -57,12 +58,13 @@ public class LegLineFormat// implements
float compassnegoffset = 0.0F;
float backcompassnegoffset = 0.0F;
float compassnegoffsetdeclination = 0.0F; // a secondary offset value (separates the calibration from the magnetic wandering (declination))
- int compassfac = DEGREES;
+ float compassfac = DEGREES;
int clinoindex = 4;
int backclinoindex = -1;
float clinonegoffset = 0.0F;
- int clinofac = DEGREES;
+ float clinofac = DEGREES;
+ boolean clinopercent = false;
int dxindex = -1;
int dyindex = -1;
@@ -331,8 +333,7 @@ public class LegLineFormat// implements
return OneLeg.INVALID_COMPASSCLINO;
float compass = GetFLval(acompass) - (bback ? backcompassnegoffset : compassnegoffset) - compassnegoffsetdeclination;
- if (compassfac == GRADS)
- compass *= 360.0F / 400.0F;
+ compass *= compassfac;
while (compass < 0.0F)
compass += 360.0F;
@@ -359,9 +360,8 @@ public class LegLineFormat// implements
{
clino = GetFLval(aclino);
clino -= clinonegoffset; // is there a different setting for backclino?
- if (clinofac == GRADS)
- clino *= 360.0F / 400.0F;
- if (clinofac == PERCENT)
+ clino *= clinofac;
+ if (clinopercent)
clino = (float)TN.percentdeg(clino);
}
return clino;
@@ -618,25 +618,28 @@ public class LegLineFormat// implements
else if (sunitype.equalsIgnoreCase("bearing") || sunitype.equalsIgnoreCase("compass"))
{
- assert sunitval2.equals("") || (fac == 1.0);
+ assert sunitval2.equals("") || (fac != 0);
if (sunitval.equalsIgnoreCase("degrees"))
- compassfac = DEGREES;
+ compassfac = DEGREES * fac;
else if (sunitval.equalsIgnoreCase("grads"))
- compassfac = GRADS;
+ compassfac = GRADS * fac;
else
TN.emitWarning("don't know *Units bearing " + sunitval1 + "," + sunitval2);
}
else if (sunitype.equalsIgnoreCase("gradient") || sunitype.equalsIgnoreCase("clino"))
{
- assert sunitval2.equals("") || (fac == 1.0);
- if (sunitval.equalsIgnoreCase("degrees"))
- clinofac = DEGREES;
- else if (sunitval.equalsIgnoreCase("grads"))
- clinofac = GRADS;
- else if (sunitval.equalsIgnoreCase("percent"))
- clinofac = PERCENT;
- else
+ assert sunitval2.equals("") || (fac != 0);
+ if (sunitval.equalsIgnoreCase("degrees")) {
+ clinopercent = false;
+ clinofac = DEGREES * fac;
+ } else if (sunitval.equalsIgnoreCase("grads")) {
+ clinopercent = false;
+ clinofac = GRADS * fac;
+ } else if (sunitval.equalsIgnoreCase("percent")) {
+ clinopercent = true;
+ clinofac = PERCENT * fac;
+ } else
TN.emitWarning("don't know *Units gradient " + sunitval1 + "," + sunitval2);
}
-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (900, 'testing'), (900, 'stable'), (400, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel
Kernel: Linux 3.16.7-ckt2-balti (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages tunnelx depends on:
ii default-jre [java8-runtime] 2:1.8-58
ii gcj-4.8-jre [java5-runtime] 4.8.5-4
ii jarwrapper 0.59
ii openjdk-8-jre [java8-runtime] 8u111-b14-3
tunnelx recommends no packages.
tunnelx suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: tunnelx
Source-Version: 20160713-4
We believe that the bug you reported is fixed in the latest version of
tunnelx, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Wookey <[email protected]> (supplier of updated tunnelx package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sun, 12 Mar 2017 23:32:37 +0000
Source: tunnelx
Binary: tunnelx
Architecture: source all
Version: 20160713-4
Distribution: experimental
Urgency: medium
Maintainer: Wookey <[email protected]>
Changed-By: Wookey <[email protected]>
Description:
tunnelx - Cave Survey drawing software
Closes: 852718 852720 852721
Changes:
tunnelx (20160713-4) experimental; urgency=medium
.
[Toby Speight]
* Allow scaled units (Closes: #852718)
* Make estimed walls appear dashed (Closes: #852720)
* Allow save/load of non-ascii chars (Closes: #852721)
* Update freesteel wiki URL, pending tunnelx-doc package
Checksums-Sha1:
8315b0255597084ff1ab8c5277d79ae0dd0febf5 1893 tunnelx_20160713-4.dsc
9e73a2f2362a67115aacc4bc6a508e926910d2a6 16400 tunnelx_20160713-4.debian.tar.xz
5b92fbc9b7ff36de3d8a502a61e6c986352c3366 628902 tunnelx_20160713-4_all.deb
3aef8cacf7dba2b1e09c954d26551bb314c5b543 9618
tunnelx_20160713-4_amd64.buildinfo
Checksums-Sha256:
5988b3c66a8a36c634549be6e47b57472897fa7bde9fc8cc90c19abe1d88864d 1893
tunnelx_20160713-4.dsc
f497207b2ebdd594387a37f12c66363cbd97f91ee97f8ca5f80b27fbb1e23301 16400
tunnelx_20160713-4.debian.tar.xz
a8d78f7d872da6f60df3d2f41df2b6bfca2200e9a8379c14bb25be96d0ae586c 628902
tunnelx_20160713-4_all.deb
374889e8e7dfd7ed5851172d4fdca71db887d468e4eb1eb3b87dbf1a651456f0 9618
tunnelx_20160713-4_amd64.buildinfo
Files:
61da1744f429b013125f33be49a8624e 1893 science extra tunnelx_20160713-4.dsc
8728b6cc70e2b866a2b22a2da7adc1ad 16400 science extra
tunnelx_20160713-4.debian.tar.xz
f851c07f3c016a8181fe235eced8774e 628902 science extra
tunnelx_20160713-4_all.deb
8d0d07ec67ccdd06c3b8862f95bfc594 9618 science extra
tunnelx_20160713-4_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJYzt1RAAoJEPuGMlGob55HJ7UQAJ8QojcKjIS4K5H24dgI/0Be
UVoxEQ7lZfdsizN+t/dfrFYxW19shk22lIRmHMM6+4raFPOyRrsCw/caHktgxi3W
YScRmL6WF0HLO0zLNqMep4T5I8np7Z2nNCu/fYzfANdF8pm8v7nEZKheuQdIRib0
xsjvotzdNEo7m7NnuqS5i5+uNr0LMlbt82UhG5lVDUsNlZG2A7R4DvWAgCquCHIr
v01Q6Ts65EesxW4KHmCf83edPMPHI/c37BYI49YM9Bm7lNiorJhjXPV8AEpWDhYc
wJy4SyJnVUn04IH18505fl+i05qxwxpxH4+28S1y9opRatRXDLnK3cx7D1uG8cD+
O0s1uqzX0smQkoT+ganaY3Hsco4I8GlvFAXM21vOPgl0Angh9oMF8v426ukgeWsJ
XIA3xw3F4LxnmuWUkoKUlNw1U+wFFQiJyZaBtH19/C6PIWTsuQvi7ZIxHwKj6VCH
L4+i4Ka8LxdVOQ1kvZ0erJXRlX+/rm0cyTUCsTgUYaAcv9Zl5IXLHWZcdUhDHeNi
G+hyfdW+QxOhkUUCw75OloR9TfWa5GbYfX71yRx9DSTWOuxWhOkEVsjrtoY5lTCI
YkLCh+vkaFMJEkPvUHtgsblj8uyR2MRSM5gKhmNa4XasNibEW8XBOBhZf7B26Dxi
dn/2SUYIhfBlg/4NHGfZ
=0KtI
-----END PGP SIGNATURE-----
--- End Message ---