Diff of the two buildlogs: -- --- b1/build.log 2024-05-13 23:44:27.053820083 +0000 +++ b2/build.log 2024-05-13 23:54:00.429431972 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Mon May 13 11:34:25 -12 2024 -I: pbuilder-time-stamp: 1715643265 +I: Current time: Tue May 14 13:44:50 +14 2024 +I: pbuilder-time-stamp: 1715643890 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -28,52 +28,84 @@ dpkg-source: info: applying add-distclean-target.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/7299/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/D01_modify_environment starting +debug: Running on virt32b. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 May 13 23:45 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="21" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.2.21(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=4 ' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='2822c6ff7f53412f99c0da9d1da62928' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='7299' - PS1='# ' - PS2='> ' + INVOCATION_ID=28fe22d780f341b7bbb19b646c7e28bc + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=21200 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.fEv3K3Py/pbuilderrc_7qIf --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.fEv3K3Py/b1 --logfile b1/build.log octave-mapping_1.4.2-3.dsc' - SUDO_GID='114' - SUDO_UID='108' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:3142/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.fEv3K3Py/pbuilderrc_fD06 --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.fEv3K3Py/b2 --logfile b2/build.log octave-mapping_1.4.2-3.dsc' + SUDO_GID=112 + SUDO_UID=106 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:3142/ I: uname -a - Linux virt64a 6.1.0-21-arm64 #1 SMP Debian 6.1.90-1 (2024-05-03) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-21-armmp-lpae #1 SMP Debian 6.1.90-1 (2024-05-03) armv7l GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 May 11 11:25 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/7299/tmp/hooks/D02_print_environment finished +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -742,7 +774,7 @@ Get: 621 http://deb.debian.org/debian trixie/main armhf pkgconf-bin armhf 1.8.1-1+b2 [28.9 kB] Get: 622 http://deb.debian.org/debian trixie/main armhf pkgconf armhf 1.8.1-1+b2 [26.2 kB] Get: 623 http://deb.debian.org/debian trixie/main armhf pkg-config armhf 1.8.1-1+b2 [14.0 kB] -Fetched 241 MB in 7s (32.5 MB/s) +Fetched 241 MB in 6s (40.6 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package netbase. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19445 files and directories currently installed.) @@ -3294,7 +3326,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/octave-mapping-1.4.2/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../octave-mapping_1.4.2-3_source.changes +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/octave-mapping-1.4.2/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../octave-mapping_1.4.2-3_source.changes dpkg-buildpackage: info: source package octave-mapping dpkg-buildpackage: info: source version 1.4.2-3 dpkg-buildpackage: info: source distribution unstable @@ -3345,9 +3381,9 @@ config.status: creating config.h make[1]: Entering directory '/build/reproducible-path/octave-mapping-1.4.2/src' /usr/bin/mkoctfile --verbose -DHAVE_CONFIG_H -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -I/usr/include/gdal -lgdal -o gdalread.oct gdalread.cc misc.cpp -g++ -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H gdalread.cc -o /tmp/oct-85zbtC.o -g++ -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H misc.cpp -o /tmp/oct-9L68Rl.o -g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o gdalread.oct /tmp/oct-85zbtC.o /tmp/oct-9L68Rl.o -lgdal -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H gdalread.cc -o /tmp/oct-xCCtMx.o +g++ -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H misc.cpp -o /tmp/oct-hBFAVy.o +g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-mapping-1.4.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o gdalread.oct /tmp/oct-xCCtMx.o /tmp/oct-hBFAVy.o -lgdal -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro make[1]: Leaving directory '/build/reproducible-path/octave-mapping-1.4.2/src' copyfile /build/reproducible-path/octave-mapping-1.4.2/./src/gdalread.oct /build/reproducible-path/octave-mapping-1.4.2/./inst/arm-unknown-linux-gnueabihf-api-v58 For information about changes from previous versions of the mapping package, run 'news mapping'. @@ -3355,183 +3391,72 @@ Checking package... Run the unit tests... Checking m files ... -[inst/aer2ecef.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2ecef.m -***** test -***** error aer2ecef("s", 25, 1e3, 0, 0, 0) -***** error aer2ecef(3i, 25, 1e3, 0, 0, 0) -***** error aer2ecef(33, "s", 1e3, 0, 0, 0) -***** error aer2ecef(33, 3i, 1e3, 0, 0, 0) -***** error aer2ecef(33, 25, "s", 0, 0, 0) -***** error aer2ecef(33, 25, 3i, 0, 0, 0) -***** error aer2ecef(33, 25, 1e3, "s", 0, 0) -***** error aer2ecef(33, 25, 1e3, 3i, 0, 0) -***** error aer2ecef(33, 25, 1e3, 0, "s", 0) -***** error aer2ecef(33, 25, 1e3, 0, 3i, 0) -***** error aer2ecef(33, 25, 1e3, 0, 0, "s") -***** error aer2ecef(33, 25, 1e3, 0, 0, 3i) -***** error aer2ecef ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error aer2ecef ([1 1], [2 2], [33], 4, 5, 6) -***** error aer2ecef ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** error aer2ecef ([1 1], [2 2], [3 3], 4, [5 5], 6) -***** error aer2ecef ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/angltostr.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/angltostr.m -***** test -***** shared ang - ang = [-291.43 -180.0, -110.5320, -85.5, -80.425, -4.9330, 0, 3.0104, 90.0001, 180.0000, 233.425]; - str = angltostr (ang, "none", "degrees", -3); - res = {" 68.570° ", " -180.000° ", " -110.532° ", " -85.500° ", ... - " -80.425° ", " -4.933° ", " 0.000° ", " 3.010° ", ... - " 90.000° ", " 180.000° ", " -126.575° "}; - assert (str, res); -***** test - str = angltostr (ang, "ew", "degrees2dm", -3); - res = {" 68° 34.200' E ", " 180° 00.000' W ", " 110° 31.920' W ", ... - " 85° 30.000' W ", " 80° 25.500' W ", " 4° 55.980' W ", ... - " 0° 00.000' E ", " 3° 00.624' E ", " 90° 00.006' E ", ... - " 180° 00.000' E ", " 126° 34.500' W "}; - assert (str, res); -***** test - str = angltostr (ang, "NS", "degrees2dms", -1); - res = {" 68° 34' 12.0\" N ", " 0° 00' 00.0\" N ", " 69° 28' 04.8\" S ", ... - " 85° 30' 00.0\" S ", " 80° 25' 30.0\" S ", " 4° 55' 58.8\" S ", ... - " 0° 00' 00.0\" N ", " 3° 00' 37.4\" N ", " 89° 59' 59.6\" N ", ... - " 0° 00' 00.0\" N ", " 53° 25' 30.0\" S "}; - assert (str, res); -***** test - str = angltostr (ang, "EW", "degrees2dms", -1); - res = {" 68° 34' 12.0\" E ", " 180° 00' 00.0\" W ", " 110° 31' 55.2\" W ", ... - " 85° 30' 00.0\" W ", " 80° 25' 30.0\" W ", " 4° 55' 58.8\" W ", ... - " 0° 00' 00.0\" E ", " 3° 00' 37.4\" E ", " 90° 00' 00.4\" E ", ... - " 180° 00' 00.0\" E ", " 126° 34' 30.0\" W "}; - assert (str, res); +[inst/geodeticarc.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticarc.m +***** demo + lgts = geodeticarc ([[0:1:89]', zeros(90, 1)], [[1:1:90]', zeros(90, 1)]) / 60; + plot (0:89, lgts); + axis tight; + grid on; + hold on; + plot ([0 89], [1852 1852], "k", "linestyle", "-."); + plot ([45 45], [min(lgts) max(lgts)], "m", "linestyle", "-."); + title ("Arcminute length vs. Latitude"); + xlabel ("Latitude (degrees)", "FontWeight", "bold"); + ylabel ("Arcminute length (m)", "FontWeight", "bold"); + text (5, 1852.5, "Nautical mile (1852 m)"); +***** error geodeticarc ("a", [0 0]); +***** error geodeticarc ([0 0], [1; 1]); +***** error geodeticarc ([0 0; 0 0; 0 0], [1; 1]); +***** error geodeticarc ([1 2 3; 2 2 2], [0 0]); +***** error geodeticarc ([1 3 2; 2 2 2]', [0 0; 5 6]) ***** test - str = angltostr (deg2rad (ang), "pm", "radians", -6); - res = {" +1.196772 R ", " -3.141593 R ", " -1.929147 R ", " -1.492257 R ", ... - " -1.403681 R ", " -0.086097 R ", " +0.000000 R ", " +0.052541 R ", ... - " +1.570798 R ", " +3.141593 R ", " -2.209151 R "}; - assert (str, res); -***** error angltostr ("oo"); -***** error angltostr (2+3i); -***** error angltostr (45, "ff"); -***** error angltostr (33, 65); -***** error angltostr (45, "ew", struct ()); -***** error angltostr (88, "pm", "degs"); -***** error angltostr (45, "ew", "radians", "acc"); -***** error angltostr (45, "ew", "radians", 3+2i); -***** error angltostr (45, "ns", "degs"); -14 tests, 14 passed, 0 known failure, 0 skipped -[inst/deg2nm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/deg2nm.m + [dst, az] = geodeticarc ([37, -76], [37, -9; 67 -76; 37, -76]); + assert (dst, [5830081.06; 3337842.871; 0], 1e-2); + assert (mean (az'), [90, 0, 0,], 1e-7); +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/areaquad.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/areaquad.m ***** test -***** assert (nm2deg (deg2nm (10)), 10, 10*eps); -***** assert (nm2deg (deg2nm (10, 80), 80), 10, 10*eps); -***** assert (nm2deg (deg2nm (10, "pluto"), "pluto"), 10, 10*eps); -***** error deg2nm (5, 5i) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/makesymbolspec.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/makesymbolspec.m + aq = areaquad (-90, 0, 90, 360); + assert (aq, 1, 1e-8); ***** test -***** warning ssp = makesymbolspec ("Line", {"LENGTH", [100 150], "color", "b", ... - "nonsense", "?", "lineWidth", 3, "markersize", "BS", "Visible", 1}); - ssp = makesymbolspec ("Line", {"LENGTH", [100 150], "color", "b", ... - "lineWidth", 3, "Visible", 1}); - assert (reshape (ssp{2}(3:end), 2, [])(1, :), {"Color", "LineWidth", ... - "Visible"}); - assert (ssp{1}, "Line"); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/unitsratio.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/unitsratio.m -***** assert (unitsratio ("inch", "foot"), 12) -***** assert (unitsratio ("m", "cm"), 0.01) -***** assert (unitsratio ("cm", "m"), 100) -***** assert (unitsratio ("meter", "meter"), 1) -***** assert (unitsratio ("degrees", "radians"), 180 / pi) -***** assert (unitsratio ("radians", "degrees"), pi / 180) -***** error unitsratio ("NOT A UNIT", "meter") -***** error unitsratio ("meter", "NOT A UNIT") -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/wrapTo180.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapTo180.m + aq = areaquad (-pi / 2, 0, pi / 2, 2 * pi,"r"); + assert (aq, 1, 1e-8); ***** test - x = -800:0.1:800; - xw = wrapTo180 (x); - assert (sind (x), sind (xw), 16 * eps) - assert (cosd (x), cosd (xw), 16 * eps) - assert (! any (xw < -180)) - assert (! any (xw > 180)) + aq = areaquad (0, 0, 90, 360, "wgs84"); + assert (aq, 2.5503281086204421875e+14, 1e-8); ***** test - c = [-721.1, -718.9, -481.3, -479.99, -361, -359, -200, -180-(1e-14), -180, ... - -180-(2e-14), -160, -eps, 0, eps, 160, 180, 180+(1e-14), 180+(2e-14), 200]; - assert (wrapTo180 (c), [-1.10, 1.10, -121.30, -119.99, -1.0, 1.0, 160.0, ... - -180.0, -180.0, 180.0, -160.0, -0.0, 0.0, 0.0, ... - 160.0, 180.0, 180.0, -180.0, -160.0], 1e-13); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/geodeticLatitudeFromGeocentric.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticLatitudeFromGeocentric.m + aq = areaquad(-90,0,90,360,[0 6000]); + assert (aq, 4 * pi * 6000 ^ 2, 1e-8) ***** test - earth_flattening = 0.0033528; - assert (geodeticLatitudeFromGeocentric (45, earth_flattening), 45.1924226, 10e-6); - assert (geodeticLatitudeFromGeocentric (pi/4, earth_flattening, 'radians'), 0.78876, 10e-6); -***** error geodeticLatitudeFromGeocentric (0.5, "flat") -***** error geodeticLatitudeFromGeocentric (0.5, 5i ) -***** error geodeticLatitudeFromGeocentric ("psi", 0.0033528) -***** error geodeticLatitudeFromGeocentric (5i, 0.0033528 ) -***** error geodeticLatitudeFromGeocentric ([45 50], [0.7 0.8]) -***** error geodeticLatitudeFromGeocentric (45, 1) -***** error geodeticLatitudeFromGeocentric (45, 0.0033528 ,"km") -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/km2nm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/km2nm.m + aq = areaquad(-90,0,90,360,[6000 0]); + assert (aq, 4 * pi * 6000 ^ 2, 1e-8) ***** test - km = [1.8520 3.7040 5.5560 7.4080 12.9640 14.8160]; - nm = [1 2 3 4 7 8]; - assert (km2nm (km), nm) - km = reshape (km, [1 3 2]); - nm = reshape (nm, [1 3 2]); - assert (km2nm (km), nm) -***** assert (km2nm (1.852), 1) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/toRadians.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/toRadians.m + aq = areaquad(-90,0,90,360,[1 0]); + assert (aq, 4 * pi, 1e-8) ***** test - rad{1} = pi; - rad{2} = [pi 2*pi]; - rad{3} = [0 pi; 2*pi 0]; - deg{1} = 180; - deg{2} = [180 360]; - deg{3} = [0 180; 360 0]; - for i=1:3 - assert (toRadians ("degrees", deg{i}), rad{i}) - assert (toRadians ("radians", rad{i}), rad{i}) - endfor - - ## test multiple angles same time - assert (nthargout (1:3, @toRadians, "degrees", deg{:}), rad) - assert (nthargout (1:2, @toRadians, "degrees", deg{:}), rad(1:2)) - - ## test abbreviations of degrees - assert (nthargout (1:3, @toRadians, "degree", deg{:}), rad) - assert (nthargout (1:3, @toRadians, "deg", deg{:}), rad) - assert (nthargout (1:3, @toRadians, "d", deg{:}), rad) -***** error toRadians ("INVALID") -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/geocentricLatitude.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geocentricLatitude.m + aq = areaquad(-90,0,90,360,[0 1]); + assert (aq, 4 * pi, 1e-8) ***** test - earth_flattening = 0.0033528; - assert (geocentricLatitude (45, earth_flattening), 44.8075766, 10e-6); - assert (geocentricLatitude (pi/4, earth_flattening, 'radians'), 0.78204, 10e-6); -***** error geocentricLatitude (0.5, "flat") -***** error geocentricLatitude (0.5, 5i) -***** error geocentricLatitude ("phi", 0.0033528) -***** error geocentricLatitude (5i, 0.0033528 ) -***** error geocentricLatitude ([45 50], [0.7 0.8]) -***** error geocentricLatitude (45, 1) -***** error geocentricLatitude (45, 0.0033528, "km") -8 tests, 8 passed, 0 known failure, 0 skipped + assert (areaquad ([-60 -45; -30 0], 0, 45, 180), ... + [0.393283046242, 0.353553390593; ... + 0.301776695296, 0.176776695296], 1e-11); +***** error areaquad ("s", 0, 90, 360) +***** error areaquad (5i, 0, 90, 360) +***** error areaquad (0, "s", 90, 360) +***** error areaquad (0, 5i, 90, 360) +***** error areaquad (0, 0, "s", 360) +***** error areaquad (0, 0, 5i, 360) +***** error areaquad (0, 0, 90, "s") +***** error areaquad (0, 0, 90, 5i) +***** error areaquad (-90, 0, 90, 360, [2.9 6000]) +***** error areaquad (-90, 0, 90, 360, [2.9]) +***** error areaquad (-90, 0, 90, 360, [2.9 6000 70]) +***** error areaquad (-91, 0, 90, 360); +***** error areaquad (-90, 0, 91, 360); +***** error areaquad ([1 2], 3, [4; 5], 6); +22 tests, 22 passed, 0 known failure, 0 skipped [inst/sm2rad.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/sm2rad.m ***** test @@ -3540,103 +3465,70 @@ assert (sm2rad (10, 80), km2rad (ratio*10, ratio*80), 10*eps); assert (sm2rad (10, "pluto"), km2rad (ratio*10, "pluto"), 10*eps); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/earthRadius.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/earthRadius.m -***** test - radius = earthRadius / 1000;; - assert (earthRadius ("km"), radius); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/vincenty.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/vincenty.m -***** test - assert (vincenty ([37, -76], [37, -9]), 5830081.063, 1e-2); +[inst/km2sm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/km2sm.m ***** test - assert (vincenty ([37, -76], [67, -76], referenceEllipsoid (7019)), ... - 3337842.871, 1e-2) + km = [2 3.218694437388875 4.8326 6.437388874777749]; + sm = [1.242739898989899 2 3.002832417929293 4]; + assert (km2sm (km), sm) + km = reshape (km, [2 2]); + sm = reshape (sm, [2 2]); + assert (km2sm (km), sm) +***** assert (km2sm (4.8326), 3.002832417929293) 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/ecef2ned.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2ned.m +[inst/geo2auth.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2auth.m ***** test - [n, e, d] = ecef2ned (660930.192761082, -4701424.222957011, 4246579.604632881, 42, -82, 200); - assert([n, e, d], [286.84222, 186.27752, -939.69262], 10e-6); + phi = [0:15:90]; + xi = geo2auth (phi); + Z = degrees2dm(xi - phi); + check = [0; ... + -3.84258303680237; ... + -6.66017793242659; ... + -7.69782759396364; ... + -6.67286580689009; ... + -3.85527095139878; ... + 0]; + assert (Z(:,2), check, 1e-6) +***** error geo2auth ("s") +***** error geo2auth (5i) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/nm2rad.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2rad.m ***** test - Rad = deg2rad ([42, -82]); - [e, n, u] = ecef2ned (660930.192761082, -4701424.222957011, 4246579.604632881, Rad(1), Rad(2), 200, "rad"); - assert ([e, n, u], [286.84, 186.28, -939.69], 10e-3); + ratio = unitsratio ('km','nm'); + assert (nm2rad (10), km2rad (ratio*10), 10*eps); + assert (nm2rad (10, 80), km2rad (ratio*10, ratio*80), 10*eps); + assert (nm2rad (10, "pluto"), km2rad (ratio*10, "pluto"), 10*eps); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/parametricLatitude.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/parametricLatitude.m ***** test - [a, b, c] = ecef2ned (5507528.9, 4556224.1, 6012820.8, 45.9132, 36.7484, 1877753.2); - assert ([a, b, c], [-923083.1558, 355601.2616, -1041016.4238], 1e-4); + earth_flattening = 0.0033528 ; + assert (parametricLatitude (45, earth_flattening), 44.903787, 10e-6) + assert (parametricLatitude (pi/4, earth_flattening, 'radians'), 0.78372, 10e-6) +***** error parametricLatitude (0.5, "flat") +***** error parametricLatitude (0.5, 5i) +***** error parametricLatitude ("phi", 0.0033528) +***** error parametricLatitude (5i, 0.0033528 ) +***** error parametricLatitude ([45 50], [0.7 0.8]) +***** error parametricLatitude (45, 1) +***** error parametricLatitude (45, 0.0033528, "km") +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/wrapToPi.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapToPi.m ***** test - [nn, ee, dd] = ecef2ned (1345660, -4350891, 4452314, 44.532, -72.782, 1699); - assert ([nn, ee, dd], [1334.3045, -2544.3677, 359.9609], 1e-4); -***** error ecef2ned (45, 45, 100, 50, 50, 200, "", "km") -***** error ecef2ned ("A", 45, 100, 50, 50, 200) -***** error ecef2ned (45i, 45, 100, 50, 50, 200) -***** error ecef2ned (45, "A", 100, 50, 50, 200) -***** error ecef2ned (45, 45i, 100, 50, 50, 200) -***** error ecef2ned (45, 45, "A", 50, 50, 200) -***** error ecef2ned (45, 45, 100i, 50, 50, 200) -***** error ecef2ned (45, 45, 100, "A", 50, 200) -***** error ecef2ned (45, 45, 100, 50i, 50, 200) -***** error ecef2ned (45, 45, 100, 50, "A", 200) -***** error ecef2ned (45, 45, 100, 50, 50i, 200) -***** error ecef2ned (45, 45, 100, 50, 50, "A") -***** error ecef2ned (45, 45, 100, 50, 50, 200i) -***** error ecef2ned ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error ecef2ned ([1 1], [2 2], [33], 4, 5, 6) -***** error ecef2ned ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** error ecef2ned ([1 1], [2 2], [3 3], 4, [5 5], 6) -***** error ecef2ned ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) -22 tests, 22 passed, 0 known failure, 0 skipped -[inst/removeExtraNanSeparators.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/removeExtraNanSeparators.m -***** assert (nthargout (1:2, @removeExtraNanSeparators, - [NaN NaN 3 4 5 6 NaN NaN], [NaN NaN 4 5 5 7 NaN NaN]), - {[ 3 4 5 6 NaN ], [ 4 5 5 7 NaN ]}); -***** assert (nthargout (1:2, @removeExtraNanSeparators, - [NaN NaN 3 4 NaN 6 NaN], [NaN NaN 2 4 NaN 3 NaN]), - {[ 3 4 NaN 6 NaN], [ 2 4 NaN 3 NaN]}); -***** assert (nthargout (1:2, @removeExtraNanSeparators, - [NaN 2 NaN NaN 6 NaN], [NaN 1 NaN NaN 8 NaN]), - {[ 2 NaN 6 NaN], [ 1 NaN 8 NaN]}); -***** assert (nthargout (1:2, @removeExtraNanSeparators, - [1 2 NaN NaN 6 NaN], [8 1 NaN NaN 8 NaN]), - {[1 2 NaN 6 NaN], [8 1 NaN 8 NaN]}); -***** assert (nthargout (1:2, @removeExtraNanSeparators, - [1 2 NaN NaN 6], [8 1 NaN NaN 8]), - {[1 2 NaN 6], [8 1 NaN 8]}); -***** assert (nthargout (1:2, @removeExtraNanSeparators, 1:9, 1:9), {1:9 1:9}) -***** assert (nthargout (1:2, @removeExtraNanSeparators, 9:-1:-9, 9:-1:-9), {9:-1:-9 9:-1:-9}) -***** assert (nthargout (1:3, @removeExtraNanSeparators, - [1 2 NaN NaN 6], [8 1 NaN NaN 8], [5 6 NaN NaN 7]), - {[1 2 NaN 6], [8 1 NaN 8], [5 6 NaN 7]}); -***** assert (nthargout (1:3, @removeExtraNanSeparators, - [1 2 NaN NaN 6]', [8 1 NaN NaN 8]', [5 6 NaN NaN 7]'), - {[1 2 NaN 6]', [8 1 NaN 8]', [5 6 NaN 7]'}); -***** error removeExtraNanSeparators (rand (5), rand (5)) -***** error removeExtraNanSeparators (rand (5, 1), rand (6, 1)) -***** error removeExtraNanSeparators (rand (5, 1), rand (5, 1), rand (5)) -***** error removeExtraNanSeparators (rand (5, 1), rand (5, 1), rand (6, 1)) -***** error removeExtraNanSeparators ([NaN NaN 3 4 5 6 NaN], [NaN 2 3 4 5 6 NaN]) -***** error removeExtraNanSeparators ([NaN NaN 3 4 5 6 NaN], [NaN NaN 3 4 5 6 NaN], [NaN 2 3 4 5 6 NaN]) -15 tests, 15 passed, 0 known failure, 0 skipped -[inst/majaxis.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/majaxis.m + x = -9:0.1:9; + xw = wrapToPi (x); + assert (sin (x), sin (xw), 8 * eps) + assert (cos (x), cos (xw), 8 * eps) + assert (! any (xw < -pi)) + assert (! any (xw > pi)) ***** test - - earth_b = 6356752.314245; ## meter - earth_ecc = 0.081819221456; - assert ( majaxis (earth_b, earth_ecc), 6378137.01608, 10e-6); - planets_b = [ 6356752.314245 ; 66854000 ]; ## meter - planets_ecc = [ 0.081819221456 ; 0.3543164 ]; - assert( majaxis (planets_b, planets_ecc), [ 6378137.01608; 71492000.609327 ], 10e-6 ); -***** error majaxis (0.5, "ecc") -***** error majaxis (0.5, 0.3 + 0.5i) -***** error majaxis ("b", 0.5) -***** error majaxis (0.3 + 0.5i , 0.5) -***** error majaxis ([10; 10; 10], [0.5; 0; -0.5]) -***** error minaxis ( [ 6356752.314245 ; 66854000 ] , [ 0.081819221456 ; 0.3543164 ]') -7 tests, 7 passed, 0 known failure, 0 skipped + assert (wrapToPi ([-3*pi, -pi, -pi-1, 0; pi-1, pi, pi+1, 3*pi]), ... + [-pi, -pi, pi-1, 0.00000 ; ... + pi-1, pi, -pi+1, pi], 1e-13) +2 tests, 2 passed, 0 known failure, 0 skipped [inst/enu2ecefv.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2ecefv.m ***** test @@ -3666,6 +3558,86 @@ ***** error [u, v, w] = enu2ecefv ([1, 2, 3], [4, 5, 6], [7, 8, 9], [40; 50], [-40; -50]) ***** error [u, v, w] = enu2ecefv ([1, 2, 3], [4, 5, 6], [7, 8, 9], 50, [-45; 50]) 18 tests, 18 passed, 0 known failure, 0 skipped +[inst/closePolygonParts.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/closePolygonParts.m +***** test + xi = [ 1 5 6 2 NaN 11 15 16 12 ]; + yi = [ 1 2 5 6 NaN 1 2 5 6 ]; + zi = [ 1 3 5 3 NaN 11 13 15 13 ]; + mi = [ 8 9 NaN -1 NaN NaN -3 -2 NaN]; + [a, b, c, d] = closePolygonParts (xi, yi, zi, mi); + assert (a, [1 5 6 2 1 NaN 11 15 16 12 11], 1e-10); + assert (b, [1 2 5 6 1 NaN 1 2 5 6 1], 1e-10); + assert (c, [1 3 5 3 1 NaN 11 13 15 13 11], 1e-10); + [d, e, f] = closePolygonParts (a, b, c); + assert (a, d, 1e-10); + assert (b, e, 1e-10); + assert (c, f, 1e-10); +***** test + xxi = [ 400 405 406 402 NaN 311 315 316 312 671 ]; + yyi = [ 1 2 5 6 NaN 1 2 5 6 1 ]; + zzi = [ 1 3 5 3 NaN 11 13 15 13 11 ]; + [a, b, c] = closePolygonParts (xxi, yyi, zzi, "deg"); + assert (a, [400 405 406 402 400 NaN 311 315 316 312 671], 1e-10); + assert (b, [ 1 2 5 6 1 NaN 1 2 5 6 1], 1e-10); + assert (c, [ 1 3 5 3 1 NaN 11 13 15 13 11], 1e-10); +***** error a = closePolygonParts ([0 1], "ged"); +***** error [a, b] = closePolygonParts ([0 1], {"c", "d"}) +***** error a = closePolygonParts ([0 1], [2 3]) +***** error a = closePolygonParts ("radians") +***** error [a, b] = closePolygonParts ([0 NaN 1], [2 NaN 3 4]) +***** error [a, b] = closePolygonParts ([0 1 NaN 1], [2 NaN 3 4]) +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/sm2km.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/sm2km.m +***** test + km = [2 6336 4.8326 6.437388874777749]; + sm = [1.242739898989899 3937 3.002832417929293 4]; + assert (sm2km (sm), km) + km = reshape (km, [1 2 2]); + sm = reshape (sm, [1 2 2]); + assert (sm2km (sm), km) +***** assert (sm2km (3937), 6336) +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/ned2aer.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2aer.m +***** test + [az, el, slantrange] = ned2aer (286.84222, 186.277521, -939.69262); + assert ([az, el, slantrange], [33, 70, 1e3], 10e-6) + [az, el, slantrange] = ned2aer (286.84222, 186.277521, -939.69262, "rad"); + assert ([az, el, slantrange], [0.57595865, 1.221730476, 1e3], 10e-6) +***** error ned2aer ("s", 25, 1e3) +***** error ned2aer (3i, 25, 1e3) +***** error ned2aer (33, "s", 1e3) +***** error ned2aer (33, 3i, 1e3) +***** error ned2aer (33, 25, "s") +***** error ned2aer (33, 25, 3i) +***** error ned2aer ([1 1], [2 2]', [4 5]) +***** error ned2aer ([1 1], [2 2], [4 5 6]) +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/referenceEllipsoid.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/referenceEllipsoid.m +***** test + + E = referenceEllipsoid ("wgs84"); + assert ( E.SemiminorAxis, 6356752.314245, 10e-7 ) + assert ( E.Eccentricity, 0.081819221456, 10e-8) + assert ( E.Flattening, 1 / 298.2572235630, 10e-8 ) +***** error referenceEllipsoid ( 7i ) +***** error referenceEllipsoid ( "yy" ) +***** error referenceEllipsoid ( " " ) +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/iso2geo.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/iso2geo.m +***** test + psi = iso2geo (50.227465817); + assert (psi, 45, 1e-6) +***** test + assert(iso2geo (geo2iso ([-90 : 10: 0; 0 : 10 : 90]), "wgs84"), ... + [-90 : 10: 0; 0 : 10 : 90], 1e-8); +***** error iso2geo ("s") +***** error iso2geo (5i) +4 tests, 4 passed, 0 known failure, 0 skipped [inst/distance.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/distance.m ***** test @@ -3680,118 +3652,27 @@ assert (d, pi, 1e-7) assert (az, pi / 2, 1e-7) 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/geo2rect.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2rect.m -***** test - mu = geo2rect (45); - Z = degrees2dm(mu - 45); - assert (Z(:,2), -8.65908066558504, 1e-6); -***** error geo2rect ("s") -***** error geo2rect (5i) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/departure.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/departure.m -***** test - dist = departure (60, 80, 50); - assert (dist, 12.856, 1e-3) - dist = departure (deg2rad (60), deg2rad (80), deg2rad (50), "radians"); - assert (dist, deg2rad (12.856), 1e-3) -***** test - assert (departure (0, deg2rad (30), deg2rad (60), "wgs84", "r"), ... - departure (0, 30, 60, "wgs84", "d"), 1e-10); -***** test - E = wgs84Ellipsoid ("km"); - dist = departure (60, 80, 50, E); - assert (dist, 1433.915, 1e-3) -***** test - assert (departure ([20 25], [30 35], 40), [7.6604 7.6604], 1e-4); -***** test - assert (departure ([20 25], [30 35], [40 41]), [7.6604 7.5471], 1e-4); -***** error departure ("s", 80, 50) -***** error departure ( 5i, 80, 50) -***** error departure ( 60, "s", 50) -***** error departure ( 60, 5i, 50) -***** error departure ( 60, 80, "s") -***** error departure ( 60, 80, 5i) -***** error departure ([20 25], [30; 35], 40) -***** error departure ([20 25], [30 35], [40; 40]) -13 tests, 13 passed, 0 known failure, 0 skipped -[inst/ecc2flat.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecc2flat.m -***** test - ec = 0.081819221456; - ev = 0 : 0.01 : 0.05; - assert (ecc2flat (ec), 0.00335281317793612, 10^-12); - assert (ecc2flat (ev), [0, 5e-5, 2e-4, 4.501e-4, 8.0032e-4, 0.00125078], 10^-6); -***** error ecc2flat ("a") -***** error ecc2flat(1) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/parametricLatitude.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/parametricLatitude.m -***** test - earth_flattening = 0.0033528 ; - assert (parametricLatitude (45, earth_flattening), 44.903787, 10e-6) - assert (parametricLatitude (pi/4, earth_flattening, 'radians'), 0.78372, 10e-6) -***** error parametricLatitude (0.5, "flat") -***** error parametricLatitude (0.5, 5i) -***** error parametricLatitude ("phi", 0.0033528) -***** error parametricLatitude (5i, 0.0033528 ) -***** error parametricLatitude ([45 50], [0.7 0.8]) -***** error parametricLatitude (45, 1) -***** error parametricLatitude (45, 0.0033528, "km") -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/rcurve.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rcurve.m -***** test - assert (rcurve ("", 45), 4517590.87885, 10e-6) -***** test - assert (rcurve ("", [45; 20]), [4517590.87885; 5995836.38390], 10e-6) -***** test - assert (rcurve ("", [45, 20]), [4517590.87885, 5995836.38390], 10e-6) -***** test - assert (rcurve ("", [60 45; 35 20]), [3197104.58692, 4517590.87885; 5230426.84020, 5995836.38390], 10e-6) -***** test - assert (rcurve ("", "", 45), 4517590.87885, 10e-6) -***** test - assert (rcurve ("transverse", "", 45), 6388838.29012, 10e-6) -***** test - assert (rcurve ("meridian", "", 45), 6367381.81562, 10e-6) -***** error rcurve ("","", 45, "km") -***** error rcurve ("", "", "A") -***** error rcurve ("", "", 45i) -***** error rcurve ('All', "", 45) -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/aer2geodetic.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2geodetic.m -***** test - [lat2, lon2, alt2] = aer2geodetic (33, 70, 1e3, 42, -82, 200); - assert ([lat2, lon2, alt2], [42.002581, -81.997752, 1.1397018e3], 10e-6); -***** test - [lat2, lon2, alt2] = aer2geodetic ( 0.575958653158129, 1.22173047639603, ... - 1e3, 0.733038285837618, -1.43116998663535, 200, "", "rad"); - assert ([lat2, lon2, alt2], [0.7330833, -1.4311307, 1.13970179e3], 10e-6); -***** test - [lat2, lon2, alt2] = aer2geodetic ([33; 34], [70; 71], [1e3; 1.1e3], ... - [42; 43], [-82; -80], [200; 210]); - assert ([lat2, lon2, alt2], [42.002582, -81.997752, 1139.7018; ... - 43.002672 , -79.997544, 1250.080495], 1e-6); -***** error aer2geodetic ("s", 25, 1e3, 0, 0, 0) -***** error aer2geodetic (3i, 25, 1e3, 0, 0, 0) -***** error aer2geodetic (33, "s", 1e3, 0, 0, 0) -***** error aer2geodetic (33, 3i, 1e3, 0, 0, 0) -***** error aer2geodetic (33, 25, "s", 0, 0, 0) -***** error aer2geodetic (33, 25, 3i, 0, 0, 0) -***** error aer2geodetic (33, 25, 1e3, "s", 0, 0) -***** error aer2geodetic (33, 25, 1e3, 3i, 0, 0) -***** error aer2geodetic (33, 25, 1e3, 0, "s", 0) -***** error aer2geodetic (33, 25, 1e3, 0, 3i, 0) -***** error aer2geodetic (33, 25, 1e3, 0, 0, "s") -***** error aer2geodetic (33, 25, 1e3, 0, 0, 3i) -***** error aer2geodetic ([1 2], [3 ], 5, 45, -45, 400) -***** error aer2geodetic ([1; 2], [3 4], [5 6], 45, -45, 400) -***** error aer2geodetic ([1; 2], [3 4], [5 6], [45 50], [-45 -50], 400) -***** error aer2geodetic ([1; 2], [3 4], [5 6], [45; 50], [-45; -50], [400; 500]) -19 tests, 19 passed, 0 known failure, 0 skipped +[inst/validateLengthUnit.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/validateLengthUnit.m +***** error validateLengthUnit ("bad", 7) +***** error validateLengthUnit ("bad", "foo") +***** error validateLengthUnit ("bad", "foo", "ARG") +***** error validateLengthUnit ("bad", "foo", "ARG", 7) +***** error validateLengthUnit (9) +***** error validateLengthUnit (9, 7) +***** error validateLengthUnit (9, "foo") +***** error validateLengthUnit (9, "foo", "ARG") +***** error validateLengthUnit (9, "foo", "ARG", 7) +***** assert (validateLengthUnit ("m"), "meter") +***** assert (validateLengthUnit ("meter"), "meter") +***** assert (validateLengthUnit ("meters"), "meter") +***** assert (validateLengthUnit ("mETErs"), "meter") +***** assert (validateLengthUnit ("us survey feet"), "U.S. survey foot") +***** assert (validateLengthUnit ("US survey feet"), "U.S. survey foot") +***** assert (validateLengthUnit ("U.S. survey feet"), "U.S. survey foot") +***** assert (validateLengthUnit ("u.s. survey feet"), "U.S. survey foot") +***** assert (validateLengthUnit ("clarke's foot"), "Clarke's foot") +18 tests, 18 passed, 0 known failure, 0 skipped [inst/geodetic2ned.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodetic2ned.m ***** test @@ -3825,259 +3706,6 @@ ***** error geodetic2ned (45, 45, 100, 50, 50, "A") ***** error geodetic2ned (45, 45, 100, 50, 50, 200i) 17 tests, 17 passed, 0 known failure, 0 skipped -[inst/degrees2dms.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/degrees2dms.m -***** test - hs = 0.5/60; - deg = [ 10 10.5 -10.5 -10 -0.5 0.5 hs 0 -1/60 ]' + hs; - dms = [ 10 0 30 - 10 30 30 - -10 29 30 - -9 59 30 - 0 -29 30 - 0 30 30 - 0 1 0 - 0 0 30 - 0 0 -30]; - for i = 1:rows (deg) - assert (degrees2dms (deg(i)), dms(i,:)); - endfor - assert (degrees2dms (deg), dms); - assert (degrees2dms (single (deg)), single (dms), 4*10^-6); - - warning ("error", "Octave:array-to-vector", "local") - got_warn = false; - try - degrees2dms (deg'); - catch - got_warn = true; - end_try_catch - assert (got_warn, true) -***** assert (degrees2dms ("f"), [102 0 0]) -***** assert (degrees2dms ("fm"), [102 0 0; 109 0 0]) -***** assert (degrees2dms (true), [1 0 0]) -***** assert (degrees2dms ([true false]), [1 0 0; 0 0 0]) -***** assert (degrees2dms (uint8 ([5 48 9]')), uint8 ([5 0 0; 48 0 0; 9 0 0])) -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/nm2deg.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2deg.m -***** test - ratio = unitsratio ('km','nm'); - assert (nm2deg (10), km2deg (ratio*10), 10*eps); - assert (nm2deg (10, 80), km2deg (ratio*10, ratio*80), 10*eps); - assert (nm2deg (10, "pluto"), km2deg (ratio*10, "pluto"), 10*eps); -1 test, 1 passed, 0 known failure, 0 skipped -[inst/degtorad.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/degtorad.m -***** assert (degtorad(180),pi,10*eps) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/gcxsc.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/gcxsc.m -***** test - [lat, lon] = gcxsc (60, 25, 20, 55, 25, 2.5); - assert (lat(1), 53.80564992, 1e-6); - assert (lon(1), 21.22598692, 1e-6); -***** error gcxsc ("s", 0, 100, 10, 30, 0) -***** error gcxsc (3i, 0, 100, 10, 30, 0) -***** error gcxsc (50, "s", 100, 10, 30, 0) -***** error gcxsc (50, 2i, 10, 10, 30, 0) -***** error gcxsc (50, 0, "s", 10, 30, 0) -***** error gcxsc (50, 0, 100i, 10, 30, 0) -***** error gcxsc (50, 0, 100, "s", 30, 0) -***** error gcxsc (50, 0, 100, 10i, 30, 0) -***** error gcxsc (50, 0, 100, 10, "s", 0) -***** error gcxsc (50, 0, 100, 10, 30i, 0) -***** error gcxsc (50, 0, 100, 10, 30, "s") -***** error gcxsc (50, 0, 100, 10, 30, 2i) -***** error gcxsc (50, 0, 100, 10, 30, 0, "f") -***** error gcxsc (50, 0, 100, 10, 30, 0, "degreef") -***** error gcxsc (190, 0, 90, -90.000001, 180, 80); -***** error gcxsc (190, 0, -90.001, -90.000001, 180, 80); -***** error gcxsc (pi/1.999, 0, pi/2, pi/2.0001, 2, 2*pi/3, "r"); -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/referenceSphere.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/referenceSphere.m -***** test - U = referenceSphere ("Unit"); - assert (U.LengthUnit, ""); - assert (U.Radius, 1); - assert (U.SemimajorAxis, 1); - assert (U.SemiminorAxis, 1); - assert (U.InverseFlattening, Inf); - assert (U.Eccentricity, 0); - assert (U.Flattening, 0); - assert (U.ThirdFlattening, 0); - assert (U.MeanRadius, 1); - assert (U.SurfaceArea, 4*pi); - assert (U.Volume, 4*pi/3); -***** error referenceSphere (7i) -***** error referenceSphere ("yy") -***** error referenceSphere ("Unit", "##not a unit@@") -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/degrees2dm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/degrees2dm.m -***** test - deg = [10 10.5 -10.5 -0.5 0.5]'; - dm = [ 10 0 - 10 30 - -10 30 - 0 -30 - 0 30]; - for i = 1:rows (deg) - assert (degrees2dm (deg(i)), dm(i,:)); - assert (degrees2dm (single (deg(i))), single (dm(i,:))); - endfor - assert (degrees2dm (deg), dm); - assert (degrees2dm (single (deg)), single (dm)); - - warning ("error", "Octave:array-to-vector", "local") - got_warn = false; - try - degrees2dm (deg'); - catch - got_warn = true; - end_try_catch - assert (got_warn, true) -***** assert (degrees2dm ("f"), [102 0]) -***** assert (degrees2dm ("fm"), [102 0; 109 0]) -***** assert (degrees2dm (true), [1 0]) -***** assert (degrees2dm ([true false]), [1 0; 0 0]) -***** assert (degrees2dm (uint8 ([5 48 9]')), uint8 ([5 0; 48 0; 9 0])) -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/referenceEllipsoid.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/referenceEllipsoid.m -***** test - - E = referenceEllipsoid ("wgs84"); - assert ( E.SemiminorAxis, 6356752.314245, 10e-7 ) - assert ( E.Eccentricity, 0.081819221456, 10e-8) - assert ( E.Flattening, 1 / 298.2572235630, 10e-8 ) -***** error referenceEllipsoid ( 7i ) -***** error referenceEllipsoid ( "yy" ) -***** error referenceEllipsoid ( " " ) -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/wrapToPi.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapToPi.m -***** test - x = -9:0.1:9; - xw = wrapToPi (x); - assert (sin (x), sin (xw), 8 * eps) - assert (cos (x), cos (xw), 8 * eps) - assert (! any (xw < -pi)) - assert (! any (xw > pi)) -***** test - assert (wrapToPi ([-3*pi, -pi, -pi-1, 0; pi-1, pi, pi+1, 3*pi]), ... - [-pi, -pi, pi-1, 0.00000 ; ... - pi-1, pi, -pi+1, pi], 1e-13) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/gcxgc.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/gcxgc.m -***** test - [lat3, lon3] = gcxgc ( 51.8853, 0.2545, 108.55, 49.0034, 2.5735, 32.44); - assert (degrees2dms (lat3(1)), [50 54 27.387002], 10e-5); - assert (degrees2dms (lon3(1)), [04 30 30.868724], 10e-5); -***** test - [lat3, lon3] = gcxgc (20, -5, 45, 30, 5, 15); - assert (lat3(1), 28.062035, 10e-5); - assert (lon3(1), 4.4120504, 10e-5); -***** test - latlon = gcxgc (45, 45, 90, 0, 0, 90); - assert (latlon, [0, 0, 135, -45], 10e-10); -***** test - warning ("off", "Octave:coinciding-great-circles"); - [~, ~, idl] = gcxgc (45, [0:45:360], 45, -45, -135, -45); - warning ("on", "Octave:coinciding-great-circles"); - assert (idl, 2, 1e-10); -***** warning gcxgc (0, 0, 45, 0, 180, -45); -***** error gcxgc ("s", 0, 100, 10, 30, 0) -***** error gcxgc (3i, 0, 100, 10, 30, 0) -***** error gcxgc (50, "s", 100, 10, 30, 0) -***** error gcxgc (50, 2i, 10, 10, 30, 0) -***** error gcxgc (50, 0, "s", 10, 30, 0) -***** error gcxgc (50, 0, 100i, 10, 30, 0) -***** error gcxgc (50, 0, 100, "s", 30, 0) -***** error gcxgc (50, 0, 100, 10i, 30, 0) -***** error gcxgc (50, 0, 100, 10, "s", 0) -***** error gcxgc (50, 0, 100, 10, 30i, 0) -***** error gcxgc (50, 0, 100, 10, 30, "s") -***** error gcxgc (50, 0, 100, 10, 30, 2i) -***** error gcxgc (50, 0, 100, 10, 30, 0, "f") -***** error gcxgc (50, 0, 100, 10, 30, 0, "degreef") -***** error gcxgc (190, 0, 90, -90.000001, 180, 80); -***** error gcxgc (190, 0, -90.001, -90.000001, 180, 80); -***** error gcxgc (pi/1.999, 0, pi/2, pi/2.0001, 2, 2*pi/3, "r"); -***** error gcxgc ([50 0], 0, 0, 0, 0, [1 2 3]) -23 tests, 23 passed, 0 known failure, 0 skipped -[inst/iso2geo.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/iso2geo.m -***** test - psi = iso2geo (50.227465817); - assert (psi, 45, 1e-6) -***** test - assert(iso2geo (geo2iso ([-90 : 10: 0; 0 : 10 : 90]), "wgs84"), ... - [-90 : 10: 0; 0 : 10 : 90], 1e-8); -***** error iso2geo ("s") -***** error iso2geo (5i) -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/ned2aer.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2aer.m -***** test - [az, el, slantrange] = ned2aer (286.84222, 186.277521, -939.69262); - assert ([az, el, slantrange], [33, 70, 1e3], 10e-6) - [az, el, slantrange] = ned2aer (286.84222, 186.277521, -939.69262, "rad"); - assert ([az, el, slantrange], [0.57595865, 1.221730476, 1e3], 10e-6) -***** error ned2aer ("s", 25, 1e3) -***** error ned2aer (3i, 25, 1e3) -***** error ned2aer (33, "s", 1e3) -***** error ned2aer (33, 3i, 1e3) -***** error ned2aer (33, 25, "s") -***** error ned2aer (33, 25, 3i) -***** error ned2aer ([1 1], [2 2]', [4 5]) -***** error ned2aer ([1 1], [2 2], [4 5 6]) -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/geodeticLatitudeFromParametric.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticLatitudeFromParametric.m -***** test - earth_flattening = 0.0033528 ; - assert ( geodeticLatitudeFromParametric (45, earth_flattening), 45.0962122, 10e-6); - assert ( geodeticLatitudeFromParametric (pi/4, earth_flattening, 'radians'), 0.78708, 10e-6); -***** error geodeticLatitudeFromParametric (0.5, "flat") -***** error geodeticLatitudeFromParametric (0.5, 5i) -***** error geodeticLatitudeFromParametric ("beta", 0.0033528) -***** error geodeticLatitudeFromParametric (5i, 0.0033528 ) -***** error geodeticLatitudeFromParametric ([45 50], [0.7 0.8]) -***** error geodeticLatitudeFromParametric (45, 1) -***** error geodeticLatitudeFromParametric (45, 0.0033528, "km") -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/deg2sm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/deg2sm.m -***** test -***** assert (sm2deg (deg2sm (10)), 10, 10*eps); -***** assert (sm2deg (deg2sm (10, 80), 80), 10, 10*eps); -***** assert (sm2deg (deg2sm (10, "pluto"), "pluto"), 10, 10*eps); -***** error deg2sm (5, 5i) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/dm2degrees.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/dm2degrees.m -***** test - deg = [10 10.5 -10.5 -0.5 0.5]'; - dm = [ 10 0 - 10 30 - -10 30 - 0 -30 - 0 30]; - for i = 1:rows (dm) - assert (dm2degrees (dm(i,:)), deg(i)); - endfor - assert (dm2degrees (dm), deg); - assert (dm2degrees (single (dm)), single (deg)); -***** error dm2degrees ([5 60]) -***** error dm2degrees ([5 61]) -***** error <2 columns> dm2degrees ([5 50 3]) -***** error dm2degrees ([5 -40]) -***** error dm2degrees ([-5 -40]) -***** error dm2degrees (rand (7, 2, 3)) -7 tests, 7 passed, 0 known failure, 0 skipped [inst/utmzone.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/utmzone.m ***** test @@ -4091,108 +3719,39 @@ ***** error utmzone ("31I") ***** error utmzone ("31O") 7 tests, 7 passed, 0 known failure, 0 skipped -[inst/nm2rad.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2rad.m -***** test - ratio = unitsratio ('km','nm'); - assert (nm2rad (10), km2rad (ratio*10), 10*eps); - assert (nm2rad (10, 80), km2rad (ratio*10, ratio*80), 10*eps); - assert (nm2rad (10, "pluto"), km2rad (ratio*10, "pluto"), 10*eps); +[inst/degtorad.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/degtorad.m +***** assert (degtorad(180),pi,10*eps) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/almanac.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/almanac.m -***** test - assert (strcmpi (almanac (){1}, "Sun"), true); - assert (strcmpi (almanac (){12}, "Unit Sphere"), true); -***** test - assert (almanac ("sun", "radius", "sm"), 432285.77700111, 1e-6); -***** test - assert (almanac ("earth", "everest", "nm"), [3443.456768421318, 0.0814729809], 1e-9); -***** test - assert (almanac ("jupiter", "ellipsoid", "km"), [71492.0 0.3543164], 1e-7); -***** error almanac ("UFO") -***** error almanac ("Moon", 12) -***** error almanac ("Mars", "flattening") -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/sm2km.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/sm2km.m -***** test - km = [2 6336 4.8326 6.437388874777749]; - sm = [1.242739898989899 3937 3.002832417929293 4]; - assert (sm2km (sm), km) - km = reshape (km, [1 2 2]); - sm = reshape (sm, [1 2 2]); - assert (sm2km (sm), km) -***** assert (sm2km (3937), 6336) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/validateLengthUnit.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/validateLengthUnit.m -***** error validateLengthUnit ("bad", 7) -***** error validateLengthUnit ("bad", "foo") -***** error validateLengthUnit ("bad", "foo", "ARG") -***** error validateLengthUnit ("bad", "foo", "ARG", 7) -***** error validateLengthUnit (9) -***** error validateLengthUnit (9, 7) -***** error validateLengthUnit (9, "foo") -***** error validateLengthUnit (9, "foo", "ARG") -***** error validateLengthUnit (9, "foo", "ARG", 7) -***** assert (validateLengthUnit ("m"), "meter") -***** assert (validateLengthUnit ("meter"), "meter") -***** assert (validateLengthUnit ("meters"), "meter") -***** assert (validateLengthUnit ("mETErs"), "meter") -***** assert (validateLengthUnit ("us survey feet"), "U.S. survey foot") -***** assert (validateLengthUnit ("US survey feet"), "U.S. survey foot") -***** assert (validateLengthUnit ("U.S. survey feet"), "U.S. survey foot") -***** assert (validateLengthUnit ("u.s. survey feet"), "U.S. survey foot") -***** assert (validateLengthUnit ("clarke's foot"), "Clarke's foot") -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/meridianarc.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/meridianarc.m -***** test - s = meridianarc (0, 56, "int24", "degrees"); - assert (s, 6208700.08662672, 1e-6) +[inst/enu2ecef.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2ecef.m ***** test - s = meridianarc ([-1/120; 45-1/120; 89+119/120], [1/120; 45+1/120; 90], ... - "int24", "degrees"); - assert (s, [1842.92463205; 1852.25585828; 1861.66609497/2], 1e-6); -***** error meridianarc (-2, 2) -***** error meridianarc (-91, 91, "", "d") -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/sm2nm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/sm2nm.m + [x, y, z] = enu2ecef (186.28, 286.84, 939.69, 42, -82, 200); + assert ([x, y, z], [6.6093019515e5, -4.70142422216e6, 4.24657960122e6], 10e-6) ***** test - nm = [50.292 100.584 25.146 10058.4]; - sm = [57.875 115.75 28.9375 11575]; - assert (sm2nm (sm), nm) - sm = reshape (sm, [2 2 1]); - nm = reshape (nm, [2 2 1]); - assert (sm2nm (sm), nm) -***** assert (sm2nm (28.9375), 25.146) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/fromDegrees.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/fromDegrees.m + [x3, y3, z3] = enu2ecef ( 186.28, 286.84, 939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); + assert ([x3, y3, z3], [660.93019e3, -4701.42422e3, 4246.5796e3],10e-3) ***** test - rad{1} = pi; - rad{2} = [pi 2*pi]; - rad{3} = [0 pi; 2*pi 0]; - deg{1} = 180; - deg{2} = [180 360]; - deg{3} = [0 180; 360 0]; - for i=1:3 - assert (fromDegrees ("degrees", deg{i}), deg{i}) - assert (fromDegrees ("radians", deg{i}), rad{i}) - endfor - - ## test multiple angles same time - assert (nthargout (1:3, @fromDegrees, "radians", deg{:}), rad) - assert (nthargout (1:2, @fromDegrees, "radians", deg{:}), rad(1:2)) - - ## test abbreviations of degrees - assert (nthargout (1:3, @fromDegrees, "radian", deg{:}), rad) - assert (nthargout (1:3, @fromDegrees, "rad", deg{:}), rad) - assert (nthargout (1:3, @fromDegrees, "r", deg{:}), rad) -***** error fromDegrees ("INVALID") -2 tests, 2 passed, 0 known failure, 0 skipped + [a, b, c] = enu2ecef (355601.3, -923083.2, 1041016.4, 45.9132, 36.7484, 1877753.2); + assert ([a, b, c], [5507528.8891, 4556224.1399, 6012820.7522], 1e-4) +***** error enu2ecef("s", 25, 1e3, 0, 0, 0) +***** error enu2ecef(3i, 25, 1e3, 0, 0, 0) +***** error enu2ecef(33, "s", 1e3, 0, 0, 0) +***** error enu2ecef(33, 3i, 1e3, 0, 0, 0) +***** error enu2ecef(33, 25, "s", 0, 0, 0) +***** error enu2ecef(33, 25, 3i, 0, 0, 0) +***** error enu2ecef(33, 25, 1e3, "s", 0, 0) +***** error enu2ecef(33, 25, 1e3, 3i, 0, 0) +***** error enu2ecef(33, 25, 1e3, 0, "s", 0) +***** error enu2ecef(33, 25, 1e3, 0, 3i, 0) +***** error enu2ecef(33, 25, 1e3, 0, 0, "s") +***** error enu2ecef(33, 25, 1e3, 0, 0, 3i) +***** error enu2ecef ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error enu2ecef ([1 1], [2 2], [33], 4, 5, 6) +***** error enu2ecef ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** error enu2ecef ([1 1], [2 2], [3 3], 4, [5 5], 6) +***** error enu2ecef ([1 1], [2 2], [3 3], 4, 5, [6 6]) +20 tests, 20 passed, 0 known failure, 0 skipped [inst/axes2ecc.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/axes2ecc.m ***** test @@ -4208,202 +3767,103 @@ ***** error axes2ecc ("a", 1); ***** error axes2ecc ([1; 2]); 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/minaxis.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/minaxis.m -***** test - - earth_a = 6378137; - earth_ecc = 0.081819221456; - assert ( minaxis (earth_a, earth_ecc), 6356752.2982157, 10e-8 ) - planets_a = [ 6378137 ; 66854000 ]; - planets_ecc = [ 0.081819221456 ; 0.3543164 ]; - assert ( minaxis (planets_a, planets_ecc), [ 6356752.29821572 ; 62516886.8951319 ], 10e-8 ) -***** error minaxis (0.5, "ecc") -***** error minaxis (0.5, 0.3 + 0.5i) -***** error minaxis ("a", 0.5) -***** error minaxis (0.3 + 0.5i , 0.5) -***** error minaxis ( [ 6378137 ; 66854000 ], [ 0.081819221456 ; 0.3543164 ]') -***** error minaxis ([10; 10; 10], [0.5; 0; -0.5]) -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/geodeticarc.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticarc.m -***** demo - lgts = geodeticarc ([[0:1:89]', zeros(90, 1)], [[1:1:90]', zeros(90, 1)]) / 60; - plot (0:89, lgts); - axis tight; - grid on; - hold on; - plot ([0 89], [1852 1852], "k", "linestyle", "-."); - plot ([45 45], [min(lgts) max(lgts)], "m", "linestyle", "-."); - title ("Arcminute length vs. Latitude"); - xlabel ("Latitude (degrees)", "FontWeight", "bold"); - ylabel ("Arcminute length (m)", "FontWeight", "bold"); - text (5, 1852.5, "Nautical mile (1852 m)"); -***** error geodeticarc ("a", [0 0]); -***** error geodeticarc ([0 0], [1; 1]); -***** error geodeticarc ([0 0; 0 0; 0 0], [1; 1]); -***** error geodeticarc ([1 2 3; 2 2 2], [0 0]); -***** error geodeticarc ([1 3 2; 2 2 2]', [0 0; 5 6]) -***** test - [dst, az] = geodeticarc ([37, -76], [37, -9; 67 -76; 37, -76]); - assert (dst, [5830081.06; 3337842.871; 0], 1e-2); - assert (mean (az'), [90, 0, 0,], 1e-7); -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/ned2ecefv.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2ecefv.m -***** test - [u, v, w] = ned2ecefv (871.0476287, 224.3854022, -436.9521873, 42, -82, "d"); - assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) +[inst/auth2geo.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/auth2geo.m ***** test - [u, v, w] = ned2ecefv (871.0476287, 224.3854022, -436.9521873, ... - 0.733038285837618, -1.43116998663535, "r"); - assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) -***** test ## Multidimensionality - [u, v, w] = ned2ecefv ([871.0476287; 900], [224.3854022; 200], [-436.9521873; -500], 42, -82); - assert ([u, v, w], [186.277521, 286.84222, 939.69262; ... - 165.954015, 256.23513, 1003.395646], 1e6); + xi = [0:15:90]; + phi = auth2geo (xi); + Z = degrees2dm(phi - xi); + check = [0 + 3.8575173 + 6.6751024 + 7.6978157 + 6.6579355 + 3.8403504 + 0]; + assert (Z(:,2), check, 1e-6) +***** error auth2geo ("s") +***** error auth2geo (5i) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/rad2km.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rad2km.m ***** test - [u, v, w] = ned2ecefv (-434.0403, 152.4451, -684.6964, 61.64, 30.70); - assert ([u, v, w], [530.24451, 492.12835, 396.34594], 1e-5); -***** error ned2ecefv("s", 25, 1e3, 0, 0) -***** error ned2ecefv(3i, 25, 1e3, 0, 0) -***** error ned2ecefv(33, "s", 1e3, 0, 0) -***** error ned2ecefv(33, 3i, 1e3, 0, 0) -***** error ned2ecefv(33, 25, "s", 0, 0) -***** error ned2ecefv(33, 25, 3i, 0, 0) -***** error ned2ecefv(33, 25, 1e3, "s", 0) -***** error ned2ecefv(33, 25, 1e3, 3i, 0) -***** error ned2ecefv(33, 25, 1e3, 0, "s") -***** error ned2ecefv(33, 25, 1e3, 0, 3i) -***** error ned2ecefv (33, 70, 1e3, 0, 0, "f"); -***** error ned2ecefv (33, 70, 1e3, 0, 0, "degreef") -***** error [u, v, w] = ned2ecefv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) -***** error [u, v, w] = ned2ecefv ([1, 2, 3], [4, 5, 6], [7, 8, 9], [40; 50], [-40; -50]) -***** error [u, v, w] = ned2ecefv ([1, 2, 3], [4, 5, 6], [7, 8, 9], 50, [-45; 50]) -19 tests, 19 passed, 0 known failure, 0 skipped -[inst/ecef2enuv.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2enuv.m +***** assert (km2rad (rad2km (10)), 10, 10*eps); +***** assert (km2rad (rad2km (10, 80), 80), 10, 10*eps); +***** assert (km2rad (rad2km (10, "pluto"), "pluto"), 10, 10*eps); +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/meridianfwd.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/meridianfwd.m ***** test - [e, n, u] = ecef2enuv (186.277521, 286.84222, 939.69262, 42, -82, "d"); - assert ([e, n, u], [224.3854022, 871.0476287, 436.9521873], 10e-6); + a = rad2deg (meridianfwd (-pi/4, [60 120] * 45 * 1846.2756967249574, 'wgs84')); + assert (a, [0, 45], 5e-7); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/ecef2geodetic.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2geodetic.m +***** shared X, Y, Z + X = 3426949.397; + Y = 601195.852; + Z = 5327723.994; ## meters ***** test - [e, n, u] = ecef2enuv (186.277521, 286.84222, 939.69262, ... - 0.733038285837618, -1.43116998663535, "r"); - assert ([e, n, u], [224.3854022, 871.0476287, 436.9521873], 10e-6); -***** test ## Multidimensionality - [e, n, u] = ecef2enuv ([186.277521; 200], [286.84222; 300], [939.69262; 1000], 42, -82); - assert ([e, n, u], [224.385402, 871.047629, 436.952187; ... - 239.805544, 923.305431, 469.041983], 1e6); -***** error ecef2enuv("s", 25, 1e3, 0, 0) -***** error ecef2enuv(3i, 25, 1e3, 0, 0) -***** error ecef2enuv(33, "s", 1e3, 0, 0) -***** error ecef2enuv(33, 3i, 1e3, 0, 0) -***** error ecef2enuv(33, 25, "s", 0, 0) -***** error ecef2enuv(33, 25, 3i, 0, 0) -***** error ecef2enuv(33, 25, 1e3, "s", 0) -***** error ecef2enuv(33, 25, 1e3, 3i, 0) -***** error ecef2enuv(33, 25, 1e3, 0, "s") -***** error ecef2enuv(33, 25, 1e3, 0, 3i) -***** error ecef2enuv (33, 70, 1e3, 0, 0, "f"); -***** error ecef2enuv (33, 70, 1e3, 0, 0, "degreef") -***** error [e, n, u] = ecef2enuv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) -***** error [e, n, u] = ecef2enuv ([1, 2, 3], [4, 5, 6], [7, 8, 9], [40; 50], [-40; -50]) -***** error [e, n, u] = ecef2enuv ([1, 2, 3], [4, 5, 6], [7, 8, 9], 50, [-45; 50]) -18 tests, 18 passed, 0 known failure, 0 skipped -[inst/enu2geodetic.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2geodetic.m + [latd, lond, h] = ecef2geodetic ("wgs84", X, Y, Z); + assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); ***** test - [lat, lon, alt] = enu2geodetic (186.28, 286.84, 939.69, 42, -82, 200); - assert ([lat, lon, alt], [42.00258, -81.997752, 1139.69918], 10e-6); + [latd, lond, h] = ecef2geodetic (X, Y, Z); + assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); ***** test - [lat, lon, alt] = enu2geodetic (186.28, 286.84, 939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); - assert ([lat, lon, alt], [0.73308, -1.43113, 1139.69918], 10e-6); + latr = deg2rad (57.02929569); + lonr = deg2rad (9.950248114); + [lat, lon, h2] = ecef2geodetic ("wgs84", X, Y, Z, "radians"); + assert ([lat, lon, h2], [latr, lonr, 56.95], 10e-3); ***** test - [a, b, c] = enu2geodetic (-7134.8, -4556.3, 2852.4, 46.017, 7.750, 1673, 7030); - assert ([a, b, c], [45.976000, 7.657999, 4531.009608], 1e-6); -***** error enu2geodetic("s", 25, 1e3, 0, 0, 0) -***** error enu2geodetic(3i, 25, 1e3, 0, 0, 0) -***** error enu2geodetic(33, "s", 1e3, 0, 0, 0) -***** error enu2geodetic(33, 3i, 1e3, 0, 0, 0) -***** error enu2geodetic(33, 25, "s", 0, 0, 0) -***** error enu2geodetic(33, 25, 3i, 0, 0, 0) -***** error enu2geodetic(33, 25, 1e3, "s", 0, 0) -***** error enu2geodetic(33, 25, 1e3, 3i, 0, 0) -***** error enu2geodetic(33, 25, 1e3, 0, "s", 0) -***** error enu2geodetic(33, 25, 1e3, 0, 3i, 0) -***** error enu2geodetic(33, 25, 1e3, 0, 0, "s") -***** error enu2geodetic(33, 25, 1e3, 0, 0, 3i) -***** error enu2geodetic ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error enu2geodetic ([1 1], [2 2], [33], 4, 5, 6) -***** error enu2geodetic ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** error enu2geodetic ([1 1], [2 2], [3 3], 4, [5 5], 6) -***** error enu2geodetic ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) -20 tests, 20 passed, 0 known failure, 0 skipped -[inst/nm2sm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2sm.m + latr = deg2rad (57.02929569); + lonr = deg2rad (9.950248114); + [lat, lon, h2] = ecef2geodetic (X, Y, Z, "radians"); + assert ([lat, lon, h2], [latr, lonr, 56.95], 10e-3); +***** error ecef2geodetic ("", 4500000, 450000, 50000000, "km") +***** error ecef2geodetic ("", "A", 450000, 50000000) +***** error ecef2geodetic ("", 45i, 450000, 50000000) +***** error ecef2geodetic ("", 4500000, "B", 50000000) +***** error ecef2geodetic ("", 4500000, 45i, 50000000) +***** error ecef2geodetic ("", 4500000, 450000, "C") +***** error ecef2geodetic (4500000, 450000, "C") +***** error ecef2geodetic ("", 4500000, 450000, 50i) +***** error ecef2geodetic (4500000, 450000, 50i) +13 tests, 13 passed, 0 known failure, 0 skipped +[inst/antipode.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/antipode.m ***** test - nm = [50292 50.292 100.584 25.146 10058.4 12.573]; - sm = [57875 57.875 115.75 28.9375 11575 14.46875]; - assert (nm2sm (nm), sm) - sm = reshape (sm, [2 1 3]); - nm = reshape (nm, [2 1 3]); - assert (nm2sm (nm), sm) -***** assert (nm2sm (50292), 57875) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/wrapTo360.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapTo360.m + [lato, lono] = antipode (90, 0); + assert ([lato, lono], [-90, 180], eps); ***** test - x = -800:0.1:800; - xw = wrapTo360 (x); - assert (sind (x), sind (xw), 16 * eps) - assert (cosd (x), cosd (xw), 16 * eps) - assert (! any (xw < 0)) - assert (! any (xw > 360)) + [lato, lono] = antipode (43, 15); + assert ([lato, lono], [-43, -165], eps); ***** test - assert (wrapTo360 ([-720, -360, 0; 10, 360, 720]), ... - [0, 0, 0; 10, 360, 360], 1e-13); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/rect2geo.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rect2geo.m + [lato, lono] = antipode ([-365; -360; -315; -270; -225; -185; -180; -135; -90; -45; 0; 45; 90; 135; 180; 225; 270; 315; 360], ... + [-361; -359; -315; -270; -225; -185; -180; -135; -90; -45; 0; 45; 90; 135; 180; 225; 270; 315; 360]); + assert ([lato, lono], [[5; 0; -45; -90; -45; -5; 0; 45; 90; 45; 0; -45; -90; -45; 0; 45; 90; 45; 0], ... + [179; -179; -135; -90; -45; -5; 0; 45; 90; 135; 180; -135; -90; -45; 0; 45; 90; 135; 180]], eps); +***** error [a, b] = antipode ("a", 1); +***** error a = antipode (0, 0); +***** error [a, b] = antipode (0); +***** error [a, b] = antipode (0, 0, 0); +***** error [a, b] = antipode (0, 0, "a"); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/ecc2flat.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecc2flat.m ***** test - mu = [0:15:90]; - phi = rect2geo (mu); - Z = degrees2dm (phi - mu); - check = [0, - 4.3406136, - 7.5100085, - 8.6590367, - 7.4879718, - 4.3185768, - 0]; - assert (Z(:,2), check, 1e-6) -***** error rect2geo ("s") -***** error rect2geo (5i) + ec = 0.081819221456; + ev = 0 : 0.01 : 0.05; + assert (ecc2flat (ec), 0.00335281317793612, 10^-12); + assert (ecc2flat (ev), [0, 5e-5, 2e-4, 4.501e-4, 8.0032e-4, 0.00125078], 10^-6); +***** error ecc2flat ("a") +***** error ecc2flat(1) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/deg2km.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/deg2km.m +***** assert (km2deg (deg2km (10)), 10) +***** assert (km2deg (deg2km (10, 80), 80), 10) +***** assert (km2deg (deg2km (10, "pluto"), "pluto"), 10) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/toDegrees.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/toDegrees.m -***** test - rad{1} = pi; - rad{2} = [pi 2*pi]; - rad{3} = [0 pi; 2*pi 0]; - deg{1} = 180; - deg{2} = [180 360]; - deg{3} = [0 180; 360 0]; - for i=1:3 - assert (toDegrees ("degrees", deg{i}), deg{i}) - assert (toDegrees ("radians", rad{i}), deg{i}) - endfor - - ## test multiple angles same time - assert (nthargout (1:3, @toDegrees, "radians", rad{:}), deg) - assert (nthargout (1:2, @toDegrees, "radians", rad{:}), deg(1:2)) - - ## test abbreviations of degrees - assert (nthargout (1:3, @toDegrees, "radian", rad{:}), deg) - assert (nthargout (1:3, @toDegrees, "rad", rad{:}), deg) - assert (nthargout (1:3, @toDegrees, "r", rad{:}), deg) -***** error toRadians ("INVALID") -2 tests, 2 passed, 0 known failure, 0 skipped [inst/scxsc.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/scxsc.m ***** test @@ -4450,187 +3910,203 @@ ***** error scxsc (190, 0, -90.001, -90.000001, 180, 80); ***** error scxsc (pi/1.999, 0, pi/2, pi/2.0001, 2, 2*pi/3, "r"); 23 tests, 23 passed, 0 known failure, 0 skipped -[inst/geodetic2ecef.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodetic2ecef.m +[inst/ecef2ned.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2ned.m ***** test -***** shared h - latd = 57.02929569; - lond = 9.950248114; - h = 56.95; ## meters - [x, y, z]=geodetic2ecef("wgs84", latd, lond, h); - assert ([x, y, z], [3426949.397, 601195.852, 5327723.994], 10e-3); + [n, e, d] = ecef2ned (660930.192761082, -4701424.222957011, 4246579.604632881, 42, -82, 200); + assert([n, e, d], [286.84222, 186.27752, -939.69262], 10e-6); ***** test - lat = deg2rad (57.02929569); - lon = deg2rad (9.950248114); - [x2, y2, z2] = geodetic2ecef ("wgs84", lat, lon, h, "radians"); - assert ([x2, y2, z2], [3426949.397, 601195.852, 5327723.994], 10e-3); -***** error geodetic2ecef ("", 45, 45, 50, "km") -***** error geodetic2ecef ("", "A", 45, 50) -***** error geodetic2ecef ("", 45i, 45, 50) -***** error geodetic2ecef ("", 45, "B", 50) -***** error geodetic2ecef ("", 45, 45i, 50) -***** error geodetic2ecef ("", 45, 45, "C") -***** error geodetic2ecef ("", 45, 45, 50i) -9 tests, 9 passed, 0 known failure, 0 skipped -[inst/enu2aer.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2aer.m + Rad = deg2rad ([42, -82]); + [e, n, u] = ecef2ned (660930.192761082, -4701424.222957011, 4246579.604632881, Rad(1), Rad(2), 200, "rad"); + assert ([e, n, u], [286.84, 186.28, -939.69], 10e-3); ***** test - [az, el, slantrange] = enu2aer (186.277521, 286.84222, 939.69262); - assert ([az, el, slantrange], [33, 70, 1e3], 10e-6) + [a, b, c] = ecef2ned (5507528.9, 4556224.1, 6012820.8, 45.9132, 36.7484, 1877753.2); + assert ([a, b, c], [-923083.1558, 355601.2616, -1041016.4238], 1e-4); ***** test - [az, el, slantrange] = enu2aer (186.277521, 286.84222, 939.69262, "rad"); - assert ([az, el, slantrange], [0.57595865, 1.221730476, 1e3], 10e-6) + [nn, ee, dd] = ecef2ned (1345660, -4350891, 4452314, 44.532, -72.782, 1699); + assert ([nn, ee, dd], [1334.3045, -2544.3677, 359.9609], 1e-4); +***** error ecef2ned (45, 45, 100, 50, 50, 200, "", "km") +***** error ecef2ned ("A", 45, 100, 50, 50, 200) +***** error ecef2ned (45i, 45, 100, 50, 50, 200) +***** error ecef2ned (45, "A", 100, 50, 50, 200) +***** error ecef2ned (45, 45i, 100, 50, 50, 200) +***** error ecef2ned (45, 45, "A", 50, 50, 200) +***** error ecef2ned (45, 45, 100i, 50, 50, 200) +***** error ecef2ned (45, 45, 100, "A", 50, 200) +***** error ecef2ned (45, 45, 100, 50i, 50, 200) +***** error ecef2ned (45, 45, 100, 50, "A", 200) +***** error ecef2ned (45, 45, 100, 50, 50i, 200) +***** error ecef2ned (45, 45, 100, 50, 50, "A") +***** error ecef2ned (45, 45, 100, 50, 50, 200i) +***** error ecef2ned ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error ecef2ned ([1 1], [2 2], [33], 4, 5, 6) +***** error ecef2ned ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** error ecef2ned ([1 1], [2 2], [3 3], 4, [5 5], 6) +***** error ecef2ned ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) +22 tests, 22 passed, 0 known failure, 0 skipped +[inst/rad2nm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rad2nm.m ***** test - [az, el, sr] = enu2aer ([8450.4; 186.277521], [12473.7; 286.84222], ... - [1104.6; 939.69262]); - assert ([az, el, sr], [34.115966, 4.193108, 15107.037863; 33.000001, ... - 70.0, 999.999997], 1e-6) -***** error enu2aer ("s", 25, 1e3) -***** error enu2aer (3i, 25, 1e3) -***** error enu2aer (33, "s", 1e3) -***** error enu2aer (33, 3i, 1e3) -***** error enu2aer (33, 25, "s") -***** error enu2aer (33, 25, 3i) -***** error enu2aer ([1 1], [2 2]', [4 5]) -***** error enu2aer ([1 1], [2 2], [4 5 6]) -11 tests, 11 passed, 0 known failure, 0 skipped -[inst/ned2geodetic.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2geodetic.m +***** assert (nm2rad (rad2nm (10)), 10, 10*eps); +***** assert (nm2rad (rad2nm (10, 80), 80), 10, 10*eps); +***** assert (nm2rad (rad2nm (10, "pluto"), "pluto"), 10, 10*eps); +***** error rad2nm (5, 5i) +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/deg2sm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/deg2sm.m ***** test - [lat, lon, alt] = ned2geodetic (286.84, 186.28, -939.69, 42, -82, 200); - assert ([lat, lon, alt], [42.00258, -81.997752, 1139.69918], 10e-6); +***** assert (sm2deg (deg2sm (10)), 10, 10*eps); +***** assert (sm2deg (deg2sm (10, 80), 80), 10, 10*eps); +***** assert (sm2deg (deg2sm (10, "pluto"), "pluto"), 10, 10*eps); +***** error deg2sm (5, 5i) +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/wrapTo180.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapTo180.m ***** test - [lat, lon, alt] = ned2geodetic (286.84, 186.28, -939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); - assert ([lat, lon, alt], [0.73308, -1.43113, 1139.69918], 10e-6); + x = -800:0.1:800; + xw = wrapTo180 (x); + assert (sind (x), sind (xw), 16 * eps) + assert (cosd (x), cosd (xw), 16 * eps) + assert (! any (xw < -180)) + assert (! any (xw > 180)) ***** test - [a, b, c] = ned2geodetic (-4556.3, -7134.8, -2852.4, 46.017, 7.750, 1673, 7030); - assert ([a, b, c], [45.976000, 7.657999, 4531.009608], 1e-6); + c = [-721.1, -718.9, -481.3, -479.99, -361, -359, -200, -180-(1e-14), -180, ... + -180-(2e-14), -160, -eps, 0, eps, 160, 180, 180+(1e-14), 180+(2e-14), 200]; + assert (wrapTo180 (c), [-1.10, 1.10, -121.30, -119.99, -1.0, 1.0, 160.0, ... + -180.0, -180.0, 180.0, -160.0, -0.0, 0.0, 0.0, ... + 160.0, 180.0, 180.0, -180.0, -160.0], 1e-13); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/geo2con.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2con.m ***** test - [a, b, c] = ned2geodetic (1334.3, -2543.6, 359.65, 44.532, -72.782, 1699); - assert ([a, b, c], [44.5440, -72.8140, 1339.9960], 1e-4); -***** error ned2geodetic("s", 25, 1e3, 0, 0, 0) -***** error ned2geodetic(3i, 25, 1e3, 0, 0, 0) -***** error ned2geodetic(33, "s", 1e3, 0, 0, 0) -***** error ned2geodetic(33, 3i, 1e3, 0, 0, 0) -***** error ned2geodetic(33, 25, "s", 0, 0, 0) -***** error ned2geodetic(33, 25, 3i, 0, 0, 0) -***** error ned2geodetic(33, 25, 1e3, "s", 0, 0) -***** error ned2geodetic(33, 25, 1e3, 3i, 0, 0) -***** error ned2geodetic(33, 25, 1e3, 0, "s", 0) -***** error ned2geodetic(33, 25, 1e3, 0, 3i, 0) -***** error ned2geodetic(33, 25, 1e3, 0, 0, "s") -***** error ned2geodetic(33, 25, 1e3, 0, 0, 3i) -***** error ned2geodetic ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error ned2geodetic ([1 1], [2 2], [33], 4, 5, 6) -***** error ned2geodetic ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** error ned2geodetic ([1 1], [2 2], [3 3], 4, [5 5], 6) -***** error ned2geodetic ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) -21 tests, 21 passed, 0 known failure, 0 skipped -[inst/deg2km.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/deg2km.m -***** assert (km2deg (deg2km (10)), 10) -***** assert (km2deg (deg2km (10, 80), 80), 10) -***** assert (km2deg (deg2km (10, "pluto"), "pluto"), 10) + phi = [0:15:90]; + chi = geo2con (phi); + Z = degrees2dm(chi - phi); + check = [0; ... + -5.755543956550260; ... + -9.979077451140980; ... + -11.53895663467140; ... + -10.00703049899710; ... + -5.783497189944170; ... + 0]; + assert (Z(:,2), check, 1e-6) +***** error geo2con ("s") +***** error geo2con (5i) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/shaperead.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/shaperead.m -***** error shaperead ('tst.shp', 'j'); -***** error shaperead ('tst.shp', 7); -***** error shaperead ('tst.shp', 'deb') -***** error < property name expected> shaperead ('tst.shp', "ml", []); -***** error shaperead ('tst.shp', 'deb', {}); -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/dms2degrees.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/dms2degrees.m -***** test - hs = 0.5/60; - deg = [ 10 10.5 -10.5 -10 -0.5 0.5 hs 0 -1/60 ]' + hs; - dms = [ 10 0 30 - 10 30 30 - -10 29 30 - -9 59 30 - 0 -29 30 - 0 30 30 - 0 1 0 - 0 0 30 - 0 0 -30]; - for i = 1:rows (dms) - assert (dms2degrees (dms(i,:)), deg(i), 2*10^-15); - endfor - assert (dms2degrees (dms), deg, eps*10); - assert (dms2degrees (single (dms)), single (deg), 3*10^-8); -***** error dms2degrees ([5 40 60]) -***** error dms2degrees ([5 40 61]) -***** error <3 columns> dms2degrees ([5 50]) -***** error dms2degrees ([5 -40 9]) -***** error dms2degrees ([-5 -40 9]) -***** error dms2degrees ([0 -40 -9]) -***** error <3 columns> dms2degrees (rand (7, 3, 3)) -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/geodeticfwd.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticfwd.m -***** error geodeticfwd (1, 1, 1); -***** error geodeticfwd (1, 2, 'a', 4); -***** error geodeticfwd ({2}, 2, 'a', 4); -***** error geodeticfwd (1+2i, 2, 3, 4); -***** error geodeticfwd ([1 2], [2; 1], 0, 0); -***** error geodeticfwd (1, 2, 3, 4, 'b'); -***** error geodeticfwd (1, 2, 3, 4, 'm', 'b'); -***** error geodeticfwd (1, 2, 3, 4, 'd', 'wgs84', 'f'); -***** error geodeticfwd (1, 2, 3, 4, 'd', 'wgs84', {5}); -***** error geodeticfwd (1, 2, 3, 4, [1, 2, 3]); -***** error geodeticfwd (1, 2, 3, 4, struct ("a", "b")); -***** error geodeticfwd (pi/4, -pi/4, pi/2, 10, 'nm', 'r', struct ("a", [])); +[inst/ned2ecefv.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2ecefv.m ***** test - [lato, lono, azo] = geodeticfwd (0, 0, pi, pi/4, 'a', 'Unit Sphere', 'r'); - assert (rad2deg ([lato lono azo]), [0, 180, 135], 1e-10); + [u, v, w] = ned2ecefv (871.0476287, 224.3854022, -436.9521873, 42, -82, "d"); + assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) ***** test - [lato, lono, azo] = geodeticfwd (0, 0, pi/2, pi/4, 'angle', 'Unit Sphere', 'radians'); - assert (rad2deg ([lato lono azo]), [45, 90, 90], 1e-10); + [u, v, w] = ned2ecefv (871.0476287, 224.3854022, -436.9521873, ... + 0.733038285837618, -1.43116998663535, "r"); + assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) +***** test ## Multidimensionality + [u, v, w] = ned2ecefv ([871.0476287; 900], [224.3854022; 200], [-436.9521873; -500], 42, -82); + assert ([u, v, w], [186.277521, 286.84222, 939.69262; ... + 165.954015, 256.23513, 1003.395646], 1e6); ***** test - [lato, lono, azo] = geodeticfwd (0, pi/4, pi/2, 3*pi/4, 'a', 'Unit Sphere', 'r'); - assert (rad2deg ([lato lono azo]), [ -45, 135, 90], 1e-10); + [u, v, w] = ned2ecefv (-434.0403, 152.4451, -684.6964, 61.64, 30.70); + assert ([u, v, w], [530.24451, 492.12835, 396.34594], 1e-5); +***** error ned2ecefv("s", 25, 1e3, 0, 0) +***** error ned2ecefv(3i, 25, 1e3, 0, 0) +***** error ned2ecefv(33, "s", 1e3, 0, 0) +***** error ned2ecefv(33, 3i, 1e3, 0, 0) +***** error ned2ecefv(33, 25, "s", 0, 0) +***** error ned2ecefv(33, 25, 3i, 0, 0) +***** error ned2ecefv(33, 25, 1e3, "s", 0) +***** error ned2ecefv(33, 25, 1e3, 3i, 0) +***** error ned2ecefv(33, 25, 1e3, 0, "s") +***** error ned2ecefv(33, 25, 1e3, 0, 3i) +***** error ned2ecefv (33, 70, 1e3, 0, 0, "f"); +***** error ned2ecefv (33, 70, 1e3, 0, 0, "degreef") +***** error [u, v, w] = ned2ecefv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) +***** error [u, v, w] = ned2ecefv ([1, 2, 3], [4, 5, 6], [7, 8, 9], [40; 50], [-40; -50]) +***** error [u, v, w] = ned2ecefv ([1, 2, 3], [4, 5, 6], [7, 8, 9], 50, [-45; 50]) +19 tests, 19 passed, 0 known failure, 0 skipped +[inst/degrees2dm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/degrees2dm.m ***** test - [lato, lono, azo] = geodeticfwd (45, -45, 180, 90, 'Unit Sphere', 'd'); - assert ([lato lono azo], [-45, 135, 90], 1e-10); -16 tests, 16 passed, 0 known failure, 0 skipped -[inst/geodetic2aer.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodetic2aer.m + deg = [10 10.5 -10.5 -0.5 0.5]'; + dm = [ 10 0 + 10 30 + -10 30 + 0 -30 + 0 30]; + for i = 1:rows (deg) + assert (degrees2dm (deg(i)), dm(i,:)); + assert (degrees2dm (single (deg(i))), single (dm(i,:))); + endfor + assert (degrees2dm (deg), dm); + assert (degrees2dm (single (deg)), single (dm)); + + warning ("error", "Octave:array-to-vector", "local") + got_warn = false; + try + degrees2dm (deg'); + catch + got_warn = true; + end_try_catch + assert (got_warn, true) +***** assert (degrees2dm ("f"), [102 0]) +***** assert (degrees2dm ("fm"), [102 0; 109 0]) +***** assert (degrees2dm (true), [1 0]) +***** assert (degrees2dm ([true false]), [1 0; 0 0]) +***** assert (degrees2dm (uint8 ([5 48 9]')), uint8 ([5 0; 48 0; 9 0])) +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/flat2ecc.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/flat2ecc.m ***** test - lat = 42.002582; lon = -81.997752; alt = 1139.7; - lat0 = 42; lon0 = -82; alt0 = 200; - [az, el, slantRange] = geodetic2aer (lat, lon, alt, lat0, lon0, alt0); - assert([az, el, slantRange], [33, 70, 1000], 10e-3); + flat = 0.00335281317793612; + f_vec = 0:.01:.05; + assert (flat2ecc (flat), 0.0818192214560008, 10^-12 ) + assert (flat2ecc (f_vec), [0 , .141067, .198997, .2431049, .28, .31225], 10^-6); +***** error flat2ecc ("a") +***** error flat2ecc(1) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/egm96geoid.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/egm96geoid.m +***** test ## Check for heights of some global extreme regions + assert (egm96geoid ([20, 50, 60, 10, -5], [-120, -50, -20, 75, 140]), ... + [-47.576, 24.159,60.658, -97.286, 75.784], 1e-2); +***** error egm96geoid ("a", 1) +***** error egm96geoid (2.5i, 1) +***** error egm96geoid (-1) +***** error egm96geoid (1, [3 4]) +***** error egm96geoid (1, 1, 2) +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/aer2geodetic.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2geodetic.m ***** test - Rad=deg2rad([42.002582, -81.997752, 42, -82, 33, 70]); - alt = 1139.7; alt0 = 200; - [az, el, slantRange] = geodetic2aer(Rad(1), Rad(2), alt, Rad(3), Rad(4), alt0, "rad"); - assert([az, el, slantRange], [Rad(5), Rad(6), 1000], 10e-3); + [lat2, lon2, alt2] = aer2geodetic (33, 70, 1e3, 42, -82, 200); + assert ([lat2, lon2, alt2], [42.002581, -81.997752, 1.1397018e3], 10e-6); ***** test - [g, h, k] = geodetic2aer (45.977, 7.658, 4531, 46.017, 7.750, 1673); - assert ([g, h, k], [238.075833, 18.743875, 8876.843345], 1e-6); -***** error geodetic2aer (45, 45, 100, 50, 50, 200, "", "km") -***** error geodetic2aer ("A", 45, 100, 50, 50, 200) -***** error geodetic2aer (45i, 45, 100, 50, 50, 200) -***** error geodetic2aer (45, "A", 100, 50, 50, 200) -***** error geodetic2aer (45, 45i, 100, 50, 50, 200) -***** error geodetic2aer (45, 45, "A", 50, 50, 200) -***** error geodetic2aer (45, 45, 100i, 50, 50, 200) -***** error geodetic2aer (45, 45, 100, "A", 50, 200) -***** error geodetic2aer (45, 45, 100, 50i, 50, 200) -***** error geodetic2aer (45, 45, 100, 50, "A", 200) -***** error geodetic2aer (45, 45, 100, 50, 50i, 200) -***** error geodetic2aer (45, 45, 100, 50, 50, "A") -***** error geodetic2aer (45, 45, 100, 50, 50, 200i) -16 tests, 16 passed, 0 known failure, 0 skipped -[inst/sm2deg.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/sm2deg.m + [lat2, lon2, alt2] = aer2geodetic ( 0.575958653158129, 1.22173047639603, ... + 1e3, 0.733038285837618, -1.43116998663535, 200, "", "rad"); + assert ([lat2, lon2, alt2], [0.7330833, -1.4311307, 1.13970179e3], 10e-6); ***** test - ratio = unitsratio ('km','sm'); - assert (sm2deg (10), km2deg (ratio*10), 10*eps); - assert (sm2deg (10, 80), km2deg (ratio*10, ratio*80), 10*eps); - assert (sm2deg (10, "pluto"), km2deg (ratio*10, "pluto"), 10*eps); -1 test, 1 passed, 0 known failure, 0 skipped + [lat2, lon2, alt2] = aer2geodetic ([33; 34], [70; 71], [1e3; 1.1e3], ... + [42; 43], [-82; -80], [200; 210]); + assert ([lat2, lon2, alt2], [42.002582, -81.997752, 1139.7018; ... + 43.002672 , -79.997544, 1250.080495], 1e-6); +***** error aer2geodetic ("s", 25, 1e3, 0, 0, 0) +***** error aer2geodetic (3i, 25, 1e3, 0, 0, 0) +***** error aer2geodetic (33, "s", 1e3, 0, 0, 0) +***** error aer2geodetic (33, 3i, 1e3, 0, 0, 0) +***** error aer2geodetic (33, 25, "s", 0, 0, 0) +***** error aer2geodetic (33, 25, 3i, 0, 0, 0) +***** error aer2geodetic (33, 25, 1e3, "s", 0, 0) +***** error aer2geodetic (33, 25, 1e3, 3i, 0, 0) +***** error aer2geodetic (33, 25, 1e3, 0, "s", 0) +***** error aer2geodetic (33, 25, 1e3, 0, 3i, 0) +***** error aer2geodetic (33, 25, 1e3, 0, 0, "s") +***** error aer2geodetic (33, 25, 1e3, 0, 0, 3i) +***** error aer2geodetic ([1 2], [3 ], 5, 45, -45, 400) +***** error aer2geodetic ([1; 2], [3 4], [5 6], 45, -45, 400) +***** error aer2geodetic ([1; 2], [3 4], [5 6], [45 50], [-45 -50], 400) +***** error aer2geodetic ([1; 2], [3 4], [5 6], [45; 50], [-45; -50], [400; 500]) +19 tests, 19 passed, 0 known failure, 0 skipped [inst/ecef2enu.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2enu.m ***** test @@ -4662,65 +4138,143 @@ ***** error ecef2enu ([1 1], [2 2], [3 3], 4, [5 5], 6) ***** error ecef2enu ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) 21 tests, 21 passed, 0 known failure, 0 skipped -[inst/ecef2aer.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2aer.m -***** test - [az, el, slantrange] = ecef2aer (660930.192761082, -4701424.22295701, 4246579.60463288, 42, -82, 200); - assert ([az, el, slantrange], [33, 70, 1e3], 10e-6) -***** test - [az, el, slantrange] = ecef2aer (660930.192761082, -4701424.22295701, 4246579.60463288, 0.7330382858, -1.43116999, 200, "", "r"); - assert ([az, el, slantrange], [0.57595865, 1.221730476, 1e3], 5e-3) -***** test - [az, el, slantrange] = ecef2aer (10766080.3, 14143607.0, 33992388.0, 42.3221, -71.3576, 84.7); - assert ([az, el, slantrange], [24.801, 14.619, 36271632.6754], 1e-3) -***** error ecef2aer (45, 45, 100, 50, 50, 200, "", "km") -***** error ecef2aer ("A", 45, 100, 50, 50, 200) -***** error ecef2aer (45i, 45, 100, 50, 50, 200) -***** error ecef2aer (45, "A", 100, 50, 50, 200) -***** error ecef2aer (45, 45i, 100, 50, 50, 200) -***** error ecef2aer (45, 45, "A", 50, 50, 200) -***** error ecef2aer (45, 45, 100i, 50, 50, 200) -***** error ecef2aer (45, 45, 100, "A", 50, 200) -***** error ecef2aer (45, 45, 100, 50i, 50, 200) -***** error ecef2aer (45, 45, 100, 50, "A", 200) -***** error ecef2aer (45, 45, 100, 50, 50i, 200) -***** error ecef2aer (45, 45, 100, 50, 50, "A") -***** error ecef2aer (45, 45, 100, 50, 50, 200i) -***** error ecef2aer ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error ecef2aer ([1 1], [2 2], [33], 4, 5, 6) -***** error ecef2aer ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** error ecef2aer ([1 1], [2 2], [3 3], 4, [5 5], 6) -***** error ecef2aer ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) -21 tests, 21 passed, 0 known failure, 0 skipped [inst/km2deg.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/km2deg.m ***** assert (deg2km (km2deg (10)), 10, 10*eps) ***** assert (deg2km (km2deg (10, 80), 80), 10, 10*eps) ***** assert (deg2km (km2deg (10, "pluto"), "pluto"), 10, 10*eps) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/aer2ned.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2ned.m +[inst/gcxsc.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/gcxsc.m ***** test - [n, e, d] = aer2ned (33, 70, 1e3); - assert ([n, e, d], [286.84222, 186.277521, -939.69262], 10e-6) - [e, n, u] = aer2ned (0.57595865, 1.221730476, 1e3, "rad"); - assert ([e, n, u], [286.84222, 186.277521, -939.69262], 10e-6) -***** error aer2ned("s", 25, 1e3) -***** error aer2ned(3i, 25, 1e3) -***** error aer2ned(33, "s", 1e3) -***** error aer2ned(33, 3i, 1e3) -***** error aer2ned(33, 25, "s") -***** error aer2ned(33, 25, 3i) -***** error aer2ned ([1 1], [2 2]', [4 5]) -***** error aer2ned ([1 1], [2 2], [4 5 6]) -***** error aer2ned (1, 2, 3, 4); -***** error aer2ned (33, 70, 1e3, "f"); -***** error aer2ned (33, 70, 1e3, "degreef"); -12 tests, 12 passed, 0 known failure, 0 skipped -[inst/radtodeg.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/radtodeg.m -***** assert (radtodeg(pi),180,10*eps) + [lat, lon] = gcxsc (60, 25, 20, 55, 25, 2.5); + assert (lat(1), 53.80564992, 1e-6); + assert (lon(1), 21.22598692, 1e-6); +***** error gcxsc ("s", 0, 100, 10, 30, 0) +***** error gcxsc (3i, 0, 100, 10, 30, 0) +***** error gcxsc (50, "s", 100, 10, 30, 0) +***** error gcxsc (50, 2i, 10, 10, 30, 0) +***** error gcxsc (50, 0, "s", 10, 30, 0) +***** error gcxsc (50, 0, 100i, 10, 30, 0) +***** error gcxsc (50, 0, 100, "s", 30, 0) +***** error gcxsc (50, 0, 100, 10i, 30, 0) +***** error gcxsc (50, 0, 100, 10, "s", 0) +***** error gcxsc (50, 0, 100, 10, 30i, 0) +***** error gcxsc (50, 0, 100, 10, 30, "s") +***** error gcxsc (50, 0, 100, 10, 30, 2i) +***** error gcxsc (50, 0, 100, 10, 30, 0, "f") +***** error gcxsc (50, 0, 100, 10, 30, 0, "degreef") +***** error gcxsc (190, 0, 90, -90.000001, 180, 80); +***** error gcxsc (190, 0, -90.001, -90.000001, 180, 80); +***** error gcxsc (pi/1.999, 0, pi/2, pi/2.0001, 2, 2*pi/3, "r"); +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/departure.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/departure.m +***** test + dist = departure (60, 80, 50); + assert (dist, 12.856, 1e-3) + dist = departure (deg2rad (60), deg2rad (80), deg2rad (50), "radians"); + assert (dist, deg2rad (12.856), 1e-3) +***** test + assert (departure (0, deg2rad (30), deg2rad (60), "wgs84", "r"), ... + departure (0, 30, 60, "wgs84", "d"), 1e-10); +***** test + E = wgs84Ellipsoid ("km"); + dist = departure (60, 80, 50, E); + assert (dist, 1433.915, 1e-3) +***** test + assert (departure ([20 25], [30 35], 40), [7.6604 7.6604], 1e-4); +***** test + assert (departure ([20 25], [30 35], [40 41]), [7.6604 7.5471], 1e-4); +***** error departure ("s", 80, 50) +***** error departure ( 5i, 80, 50) +***** error departure ( 60, "s", 50) +***** error departure ( 60, 5i, 50) +***** error departure ( 60, 80, "s") +***** error departure ( 60, 80, 5i) +***** error departure ([20 25], [30; 35], 40) +***** error departure ([20 25], [30 35], [40; 40]) +13 tests, 13 passed, 0 known failure, 0 skipped +[inst/wrapTo2Pi.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapTo2Pi.m +***** test + x = -9:0.1:9; + xw = wrapTo2Pi (x); + assert (sin (x), sin (xw), 8 * eps) + assert (cos (x), cos (xw), 8 * eps) + assert (! any (xw < 0)) + assert (! any (xw > 2 * pi)) +***** test + assert (wrapTo2Pi ([-2*pi, -pi, 0, pi; 0.1, pi, 4*pi, 5*pi]), ... + [0, pi, 0, pi; 0.1, pi, 2*pi, pi], 1e-13); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/unitsratio.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/unitsratio.m +***** assert (unitsratio ("inch", "foot"), 12) +***** assert (unitsratio ("m", "cm"), 0.01) +***** assert (unitsratio ("cm", "m"), 100) +***** assert (unitsratio ("meter", "meter"), 1) +***** assert (unitsratio ("degrees", "radians"), 180 / pi) +***** assert (unitsratio ("radians", "degrees"), pi / 180) +***** error unitsratio ("NOT A UNIT", "meter") +***** error unitsratio ("meter", "NOT A UNIT") +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/azimuth.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/azimuth.m +***** test + assert(azimuth([10,10], [10,40]), 87.336, 1e-3) + assert(azimuth([0,10], [0,40]), 90, 1e-3) + assert(azimuth(pi/4,0,pi/4,-pi/2,"radians"), 5.3279, 1e-4) 1 test, 1 passed, 0 known failure, 0 skipped +[inst/fromDegrees.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/fromDegrees.m +***** test + rad{1} = pi; + rad{2} = [pi 2*pi]; + rad{3} = [0 pi; 2*pi 0]; + deg{1} = 180; + deg{2} = [180 360]; + deg{3} = [0 180; 360 0]; + for i=1:3 + assert (fromDegrees ("degrees", deg{i}), deg{i}) + assert (fromDegrees ("radians", deg{i}), rad{i}) + endfor + + ## test multiple angles same time + assert (nthargout (1:3, @fromDegrees, "radians", deg{:}), rad) + assert (nthargout (1:2, @fromDegrees, "radians", deg{:}), rad(1:2)) + + ## test abbreviations of degrees + assert (nthargout (1:3, @fromDegrees, "radian", deg{:}), rad) + assert (nthargout (1:3, @fromDegrees, "rad", deg{:}), rad) + assert (nthargout (1:3, @fromDegrees, "r", deg{:}), rad) +***** error fromDegrees ("INVALID") +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/gc2sc.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/gc2sc.m +***** test + [lat, lon, radius] = gc2sc (60, 25, 60); + assert (lat, -25.6589, 1e-5) + assert (lon, 58.69006, 1e-5) +***** test + [lat, lon, radius] = gc2sc (0, 45, 90); + assert (lat, -90, 1e-5) + assert (lon, 0, 1e-5) + m = gc2sc (45, [0:45:360], 45); + assert (m(:, 1), repmat (-30.0, 9, 1), 1e-10); + assert (m(:, 2), [ 54.73561031725; 99.73561031725; 144.73561031725; ... + -170.26438968276; -125.26438968276; -80.26438968276; ... + -35.26438968276; 9.73561031725; 54.73561031725], 1e-10); + assert (m(:, 3), repmat (90.0, 9, 1), 1e-10); +***** error gc2sc ("s", 0, 100) +***** error gc2sc (3i, 0, 100) +***** error gc2sc (50, "s", 100) +***** error gc2sc (50, 0, 100, "f") +***** error gc2sc (50, 0, 100, "degreef") +***** error gc2sc (190, 0, 90); +***** error gc2sc (-91, 0, -90.001); +***** error gc2sc (pi/1.999, 0, pi/2, "r"); +10 tests, 10 passed, 0 known failure, 0 skipped [inst/angl2str.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/angl2str.m ***** test @@ -5222,123 +4776,419 @@ ' 181° 42'' 00.0000" W '; ' 181° 42'' 00.0000" W '; ... ' 181° 42'' 36.0000" E ']); 491 tests, 491 passed, 0 known failure, 0 skipped -[inst/rad2nm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rad2nm.m +[inst/ned2ecef.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2ecef.m ***** test -***** assert (nm2rad (rad2nm (10)), 10, 10*eps); -***** assert (nm2rad (rad2nm (10, 80), 80), 10, 10*eps); -***** assert (nm2rad (rad2nm (10, "pluto"), "pluto"), 10, 10*eps); -***** error rad2nm (5, 5i) + [x, y, z] = ned2ecef (286.84, 186.28, -939.69, 42, -82, 200); + assert ([x, y, z], [6.6093019515e5, -4.70142422216e6, 4.24657960122e6], 10e-6) +***** test + [x3, y3, z3] = ned2ecef (286.84, 186.28, -939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); + assert ([x3, y3, z3], [660.93019e3, -4701.42422e3, 4246.5796e3],10e-3) +***** test + [a, b, c] = ned2ecef (-923083.2, 355601.3, -1041016.4, 45.9132, 36.7484, 1877753.2); + assert ([a, b, c], [5507528.8891, 4556224.1399, 6012820.7522], 1e-4) +***** test + [x,y,z] = ned2ecef( 1334.3, -2544.4, 360.0, 44.532, -72.782, 1699); + assert ([x, y, z], [1345659.962, -4350890.986, 4452313.969], 1e-3); +***** error ned2ecef("s", 25, 1e3, 0, 0, 0) +***** error ned2ecef(3i, 25, 1e3, 0, 0, 0) +***** error ned2ecef(33, "s", 1e3, 0, 0, 0) +***** error ned2ecef(33, 3i, 1e3, 0, 0, 0) +***** error ned2ecef(33, 25, "s", 0, 0, 0) +***** error ned2ecef(33, 25, 3i, 0, 0, 0) +***** error ned2ecef(33, 25, 1e3, "s", 0, 0) +***** error ned2ecef(33, 25, 1e3, 3i, 0, 0) +***** error ned2ecef(33, 25, 1e3, 0, "s", 0) +***** error ned2ecef(33, 25, 1e3, 0, 3i, 0) +***** error ned2ecef(33, 25, 1e3, 0, 0, "s") +***** error ned2ecef(33, 25, 1e3, 0, 0, 3i) +***** error ned2ecef ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error ned2ecef ([1 1], [2 2], [33], 4, 5, 6) +***** error ned2ecef ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** error ned2ecef ([1 1], [2 2], [3 3], 4, [5 5], 6) +***** error ned2ecef ([1 1], [2 2], [3 3], 4, 5, [6 6]) +21 tests, 21 passed, 0 known failure, 0 skipped +[inst/rad2sm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rad2sm.m +***** test +***** assert (sm2rad (rad2sm (10)), 10, 10*eps); +***** assert (sm2rad (rad2sm (10, 80), 80), 10, 10*eps); +***** assert (sm2rad (rad2sm (10, "pluto"), "pluto"), 10, 10*eps); +***** error rad2sm (5, 5i) 5 tests, 5 passed, 0 known failure, 0 skipped -[inst/ecef2nedv.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2nedv.m +[inst/dm2degrees.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/dm2degrees.m ***** test - [n, e, d] = ecef2nedv (186.277521, 286.84222, 939.69262, 42, -82, "d"); - assert ([n, e, d], [871.0476287, 224.3854022, -436.9521873], 10e-6); + deg = [10 10.5 -10.5 -0.5 0.5]'; + dm = [ 10 0 + 10 30 + -10 30 + 0 -30 + 0 30]; + for i = 1:rows (dm) + assert (dm2degrees (dm(i,:)), deg(i)); + endfor + assert (dm2degrees (dm), deg); + assert (dm2degrees (single (dm)), single (deg)); +***** error dm2degrees ([5 60]) +***** error dm2degrees ([5 61]) +***** error <2 columns> dm2degrees ([5 50 3]) +***** error dm2degrees ([5 -40]) +***** error dm2degrees ([-5 -40]) +***** error dm2degrees (rand (7, 2, 3)) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/sm2deg.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/sm2deg.m ***** test - [n, e, d] = ecef2nedv (186.277521, 286.84222, 939.69262, ... - 0.733038285837618, -1.43116998663535, "r"); - assert ([n, e, d], [871.0476287, 224.3854022, -436.9521873], 10e-6); -***** test ## Multidimensionality - [n, e, d] = ecef2nedv ([186.277521; 200], [286.84222; 300], [939.69262; 1000], 42, -82); - assert ([n, e, d], [871.047629, 224.385402, -436.952187; ... - 923.305431, 239.805544, -469.041983], 1e-6); + ratio = unitsratio ('km','sm'); + assert (sm2deg (10), km2deg (ratio*10), 10*eps); + assert (sm2deg (10, 80), km2deg (ratio*10, ratio*80), 10*eps); + assert (sm2deg (10, "pluto"), km2deg (ratio*10, "pluto"), 10*eps); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/toDegrees.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/toDegrees.m ***** test - [nv, ev, dv] = ecef2nedv (530.2445, 492.1283, 396.3459, 61.64, 30.70); - assert ([nv, ev, dv], [-434.0403, 152.4451, -684.69634], 1e-4); -***** error ecef2nedv("s", 25, 1e3, 0, 0) -***** error ecef2nedv(3i, 25, 1e3, 0, 0) -***** error ecef2nedv(33, "s", 1e3, 0, 0) -***** error ecef2nedv(33, 3i, 1e3, 0, 0) -***** error ecef2nedv(33, 25, "s", 0, 0) -***** error ecef2nedv(33, 25, 3i, 0, 0) -***** error ecef2nedv(33, 25, 1e3, "s", 0) -***** error ecef2nedv(33, 25, 1e3, 3i, 0) -***** error ecef2nedv(33, 25, 1e3, 0, "s") -***** error ecef2nedv(33, 25, 1e3, 0, 3i) -***** error ecef2nedv (33, 70, 1e3, 0, 0, "f"); -***** error ecef2nedv (33, 70, 1e3, 0, 0, "degreef") -***** error [u, v, w] = ecef2nedv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) -***** error [u, v, w] = ecef2nedv ([1, 2, 3], [4, 5, 6], [7, 8, 9], [40; 50], [-40; -50]) -***** error [u, v, w] = ecef2nedv ([1, 2, 3], [4, 5, 6], [7, 8, 9], 50, [-45; 50]) -19 tests, 19 passed, 0 known failure, 0 skipped -[inst/auth2geo.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/auth2geo.m + rad{1} = pi; + rad{2} = [pi 2*pi]; + rad{3} = [0 pi; 2*pi 0]; + deg{1} = 180; + deg{2} = [180 360]; + deg{3} = [0 180; 360 0]; + for i=1:3 + assert (toDegrees ("degrees", deg{i}), deg{i}) + assert (toDegrees ("radians", rad{i}), deg{i}) + endfor + + ## test multiple angles same time + assert (nthargout (1:3, @toDegrees, "radians", rad{:}), deg) + assert (nthargout (1:2, @toDegrees, "radians", rad{:}), deg(1:2)) + + ## test abbreviations of degrees + assert (nthargout (1:3, @toDegrees, "radian", rad{:}), deg) + assert (nthargout (1:3, @toDegrees, "rad", rad{:}), deg) + assert (nthargout (1:3, @toDegrees, "r", rad{:}), deg) +***** error toRadians ("INVALID") +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/km2nm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/km2nm.m ***** test - xi = [0:15:90]; - phi = auth2geo (xi); - Z = degrees2dm(phi - xi); - check = [0 - 3.8575173 - 6.6751024 - 7.6978157 - 6.6579355 - 3.8403504 + km = [1.8520 3.7040 5.5560 7.4080 12.9640 14.8160]; + nm = [1 2 3 4 7 8]; + assert (km2nm (km), nm) + km = reshape (km, [1 3 2]); + nm = reshape (nm, [1 3 2]); + assert (km2nm (km), nm) +***** assert (km2nm (1.852), 1) +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/removeExtraNanSeparators.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/removeExtraNanSeparators.m +***** assert (nthargout (1:2, @removeExtraNanSeparators, + [NaN NaN 3 4 5 6 NaN NaN], [NaN NaN 4 5 5 7 NaN NaN]), + {[ 3 4 5 6 NaN ], [ 4 5 5 7 NaN ]}); +***** assert (nthargout (1:2, @removeExtraNanSeparators, + [NaN NaN 3 4 NaN 6 NaN], [NaN NaN 2 4 NaN 3 NaN]), + {[ 3 4 NaN 6 NaN], [ 2 4 NaN 3 NaN]}); +***** assert (nthargout (1:2, @removeExtraNanSeparators, + [NaN 2 NaN NaN 6 NaN], [NaN 1 NaN NaN 8 NaN]), + {[ 2 NaN 6 NaN], [ 1 NaN 8 NaN]}); +***** assert (nthargout (1:2, @removeExtraNanSeparators, + [1 2 NaN NaN 6 NaN], [8 1 NaN NaN 8 NaN]), + {[1 2 NaN 6 NaN], [8 1 NaN 8 NaN]}); +***** assert (nthargout (1:2, @removeExtraNanSeparators, + [1 2 NaN NaN 6], [8 1 NaN NaN 8]), + {[1 2 NaN 6], [8 1 NaN 8]}); +***** assert (nthargout (1:2, @removeExtraNanSeparators, 1:9, 1:9), {1:9 1:9}) +***** assert (nthargout (1:2, @removeExtraNanSeparators, 9:-1:-9, 9:-1:-9), {9:-1:-9 9:-1:-9}) +***** assert (nthargout (1:3, @removeExtraNanSeparators, + [1 2 NaN NaN 6], [8 1 NaN NaN 8], [5 6 NaN NaN 7]), + {[1 2 NaN 6], [8 1 NaN 8], [5 6 NaN 7]}); +***** assert (nthargout (1:3, @removeExtraNanSeparators, + [1 2 NaN NaN 6]', [8 1 NaN NaN 8]', [5 6 NaN NaN 7]'), + {[1 2 NaN 6]', [8 1 NaN 8]', [5 6 NaN 7]'}); +***** error removeExtraNanSeparators (rand (5), rand (5)) +***** error removeExtraNanSeparators (rand (5, 1), rand (6, 1)) +***** error removeExtraNanSeparators (rand (5, 1), rand (5, 1), rand (5)) +***** error removeExtraNanSeparators (rand (5, 1), rand (5, 1), rand (6, 1)) +***** error removeExtraNanSeparators ([NaN NaN 3 4 5 6 NaN], [NaN 2 3 4 5 6 NaN]) +***** error removeExtraNanSeparators ([NaN NaN 3 4 5 6 NaN], [NaN NaN 3 4 5 6 NaN], [NaN 2 3 4 5 6 NaN]) +15 tests, 15 passed, 0 known failure, 0 skipped +[inst/geodetic2enu.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodetic2enu.m +***** test + lat = 42.002582; lon = -81.997752; alt = 1139.7; + lat0 = 42; lon0 = -82; alt0 = 200; + [e, n, u] = geodetic2enu(lat, lon, alt, lat0, lon0, alt0); + assert([e, n, u], [186.28, 286.84, 939.69], 10e-3); +***** test + Rad=deg2rad([42.002582, -81.997752, 42, -82]); + alt = 1139.7; alt0 = 200; + [e, n, u] = geodetic2enu(Rad(1), Rad(2), alt, Rad(3), Rad(4), alt0, "rad"); + assert([e, n, u], [186.28, 286.84, 939.69], 10e-3); +***** test + [a, b, c] = enu2geodetic (-7134.8, -4556.3, 2852.4, 46.017, 7.750, 1673, 'wgs84'); + [d, e, f] = geodetic2enu (a, b, c, 46.017, 7.750, 1673); + assert ([d, e, f], [ -7134.8, -4556.3, 2852.4], 1e-6); +***** error geodetic2enu (45, 45, 100, 50, 50, 200, "", "km") +***** error geodetic2enu ("A", 45, 100, 50, 50, 200) +***** error geodetic2enu (45i, 45, 100, 50, 50, 200) +***** error geodetic2enu (45, "A", 100, 50, 50, 200) +***** error geodetic2enu (45, 45i, 100, 50, 50, 200) +***** error geodetic2enu (45, 45, "A", 50, 50, 200) +***** error geodetic2enu (45, 45, 100i, 50, 50, 200) +***** error geodetic2enu (45, 45, 100, "A", 50, 200) +***** error geodetic2enu (45, 45, 100, 50i, 50, 200) +***** error geodetic2enu (45, 45, 100, 50, "A", 200) +***** error geodetic2enu (45, 45, 100, 50, 50i, 200) +***** error geodetic2enu (45, 45, 100, 50, 50, "A") +***** error geodetic2enu (45, 45, 100, 50, 50, 200i) +16 tests, 16 passed, 0 known failure, 0 skipped +[inst/toRadians.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/toRadians.m +***** test + rad{1} = pi; + rad{2} = [pi 2*pi]; + rad{3} = [0 pi; 2*pi 0]; + deg{1} = 180; + deg{2} = [180 360]; + deg{3} = [0 180; 360 0]; + for i=1:3 + assert (toRadians ("degrees", deg{i}), rad{i}) + assert (toRadians ("radians", rad{i}), rad{i}) + endfor + + ## test multiple angles same time + assert (nthargout (1:3, @toRadians, "degrees", deg{:}), rad) + assert (nthargout (1:2, @toRadians, "degrees", deg{:}), rad(1:2)) + + ## test abbreviations of degrees + assert (nthargout (1:3, @toRadians, "degree", deg{:}), rad) + assert (nthargout (1:3, @toRadians, "deg", deg{:}), rad) + assert (nthargout (1:3, @toRadians, "d", deg{:}), rad) +***** error toRadians ("INVALID") +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/aer2enu.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2enu.m +***** test + [e, n, u] = aer2enu (33, 70, 1e3); + assert ([e, n, u], [186.277521, 286.84222, 939.69262], 10e-6) + [e, n, u] = aer2enu (0.57595865, 1.221730476, 1e3, "rad"); + assert ([e, n, u], [186.277521, 286.84222, 939.69262], 10e-6) +***** error aer2enu("s", 25, 1e3) +***** error aer2enu(3i, 25, 1e3) +***** error aer2enu(33, "s", 1e3) +***** error aer2enu(33, 3i, 1e3) +***** error aer2enu(33, 25, "s") +***** error aer2enu(33, 25, 3i) +***** error aer2enu ([1 1], [2 2]', [4 5]) +***** error aer2enu ([1 1], [2 2], [4 5 6]) +***** error aer2enu (1, 2, 3, 4); +***** error aer2enu (1, 2) +***** error aer2enu (33, 70, 1e3, "f"); +***** error aer2enu (33, 70, 1e3, "degreef"); +13 tests, 13 passed, 0 known failure, 0 skipped +[inst/rect2geo.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rect2geo.m +***** test + mu = [0:15:90]; + phi = rect2geo (mu); + Z = degrees2dm (phi - mu); + check = [0, + 4.3406136, + 7.5100085, + 8.6590367, + 7.4879718, + 4.3185768, 0]; assert (Z(:,2), check, 1e-6) -***** error auth2geo ("s") -***** error auth2geo (5i) +***** error rect2geo ("s") +***** error rect2geo (5i) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/geo2iso.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2iso.m +[inst/reckon.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/reckon.m ***** test - psi = geo2iso (45); - assert (psi, 50.227465817, 1e-6) + [lato,lono] = reckon(30,-80,20,40); + assert(lato,44.16661401448592,1e-10) + assert(lono,-62.15251496909770,1e-10) ***** test - psi = geo2iso ([-90 90]); - assert (psi, [-Inf Inf]) + [lato,lono] = reckon(-30,80,[5 10],[40 45]); + assert(lato,[-26.12155703039504 -22.70996703614572],1e-10) + assert(lono,[83.57732793979254 87.64920016442251],1e-10) ***** test - chi = geo2iso (iso2geo ([-90 : 10: 0; 0 : 10 : 90]), "wgs84"); - assert (chi, [-90 : 10: 0; 0 : 10 : 90], 1e-6); -***** error geo2iso ("s") -***** error geo2iso (5i) + [lato,lono] = reckon([-30 31],[80 81],[5 10],[40 45]); + assert(lato,[-26.12155703039504 37.76782079033356],1e-10) + assert(lono,[83.57732793979254 89.93590456974810],1e-10) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/deg2nm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/deg2nm.m +***** test +***** assert (nm2deg (deg2nm (10)), 10, 10*eps); +***** assert (nm2deg (deg2nm (10, 80), 80), 10, 10*eps); +***** assert (nm2deg (deg2nm (10, "pluto"), "pluto"), 10, 10*eps); +***** error deg2nm (5, 5i) 5 tests, 5 passed, 0 known failure, 0 skipped -[inst/nm2km.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2km.m +[inst/gcxgc.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/gcxgc.m ***** test - km = [10 13.000002880000002 14.9999962 17.000008 19 31.000072400000004]; - nm = [5.399568034557235 7.01944 8.09935 9.179269978401727 10.259179265658746 16.7387]; - assert (nm2km (nm), km) - km = reshape (km, [3 2 1]); - nm = reshape (nm, [3 2 1]); - assert (nm2km (nm), km) -***** assert (nm2km (8.09935), 14.9999962) -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/flat2ecc.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/flat2ecc.m + [lat3, lon3] = gcxgc ( 51.8853, 0.2545, 108.55, 49.0034, 2.5735, 32.44); + assert (degrees2dms (lat3(1)), [50 54 27.387002], 10e-5); + assert (degrees2dms (lon3(1)), [04 30 30.868724], 10e-5); ***** test - flat = 0.00335281317793612; - f_vec = 0:.01:.05; - assert (flat2ecc (flat), 0.0818192214560008, 10^-12 ) - assert (flat2ecc (f_vec), [0 , .141067, .198997, .2431049, .28, .31225], 10^-6); -***** error flat2ecc ("a") -***** error flat2ecc(1) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/gc2sc.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/gc2sc.m + [lat3, lon3] = gcxgc (20, -5, 45, 30, 5, 15); + assert (lat3(1), 28.062035, 10e-5); + assert (lon3(1), 4.4120504, 10e-5); ***** test - [lat, lon, radius] = gc2sc (60, 25, 60); - assert (lat, -25.6589, 1e-5) - assert (lon, 58.69006, 1e-5) + latlon = gcxgc (45, 45, 90, 0, 0, 90); + assert (latlon, [0, 0, 135, -45], 10e-10); ***** test - [lat, lon, radius] = gc2sc (0, 45, 90); - assert (lat, -90, 1e-5) - assert (lon, 0, 1e-5) - m = gc2sc (45, [0:45:360], 45); - assert (m(:, 1), repmat (-30.0, 9, 1), 1e-10); - assert (m(:, 2), [ 54.73561031725; 99.73561031725; 144.73561031725; ... - -170.26438968276; -125.26438968276; -80.26438968276; ... - -35.26438968276; 9.73561031725; 54.73561031725], 1e-10); - assert (m(:, 3), repmat (90.0, 9, 1), 1e-10); -***** error gc2sc ("s", 0, 100) -***** error gc2sc (3i, 0, 100) -***** error gc2sc (50, "s", 100) -***** error gc2sc (50, 0, 100, "f") -***** error gc2sc (50, 0, 100, "degreef") -***** error gc2sc (190, 0, 90); -***** error gc2sc (-91, 0, -90.001); -***** error gc2sc (pi/1.999, 0, pi/2, "r"); -10 tests, 10 passed, 0 known failure, 0 skipped + warning ("off", "Octave:coinciding-great-circles"); + [~, ~, idl] = gcxgc (45, [0:45:360], 45, -45, -135, -45); + warning ("on", "Octave:coinciding-great-circles"); + assert (idl, 2, 1e-10); +***** warning gcxgc (0, 0, 45, 0, 180, -45); +***** error gcxgc ("s", 0, 100, 10, 30, 0) +***** error gcxgc (3i, 0, 100, 10, 30, 0) +***** error gcxgc (50, "s", 100, 10, 30, 0) +***** error gcxgc (50, 2i, 10, 10, 30, 0) +***** error gcxgc (50, 0, "s", 10, 30, 0) +***** error gcxgc (50, 0, 100i, 10, 30, 0) +***** error gcxgc (50, 0, 100, "s", 30, 0) +***** error gcxgc (50, 0, 100, 10i, 30, 0) +***** error gcxgc (50, 0, 100, 10, "s", 0) +***** error gcxgc (50, 0, 100, 10, 30i, 0) +***** error gcxgc (50, 0, 100, 10, 30, "s") +***** error gcxgc (50, 0, 100, 10, 30, 2i) +***** error gcxgc (50, 0, 100, 10, 30, 0, "f") +***** error gcxgc (50, 0, 100, 10, 30, 0, "degreef") +***** error gcxgc (190, 0, 90, -90.000001, 180, 80); +***** error gcxgc (190, 0, -90.001, -90.000001, 180, 80); +***** error gcxgc (pi/1.999, 0, pi/2, pi/2.0001, 2, 2*pi/3, "r"); +***** error gcxgc ([50 0], 0, 0, 0, 0, [1 2 3]) +23 tests, 23 passed, 0 known failure, 0 skipped +[inst/km2rad.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/km2rad.m +***** test + ratio = pi/180; + assert (km2rad (10), ratio*km2deg (10), 10*eps); + assert (km2rad (10, 80), ratio*km2deg (10, 80), 10*eps); + assert (km2rad (10, "pluto"), ratio*km2deg (10, "pluto"), 10*eps); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/ned2geodetic.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2geodetic.m +***** test + [lat, lon, alt] = ned2geodetic (286.84, 186.28, -939.69, 42, -82, 200); + assert ([lat, lon, alt], [42.00258, -81.997752, 1139.69918], 10e-6); +***** test + [lat, lon, alt] = ned2geodetic (286.84, 186.28, -939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); + assert ([lat, lon, alt], [0.73308, -1.43113, 1139.69918], 10e-6); +***** test + [a, b, c] = ned2geodetic (-4556.3, -7134.8, -2852.4, 46.017, 7.750, 1673, 7030); + assert ([a, b, c], [45.976000, 7.657999, 4531.009608], 1e-6); +***** test + [a, b, c] = ned2geodetic (1334.3, -2543.6, 359.65, 44.532, -72.782, 1699); + assert ([a, b, c], [44.5440, -72.8140, 1339.9960], 1e-4); +***** error ned2geodetic("s", 25, 1e3, 0, 0, 0) +***** error ned2geodetic(3i, 25, 1e3, 0, 0, 0) +***** error ned2geodetic(33, "s", 1e3, 0, 0, 0) +***** error ned2geodetic(33, 3i, 1e3, 0, 0, 0) +***** error ned2geodetic(33, 25, "s", 0, 0, 0) +***** error ned2geodetic(33, 25, 3i, 0, 0, 0) +***** error ned2geodetic(33, 25, 1e3, "s", 0, 0) +***** error ned2geodetic(33, 25, 1e3, 3i, 0, 0) +***** error ned2geodetic(33, 25, 1e3, 0, "s", 0) +***** error ned2geodetic(33, 25, 1e3, 0, 3i, 0) +***** error ned2geodetic(33, 25, 1e3, 0, 0, "s") +***** error ned2geodetic(33, 25, 1e3, 0, 0, 3i) +***** error ned2geodetic ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error ned2geodetic ([1 1], [2 2], [33], 4, 5, 6) +***** error ned2geodetic ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** error ned2geodetic ([1 1], [2 2], [3 3], 4, [5 5], 6) +***** error ned2geodetic ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) +21 tests, 21 passed, 0 known failure, 0 skipped +[inst/geodetic2ecef.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodetic2ecef.m +***** test +***** shared h + latd = 57.02929569; + lond = 9.950248114; + h = 56.95; ## meters + [x, y, z]=geodetic2ecef("wgs84", latd, lond, h); + assert ([x, y, z], [3426949.397, 601195.852, 5327723.994], 10e-3); +***** test + lat = deg2rad (57.02929569); + lon = deg2rad (9.950248114); + [x2, y2, z2] = geodetic2ecef ("wgs84", lat, lon, h, "radians"); + assert ([x2, y2, z2], [3426949.397, 601195.852, 5327723.994], 10e-3); +***** error geodetic2ecef ("", 45, 45, 50, "km") +***** error geodetic2ecef ("", "A", 45, 50) +***** error geodetic2ecef ("", 45i, 45, 50) +***** error geodetic2ecef ("", 45, "B", 50) +***** error geodetic2ecef ("", 45, 45i, 50) +***** error geodetic2ecef ("", 45, 45, "C") +***** error geodetic2ecef ("", 45, 45, 50i) +9 tests, 9 passed, 0 known failure, 0 skipped +[inst/geodeticfwd.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticfwd.m +***** error geodeticfwd (1, 1, 1); +***** error geodeticfwd (1, 2, 'a', 4); +***** error geodeticfwd ({2}, 2, 'a', 4); +***** error geodeticfwd (1+2i, 2, 3, 4); +***** error geodeticfwd ([1 2], [2; 1], 0, 0); +***** error geodeticfwd (1, 2, 3, 4, 'b'); +***** error geodeticfwd (1, 2, 3, 4, 'm', 'b'); +***** error geodeticfwd (1, 2, 3, 4, 'd', 'wgs84', 'f'); +***** error geodeticfwd (1, 2, 3, 4, 'd', 'wgs84', {5}); +***** error geodeticfwd (1, 2, 3, 4, [1, 2, 3]); +***** error geodeticfwd (1, 2, 3, 4, struct ("a", "b")); +***** error geodeticfwd (pi/4, -pi/4, pi/2, 10, 'nm', 'r', struct ("a", [])); +***** test + [lato, lono, azo] = geodeticfwd (0, 0, pi, pi/4, 'a', 'Unit Sphere', 'r'); + assert (rad2deg ([lato lono azo]), [0, 180, 135], 1e-10); +***** test + [lato, lono, azo] = geodeticfwd (0, 0, pi/2, pi/4, 'angle', 'Unit Sphere', 'radians'); + assert (rad2deg ([lato lono azo]), [45, 90, 90], 1e-10); +***** test + [lato, lono, azo] = geodeticfwd (0, pi/4, pi/2, 3*pi/4, 'a', 'Unit Sphere', 'r'); + assert (rad2deg ([lato lono azo]), [ -45, 135, 90], 1e-10); +***** test + [lato, lono, azo] = geodeticfwd (45, -45, 180, 90, 'Unit Sphere', 'd'); + assert ([lato lono azo], [-45, 135, 90], 1e-10); +16 tests, 16 passed, 0 known failure, 0 skipped +[inst/geodeticLatitudeFromParametric.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticLatitudeFromParametric.m +***** test + earth_flattening = 0.0033528 ; + assert ( geodeticLatitudeFromParametric (45, earth_flattening), 45.0962122, 10e-6); + assert ( geodeticLatitudeFromParametric (pi/4, earth_flattening, 'radians'), 0.78708, 10e-6); +***** error geodeticLatitudeFromParametric (0.5, "flat") +***** error geodeticLatitudeFromParametric (0.5, 5i) +***** error geodeticLatitudeFromParametric ("beta", 0.0033528) +***** error geodeticLatitudeFromParametric (5i, 0.0033528 ) +***** error geodeticLatitudeFromParametric ([45 50], [0.7 0.8]) +***** error geodeticLatitudeFromParametric (45, 1) +***** error geodeticLatitudeFromParametric (45, 0.0033528, "km") +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/enu2uvw.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2uvw.m +***** test + [u, v, w] = enu2uvw (186.277521, 286.84222, 939.69262, 42, -82, "d"); + assert ([u, v, w], [254.940936348589, -475.5397947444, 841.942404132992], 10e-6) +***** test + [u, v, w] = enu2uvw (186.277521, 286.84222, 939.69262, ... + 0.733038285837618, -1.43116998663535, "r"); + assert ([u, v, w], [254.940936348589, -475.5397947444, 841.942404132992], 10e-6) +***** error enu2uvw("s", 25, 1e3, 0, 0) +***** error enu2uvw(3i, 25, 1e3, 0, 0) +***** error enu2uvw(33, "s", 1e3, 0, 0) +***** error enu2uvw(33, 3i, 1e3, 0, 0) +***** error enu2uvw(33, 25, "s", 0, 0) +***** error enu2uvw(33, 25, 3i, 0, 0) +***** error enu2uvw(33, 25, 1e3, "s", 0) +***** error enu2uvw(33, 25, 1e3, 3i, 0) +***** error enu2uvw(33, 25, 1e3, 0, "s") +***** error enu2uvw(33, 25, 1e3, 0, 3i) +***** error enu2uvw (33, 70, 1e3, 0, 0, "f"); +***** error enu2uvw (33, 70, 1e3, 0, 0, "degreef"); +14 tests, 14 passed, 0 known failure, 0 skipped [inst/fromRadians.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/fromRadians.m ***** test @@ -5363,28 +5213,40 @@ assert (nthargout (1:3, @fromRadians, "d", rad{:}), deg) ***** error fromRadians ("INVALID") 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/azimuth.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/azimuth.m -***** test - assert(azimuth([10,10], [10,40]), 87.336, 1e-3) - assert(azimuth([0,10], [0,40]), 90, 1e-3) - assert(azimuth(pi/4,0,pi/4,-pi/2,"radians"), 5.3279, 1e-4) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/reckon.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/reckon.m +[inst/isShapeMultipart.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/isShapeMultipart.m ***** test - [lato,lono] = reckon(30,-80,20,40); - assert(lato,44.16661401448592,1e-10) - assert(lono,-62.15251496909770,1e-10) + assert (isShapeMultipart ([0 1 0], [1 0 0]), 0); ***** test - [lato,lono] = reckon(-30,80,[5 10],[40 45]); - assert(lato,[-26.12155703039504 -22.70996703614572],1e-10) - assert(lono,[83.57732793979254 87.64920016442251],1e-10) + h = [0 0 1 NaN 2 2 NaN 3 3]; + k = [0 1 0 NaN 2 3 NaN 3 2]; + assert (isShapeMultipart (h, k), 3); +***** error isShapeMultipart ([0 0 1 NaN 2 2 NaN 3 3], ... + [0 1 0 NaN 2 3 NaN 3 2]') +***** error isShapeMultipart ([0 1 NaN 2 3 NaN 4], ... + [0 1 NaN 2 NaN 3 4]) +***** error isShapeMultipart ([0 0 1 NaN 2 2 NaN 3 3], ... + [0 1 0 NaN 2 3 NaN 3]) +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/aer2ned.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2ned.m ***** test - [lato,lono] = reckon([-30 31],[80 81],[5 10],[40 45]); - assert(lato,[-26.12155703039504 37.76782079033356],1e-10) - assert(lono,[83.57732793979254 89.93590456974810],1e-10) -3 tests, 3 passed, 0 known failure, 0 skipped + [n, e, d] = aer2ned (33, 70, 1e3); + assert ([n, e, d], [286.84222, 186.277521, -939.69262], 10e-6) + [e, n, u] = aer2ned (0.57595865, 1.221730476, 1e3, "rad"); + assert ([e, n, u], [286.84222, 186.277521, -939.69262], 10e-6) +***** error aer2ned("s", 25, 1e3) +***** error aer2ned(3i, 25, 1e3) +***** error aer2ned(33, "s", 1e3) +***** error aer2ned(33, 3i, 1e3) +***** error aer2ned(33, 25, "s") +***** error aer2ned(33, 25, 3i) +***** error aer2ned ([1 1], [2 2]', [4 5]) +***** error aer2ned ([1 1], [2 2], [4 5 6]) +***** error aer2ned (1, 2, 3, 4); +***** error aer2ned (33, 70, 1e3, "f"); +***** error aer2ned (33, 70, 1e3, "degreef"); +12 tests, 12 passed, 0 known failure, 0 skipped [inst/shapewrite.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/shapewrite.m ***** test @@ -5483,251 +5345,289 @@ unlink ([fname ".shp"]); unlink ([fname ".shx"]); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/geo2con.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2con.m +[inst/nm2sm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2sm.m ***** test - phi = [0:15:90]; - chi = geo2con (phi); - Z = degrees2dm(chi - phi); - check = [0; ... - -5.755543956550260; ... - -9.979077451140980; ... - -11.53895663467140; ... - -10.00703049899710; ... - -5.783497189944170; ... - 0]; - assert (Z(:,2), check, 1e-6) -***** error geo2con ("s") -***** error geo2con (5i) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/meridianfwd.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/meridianfwd.m + nm = [50292 50.292 100.584 25.146 10058.4 12.573]; + sm = [57875 57.875 115.75 28.9375 11575 14.46875]; + assert (nm2sm (nm), sm) + sm = reshape (sm, [2 1 3]); + nm = reshape (nm, [2 1 3]); + assert (nm2sm (nm), sm) +***** assert (nm2sm (50292), 57875) +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/str2angle.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/str2angle.m ***** test - a = rad2deg (meridianfwd (-pi/4, [60 120] * 45 * 1846.2756967249574, 'wgs84')); - assert (a, [0, 45], 5e-7); +***** shared tst, res + tst = '191E21''3.1"\n12e 22''33.24"\n13E 23'' 33.344"\n14w24'' 33.4444"\n'; + tst = [tst '15S25''33.54444"\n16W26''33.644444''''\n17s27''33.7444444"\n']; + tst = [tst '18N28''33.84444444"\n19d29m33.944444444s\n20D20M33.04444444Se\n']; + tst = [tst '21°51''4.1"\n22°52''44.25"\n23° 53''33.34"\n24°54'' 33.44"N\n']; + tst = [tst '25° 55'' 33.544"\n26°56''33.644''''S\n27°57'' 33.744''''\n']; + tst = [tst '28°58''33.844"w']; + tst = strrep (tst, '\n', char(10)); + res = [191.351, 12.376, 13.393, -14.409, -15.426, -16.443, -17.459, 18.476, ... + 19.493, 20.343, 21.851, 22.879, 23.893, 24.909, 25.926, 26.943, ... + 27.959, -28.976]; + assert (str2angle (tst), res, 1e-3); +***** test + tstc = strsplit (tst, "\n"); + assert (str2angle (tstc), res, 1e-3); +***** test + tstc = strjoin (strsplit (tst, "\n"), " "); + assert (str2angle (tstc), res, 1e-3); +***** test + assert (str2angle ('24E77''33" 25W43''57.7"'), [NaN, -25.7333], 1e-3); +***** test + assert (str2angle ('; aggag'), Inf); +***** warning str2angle ('24E77''33"', 1); +***** warning str2angle (' -4D-32''-44.57"', 1); +***** error str2angle (25); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/geocentricLatitude.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geocentricLatitude.m +***** test + earth_flattening = 0.0033528; + assert (geocentricLatitude (45, earth_flattening), 44.8075766, 10e-6); + assert (geocentricLatitude (pi/4, earth_flattening, 'radians'), 0.78204, 10e-6); +***** error geocentricLatitude (0.5, "flat") +***** error geocentricLatitude (0.5, 5i) +***** error geocentricLatitude ("phi", 0.0033528) +***** error geocentricLatitude (5i, 0.0033528 ) +***** error geocentricLatitude ([45 50], [0.7 0.8]) +***** error geocentricLatitude (45, 1) +***** error geocentricLatitude (45, 0.0033528, "km") +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/nm2deg.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2deg.m +***** test + ratio = unitsratio ('km','nm'); + assert (nm2deg (10), km2deg (ratio*10), 10*eps); + assert (nm2deg (10, 80), km2deg (ratio*10, ratio*80), 10*eps); + assert (nm2deg (10, "pluto"), km2deg (ratio*10, "pluto"), 10*eps); 1 test, 1 passed, 0 known failure, 0 skipped -[inst/extractfield.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/extractfield.m +[inst/geo2rect.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2rect.m ***** test - a = {1:3, 4:6, [7:9]', 10:11, uint8(12:13), "text"}; - s(1).a = a{1}; - s(2).a = a{2}; - assert (extractfield (s, "a"), 1:6); - s(3).a = a{3}; - assert (extractfield (s, "a"), 1:9); - s(4).a = a{4}; - assert (extractfield (s, "a"), 1:11); - s(5).a = a{5}; - assert (extractfield (s, "a"), a(1:5)); - s(6).a = a{6}; - assert (extractfield (s, "a"), a); + mu = geo2rect (45); + Z = degrees2dm(mu - 45); + assert (Z(:,2), -8.65908066558504, 1e-6); +***** error geo2rect ("s") +***** error geo2rect (5i) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/nm2km.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/nm2km.m ***** test - s(1).a = [4 5]; - s(2).a = [6i 7i 8]; - assert (extractfield (s, "a"), [4 5 6i 7i 8]); + km = [10 13.000002880000002 14.9999962 17.000008 19 31.000072400000004]; + nm = [5.399568034557235 7.01944 8.09935 9.179269978401727 10.259179265658746 16.7387]; + assert (nm2km (nm), km) + km = reshape (km, [3 2 1]); + nm = reshape (nm, [3 2 1]); + assert (nm2km (nm), km) +***** assert (nm2km (8.09935), 14.9999962) +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/ecef2nedv.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2nedv.m ***** test - s(1).a = 0; - s(2).a = false; - assert (extractfield (s, "a"), {0, false}); + [n, e, d] = ecef2nedv (186.277521, 286.84222, 939.69262, 42, -82, "d"); + assert ([n, e, d], [871.0476287, 224.3854022, -436.9521873], 10e-6); ***** test - s = struct ("a", mat2cell (1:10, 1, [3 3 4]), - "b", mat2cell (11:20, 1, [5 2 3])); - assert (extractfield (s, "a"), 1:10); - assert (extractfield (s, "b"), 11:20); -***** error extractfield (5, "name") -***** error extractfield (struct ("name", 5), "not a name") -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/ecc2n.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecc2n.m + [n, e, d] = ecef2nedv (186.277521, 286.84222, 939.69262, ... + 0.733038285837618, -1.43116998663535, "r"); + assert ([n, e, d], [871.0476287, 224.3854022, -436.9521873], 10e-6); +***** test ## Multidimensionality + [n, e, d] = ecef2nedv ([186.277521; 200], [286.84222; 300], [939.69262; 1000], 42, -82); + assert ([n, e, d], [871.047629, 224.385402, -436.952187; ... + 923.305431, 239.805544, -469.041983], 1e-6); +***** test + [nv, ev, dv] = ecef2nedv (530.2445, 492.1283, 396.3459, 61.64, 30.70); + assert ([nv, ev, dv], [-434.0403, 152.4451, -684.69634], 1e-4); +***** error ecef2nedv("s", 25, 1e3, 0, 0) +***** error ecef2nedv(3i, 25, 1e3, 0, 0) +***** error ecef2nedv(33, "s", 1e3, 0, 0) +***** error ecef2nedv(33, 3i, 1e3, 0, 0) +***** error ecef2nedv(33, 25, "s", 0, 0) +***** error ecef2nedv(33, 25, 3i, 0, 0) +***** error ecef2nedv(33, 25, 1e3, "s", 0) +***** error ecef2nedv(33, 25, 1e3, 3i, 0) +***** error ecef2nedv(33, 25, 1e3, 0, "s") +***** error ecef2nedv(33, 25, 1e3, 0, 3i) +***** error ecef2nedv (33, 70, 1e3, 0, 0, "f"); +***** error ecef2nedv (33, 70, 1e3, 0, 0, "degreef") +***** error [u, v, w] = ecef2nedv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) +***** error [u, v, w] = ecef2nedv ([1, 2, 3], [4, 5, 6], [7, 8, 9], [40; 50], [-40; -50]) +***** error [u, v, w] = ecef2nedv ([1, 2, 3], [4, 5, 6], [7, 8, 9], 50, [-45; 50]) +19 tests, 19 passed, 0 known failure, 0 skipped +[inst/minaxis.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/minaxis.m ***** test - ecc_earth = .081819221456; - ecc_jupiter = 0.3543164; - e_vec = [ ecc_earth ecc_jupiter ]; - assert ( ecc2n ( ecc_earth ) , 0.001679222 , 10e-10 ); - assert ( ecc2n ( e_vec ), [0.0016792 0.03352464],10e-8); -***** error ecc2n ("ecc") -***** error ecc2n (0.5 + 3i) -***** error n2ecc (-1) -***** error n2ecc (2) -***** error n2ecc (-Inf) -***** error n2ecc (Inf) + earth_a = 6378137; + earth_ecc = 0.081819221456; + assert ( minaxis (earth_a, earth_ecc), 6356752.2982157, 10e-8 ) + planets_a = [ 6378137 ; 66854000 ]; + planets_ecc = [ 0.081819221456 ; 0.3543164 ]; + assert ( minaxis (planets_a, planets_ecc), [ 6356752.29821572 ; 62516886.8951319 ], 10e-8 ) +***** error minaxis (0.5, "ecc") +***** error minaxis (0.5, 0.3 + 0.5i) +***** error minaxis ("a", 0.5) +***** error minaxis (0.3 + 0.5i , 0.5) +***** error minaxis ( [ 6378137 ; 66854000 ], [ 0.081819221456 ; 0.3543164 ]') +***** error minaxis ([10; 10; 10], [0.5; 0; -0.5]) 7 tests, 7 passed, 0 known failure, 0 skipped -[inst/geo2auth.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2auth.m +[inst/geo2iso.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geo2iso.m ***** test - phi = [0:15:90]; - xi = geo2auth (phi); - Z = degrees2dm(xi - phi); - check = [0; ... - -3.84258303680237; ... - -6.66017793242659; ... - -7.69782759396364; ... - -6.67286580689009; ... - -3.85527095139878; ... - 0]; - assert (Z(:,2), check, 1e-6) -***** error geo2auth ("s") -***** error geo2auth (5i) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/roundn.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/roundn.m -***** assert (roundn (pi), 3, 2e-15) -***** assert (roundn (e, -2), 2.7200, 2e-15) -***** assert (roundn (pi, -4), 3.1416, 2e-15) -***** assert (roundn (e, -3), 2.718, 2e-15) -***** assert (roundn ([0.197608841252122, 0.384415323084123; ... - 0.213847642260694, 0.464622347858917], -2), ... - [0.20, 0.38; 0.21, 0.46], 2e-15) -***** assert (roundn (401189, 3), 401000, 2e-15) -***** assert (roundn (5), 5, 2e-15) -***** assert (roundn (-5), -5, 2e-15) + psi = geo2iso (45); + assert (psi, 50.227465817, 1e-6) +***** test + psi = geo2iso ([-90 90]); + assert (psi, [-Inf Inf]) +***** test + chi = geo2iso (iso2geo ([-90 : 10: 0; 0 : 10 : 90]), "wgs84"); + assert (chi, [-90 : 10: 0; 0 : 10 : 90], 1e-6); +***** error geo2iso ("s") +***** error geo2iso (5i) +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/geodeticLatitudeFromGeocentric.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodeticLatitudeFromGeocentric.m +***** test + earth_flattening = 0.0033528; + assert (geodeticLatitudeFromGeocentric (45, earth_flattening), 45.1924226, 10e-6); + assert (geodeticLatitudeFromGeocentric (pi/4, earth_flattening, 'radians'), 0.78876, 10e-6); +***** error geodeticLatitudeFromGeocentric (0.5, "flat") +***** error geodeticLatitudeFromGeocentric (0.5, 5i ) +***** error geodeticLatitudeFromGeocentric ("psi", 0.0033528) +***** error geodeticLatitudeFromGeocentric (5i, 0.0033528 ) +***** error geodeticLatitudeFromGeocentric ([45 50], [0.7 0.8]) +***** error geodeticLatitudeFromGeocentric (45, 1) +***** error geodeticLatitudeFromGeocentric (45, 0.0033528 ,"km") 8 tests, 8 passed, 0 known failure, 0 skipped -[inst/enu2uvw.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2uvw.m +[inst/ecef2enuv.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2enuv.m ***** test - [u, v, w] = enu2uvw (186.277521, 286.84222, 939.69262, 42, -82, "d"); - assert ([u, v, w], [254.940936348589, -475.5397947444, 841.942404132992], 10e-6) + [e, n, u] = ecef2enuv (186.277521, 286.84222, 939.69262, 42, -82, "d"); + assert ([e, n, u], [224.3854022, 871.0476287, 436.9521873], 10e-6); ***** test - [u, v, w] = enu2uvw (186.277521, 286.84222, 939.69262, ... + [e, n, u] = ecef2enuv (186.277521, 286.84222, 939.69262, ... 0.733038285837618, -1.43116998663535, "r"); - assert ([u, v, w], [254.940936348589, -475.5397947444, 841.942404132992], 10e-6) -***** error enu2uvw("s", 25, 1e3, 0, 0) -***** error enu2uvw(3i, 25, 1e3, 0, 0) -***** error enu2uvw(33, "s", 1e3, 0, 0) -***** error enu2uvw(33, 3i, 1e3, 0, 0) -***** error enu2uvw(33, 25, "s", 0, 0) -***** error enu2uvw(33, 25, 3i, 0, 0) -***** error enu2uvw(33, 25, 1e3, "s", 0) -***** error enu2uvw(33, 25, 1e3, 3i, 0) -***** error enu2uvw(33, 25, 1e3, 0, "s") -***** error enu2uvw(33, 25, 1e3, 0, 3i) -***** error enu2uvw (33, 70, 1e3, 0, 0, "f"); -***** error enu2uvw (33, 70, 1e3, 0, 0, "degreef"); -14 tests, 14 passed, 0 known failure, 0 skipped -[inst/rad2km.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rad2km.m -***** test -***** assert (km2rad (rad2km (10)), 10, 10*eps); -***** assert (km2rad (rad2km (10, 80), 80), 10, 10*eps); -***** assert (km2rad (rad2km (10, "pluto"), "pluto"), 10, 10*eps); -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/egm96geoid.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/egm96geoid.m -***** test ## Check for heights of some global extreme regions - assert (egm96geoid ([20, 50, 60, 10, -5], [-120, -50, -20, 75, 140]), ... - [-47.576, 24.159,60.658, -97.286, 75.784], 1e-2); -***** error egm96geoid ("a", 1) -***** error egm96geoid (2.5i, 1) -***** error egm96geoid (-1) -***** error egm96geoid (1, [3 4]) -***** error egm96geoid (1, 1, 2) -6 tests, 6 passed, 0 known failure, 0 skipped -[inst/aer2enu.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2enu.m + assert ([e, n, u], [224.3854022, 871.0476287, 436.9521873], 10e-6); +***** test ## Multidimensionality + [e, n, u] = ecef2enuv ([186.277521; 200], [286.84222; 300], [939.69262; 1000], 42, -82); + assert ([e, n, u], [224.385402, 871.047629, 436.952187; ... + 239.805544, 923.305431, 469.041983], 1e6); +***** error ecef2enuv("s", 25, 1e3, 0, 0) +***** error ecef2enuv(3i, 25, 1e3, 0, 0) +***** error ecef2enuv(33, "s", 1e3, 0, 0) +***** error ecef2enuv(33, 3i, 1e3, 0, 0) +***** error ecef2enuv(33, 25, "s", 0, 0) +***** error ecef2enuv(33, 25, 3i, 0, 0) +***** error ecef2enuv(33, 25, 1e3, "s", 0) +***** error ecef2enuv(33, 25, 1e3, 3i, 0) +***** error ecef2enuv(33, 25, 1e3, 0, "s") +***** error ecef2enuv(33, 25, 1e3, 0, 3i) +***** error ecef2enuv (33, 70, 1e3, 0, 0, "f"); +***** error ecef2enuv (33, 70, 1e3, 0, 0, "degreef") +***** error [e, n, u] = ecef2enuv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) +***** error [e, n, u] = ecef2enuv ([1, 2, 3], [4, 5, 6], [7, 8, 9], [40; 50], [-40; -50]) +***** error [e, n, u] = ecef2enuv ([1, 2, 3], [4, 5, 6], [7, 8, 9], 50, [-45; 50]) +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/earthRadius.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/earthRadius.m ***** test - [e, n, u] = aer2enu (33, 70, 1e3); - assert ([e, n, u], [186.277521, 286.84222, 939.69262], 10e-6) - [e, n, u] = aer2enu (0.57595865, 1.221730476, 1e3, "rad"); - assert ([e, n, u], [186.277521, 286.84222, 939.69262], 10e-6) -***** error aer2enu("s", 25, 1e3) -***** error aer2enu(3i, 25, 1e3) -***** error aer2enu(33, "s", 1e3) -***** error aer2enu(33, 3i, 1e3) -***** error aer2enu(33, 25, "s") -***** error aer2enu(33, 25, 3i) -***** error aer2enu ([1 1], [2 2]', [4 5]) -***** error aer2enu ([1 1], [2 2], [4 5 6]) -***** error aer2enu (1, 2, 3, 4); -***** error aer2enu (1, 2) -***** error aer2enu (33, 70, 1e3, "f"); -***** error aer2enu (33, 70, 1e3, "degreef"); -13 tests, 13 passed, 0 known failure, 0 skipped -[inst/ned2ecef.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ned2ecef.m + radius = earthRadius / 1000;; + assert (earthRadius ("km"), radius); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/meridianarc.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/meridianarc.m ***** test - [x, y, z] = ned2ecef (286.84, 186.28, -939.69, 42, -82, 200); - assert ([x, y, z], [6.6093019515e5, -4.70142422216e6, 4.24657960122e6], 10e-6) + s = meridianarc (0, 56, "int24", "degrees"); + assert (s, 6208700.08662672, 1e-6) ***** test - [x3, y3, z3] = ned2ecef (286.84, 186.28, -939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); - assert ([x3, y3, z3], [660.93019e3, -4701.42422e3, 4246.5796e3],10e-3) + s = meridianarc ([-1/120; 45-1/120; 89+119/120], [1/120; 45+1/120; 90], ... + "int24", "degrees"); + assert (s, [1842.92463205; 1852.25585828; 1861.66609497/2], 1e-6); +***** error meridianarc (-2, 2) +***** error meridianarc (-91, 91, "", "d") +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/dms2degrees.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/dms2degrees.m ***** test - [a, b, c] = ned2ecef (-923083.2, 355601.3, -1041016.4, 45.9132, 36.7484, 1877753.2); - assert ([a, b, c], [5507528.8891, 4556224.1399, 6012820.7522], 1e-4) + hs = 0.5/60; + deg = [ 10 10.5 -10.5 -10 -0.5 0.5 hs 0 -1/60 ]' + hs; + dms = [ 10 0 30 + 10 30 30 + -10 29 30 + -9 59 30 + 0 -29 30 + 0 30 30 + 0 1 0 + 0 0 30 + 0 0 -30]; + for i = 1:rows (dms) + assert (dms2degrees (dms(i,:)), deg(i), 2*10^-15); + endfor + assert (dms2degrees (dms), deg, eps*10); + assert (dms2degrees (single (dms)), single (deg), 3*10^-8); +***** error dms2degrees ([5 40 60]) +***** error dms2degrees ([5 40 61]) +***** error <3 columns> dms2degrees ([5 50]) +***** error dms2degrees ([5 -40 9]) +***** error dms2degrees ([-5 -40 9]) +***** error dms2degrees ([0 -40 -9]) +***** error <3 columns> dms2degrees (rand (7, 3, 3)) +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/rcurve.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rcurve.m ***** test - [x,y,z] = ned2ecef( 1334.3, -2544.4, 360.0, 44.532, -72.782, 1699); - assert ([x, y, z], [1345659.962, -4350890.986, 4452313.969], 1e-3); -***** error ned2ecef("s", 25, 1e3, 0, 0, 0) -***** error ned2ecef(3i, 25, 1e3, 0, 0, 0) -***** error ned2ecef(33, "s", 1e3, 0, 0, 0) -***** error ned2ecef(33, 3i, 1e3, 0, 0, 0) -***** error ned2ecef(33, 25, "s", 0, 0, 0) -***** error ned2ecef(33, 25, 3i, 0, 0, 0) -***** error ned2ecef(33, 25, 1e3, "s", 0, 0) -***** error ned2ecef(33, 25, 1e3, 3i, 0, 0) -***** error ned2ecef(33, 25, 1e3, 0, "s", 0) -***** error ned2ecef(33, 25, 1e3, 0, 3i, 0) -***** error ned2ecef(33, 25, 1e3, 0, 0, "s") -***** error ned2ecef(33, 25, 1e3, 0, 0, 3i) -***** error ned2ecef ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error ned2ecef ([1 1], [2 2], [33], 4, 5, 6) -***** error ned2ecef ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** error ned2ecef ([1 1], [2 2], [3 3], 4, [5 5], 6) -***** error ned2ecef ([1 1], [2 2], [3 3], 4, 5, [6 6]) -21 tests, 21 passed, 0 known failure, 0 skipped -[inst/areaquad.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/areaquad.m + assert (rcurve ("", 45), 4517590.87885, 10e-6) ***** test - aq = areaquad (-90, 0, 90, 360); - assert (aq, 1, 1e-8); + assert (rcurve ("", [45; 20]), [4517590.87885; 5995836.38390], 10e-6) ***** test - aq = areaquad (-pi / 2, 0, pi / 2, 2 * pi,"r"); - assert (aq, 1, 1e-8); + assert (rcurve ("", [45, 20]), [4517590.87885, 5995836.38390], 10e-6) ***** test - aq = areaquad (0, 0, 90, 360, "wgs84"); - assert (aq, 2.5503281086204421875e+14, 1e-8); + assert (rcurve ("", [60 45; 35 20]), [3197104.58692, 4517590.87885; 5230426.84020, 5995836.38390], 10e-6) ***** test - aq = areaquad(-90,0,90,360,[0 6000]); - assert (aq, 4 * pi * 6000 ^ 2, 1e-8) + assert (rcurve ("", "", 45), 4517590.87885, 10e-6) ***** test - aq = areaquad(-90,0,90,360,[6000 0]); - assert (aq, 4 * pi * 6000 ^ 2, 1e-8) + assert (rcurve ("transverse", "", 45), 6388838.29012, 10e-6) ***** test - aq = areaquad(-90,0,90,360,[1 0]); - assert (aq, 4 * pi, 1e-8) + assert (rcurve ("meridian", "", 45), 6367381.81562, 10e-6) +***** error rcurve ("","", 45, "km") +***** error rcurve ("", "", "A") +***** error rcurve ("", "", 45i) +***** error rcurve ('All', "", 45) +11 tests, 11 passed, 0 known failure, 0 skipped +[inst/enu2geodetic.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2geodetic.m ***** test - aq = areaquad(-90,0,90,360,[0 1]); - assert (aq, 4 * pi, 1e-8) + [lat, lon, alt] = enu2geodetic (186.28, 286.84, 939.69, 42, -82, 200); + assert ([lat, lon, alt], [42.00258, -81.997752, 1139.69918], 10e-6); ***** test - assert (areaquad ([-60 -45; -30 0], 0, 45, 180), ... - [0.393283046242, 0.353553390593; ... - 0.301776695296, 0.176776695296], 1e-11); -***** error areaquad ("s", 0, 90, 360) -***** error areaquad (5i, 0, 90, 360) -***** error areaquad (0, "s", 90, 360) -***** error areaquad (0, 5i, 90, 360) -***** error areaquad (0, 0, "s", 360) -***** error areaquad (0, 0, 5i, 360) -***** error areaquad (0, 0, 90, "s") -***** error areaquad (0, 0, 90, 5i) -***** error areaquad (-90, 0, 90, 360, [2.9 6000]) -***** error areaquad (-90, 0, 90, 360, [2.9]) -***** error areaquad (-90, 0, 90, 360, [2.9 6000 70]) -***** error areaquad (-91, 0, 90, 360); -***** error areaquad (-90, 0, 91, 360); -***** error areaquad ([1 2], 3, [4; 5], 6); -22 tests, 22 passed, 0 known failure, 0 skipped -[inst/km2sm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/km2sm.m + [lat, lon, alt] = enu2geodetic (186.28, 286.84, 939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); + assert ([lat, lon, alt], [0.73308, -1.43113, 1139.69918], 10e-6); ***** test - km = [2 3.218694437388875 4.8326 6.437388874777749]; - sm = [1.242739898989899 2 3.002832417929293 4]; - assert (km2sm (km), sm) - km = reshape (km, [2 2]); - sm = reshape (sm, [2 2]); - assert (km2sm (km), sm) -***** assert (km2sm (4.8326), 3.002832417929293) -2 tests, 2 passed, 0 known failure, 0 skipped + [a, b, c] = enu2geodetic (-7134.8, -4556.3, 2852.4, 46.017, 7.750, 1673, 7030); + assert ([a, b, c], [45.976000, 7.657999, 4531.009608], 1e-6); +***** error enu2geodetic("s", 25, 1e3, 0, 0, 0) +***** error enu2geodetic(3i, 25, 1e3, 0, 0, 0) +***** error enu2geodetic(33, "s", 1e3, 0, 0, 0) +***** error enu2geodetic(33, 3i, 1e3, 0, 0, 0) +***** error enu2geodetic(33, 25, "s", 0, 0, 0) +***** error enu2geodetic(33, 25, 3i, 0, 0, 0) +***** error enu2geodetic(33, 25, 1e3, "s", 0, 0) +***** error enu2geodetic(33, 25, 1e3, 3i, 0, 0) +***** error enu2geodetic(33, 25, 1e3, 0, "s", 0) +***** error enu2geodetic(33, 25, 1e3, 0, 3i, 0) +***** error enu2geodetic(33, 25, 1e3, 0, 0, "s") +***** error enu2geodetic(33, 25, 1e3, 0, 0, 3i) +***** error enu2geodetic ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error enu2geodetic ([1 1], [2 2], [33], 4, 5, 6) +***** error enu2geodetic ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** error enu2geodetic ([1 1], [2 2], [3 3], 4, [5 5], 6) +***** error enu2geodetic ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) +20 tests, 20 passed, 0 known failure, 0 skipped [inst/n2ecc.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/n2ecc.m ***** test @@ -5744,200 +5644,189 @@ ***** error n2ecc (-Inf) ***** error n2ecc (Inf) 7 tests, 7 passed, 0 known failure, 0 skipped -[inst/wrapTo2Pi.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapTo2Pi.m +[inst/aer2ecef.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/aer2ecef.m ***** test - x = -9:0.1:9; - xw = wrapTo2Pi (x); - assert (sin (x), sin (xw), 8 * eps) - assert (cos (x), cos (xw), 8 * eps) - assert (! any (xw < 0)) - assert (! any (xw > 2 * pi)) +***** error aer2ecef("s", 25, 1e3, 0, 0, 0) +***** error aer2ecef(3i, 25, 1e3, 0, 0, 0) +***** error aer2ecef(33, "s", 1e3, 0, 0, 0) +***** error aer2ecef(33, 3i, 1e3, 0, 0, 0) +***** error aer2ecef(33, 25, "s", 0, 0, 0) +***** error aer2ecef(33, 25, 3i, 0, 0, 0) +***** error aer2ecef(33, 25, 1e3, "s", 0, 0) +***** error aer2ecef(33, 25, 1e3, 3i, 0, 0) +***** error aer2ecef(33, 25, 1e3, 0, "s", 0) +***** error aer2ecef(33, 25, 1e3, 0, 3i, 0) +***** error aer2ecef(33, 25, 1e3, 0, 0, "s") +***** error aer2ecef(33, 25, 1e3, 0, 0, 3i) +***** error aer2ecef ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error aer2ecef ([1 1], [2 2], [33], 4, 5, 6) +***** error aer2ecef ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** error aer2ecef ([1 1], [2 2], [3 3], 4, [5 5], 6) +***** error aer2ecef ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) +18 tests, 18 passed, 0 known failure, 0 skipped +[inst/sm2nm.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/sm2nm.m ***** test - assert (wrapTo2Pi ([-2*pi, -pi, 0, pi; 0.1, pi, 4*pi, 5*pi]), ... - [0, pi, 0, pi; 0.1, pi, 2*pi, pi], 1e-13); + nm = [50.292 100.584 25.146 10058.4]; + sm = [57.875 115.75 28.9375 11575]; + assert (sm2nm (sm), nm) + sm = reshape (sm, [2 2 1]); + nm = reshape (nm, [2 2 1]); + assert (sm2nm (sm), nm) +***** assert (sm2nm (28.9375), 25.146) 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/str2angle.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/str2angle.m -***** test -***** shared tst, res - tst = '191E21''3.1"\n12e 22''33.24"\n13E 23'' 33.344"\n14w24'' 33.4444"\n'; - tst = [tst '15S25''33.54444"\n16W26''33.644444''''\n17s27''33.7444444"\n']; - tst = [tst '18N28''33.84444444"\n19d29m33.944444444s\n20D20M33.04444444Se\n']; - tst = [tst '21°51''4.1"\n22°52''44.25"\n23° 53''33.34"\n24°54'' 33.44"N\n']; - tst = [tst '25° 55'' 33.544"\n26°56''33.644''''S\n27°57'' 33.744''''\n']; - tst = [tst '28°58''33.844"w']; - tst = strrep (tst, '\n', char(10)); - res = [191.351, 12.376, 13.393, -14.409, -15.426, -16.443, -17.459, 18.476, ... - 19.493, 20.343, 21.851, 22.879, 23.893, 24.909, 25.926, 26.943, ... - 27.959, -28.976]; - assert (str2angle (tst), res, 1e-3); -***** test - tstc = strsplit (tst, "\n"); - assert (str2angle (tstc), res, 1e-3); -***** test - tstc = strjoin (strsplit (tst, "\n"), " "); - assert (str2angle (tstc), res, 1e-3); -***** test - assert (str2angle ('24E77''33" 25W43''57.7"'), [NaN, -25.7333], 1e-3); -***** test - assert (str2angle ('; aggag'), Inf); -***** warning str2angle ('24E77''33"', 1); -***** warning str2angle (' -4D-32''-44.57"', 1); -***** error str2angle (25); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/rad2sm.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/rad2sm.m -***** test -***** assert (sm2rad (rad2sm (10)), 10, 10*eps); -***** assert (sm2rad (rad2sm (10, 80), 80), 10, 10*eps); -***** assert (sm2rad (rad2sm (10, "pluto"), "pluto"), 10, 10*eps); -***** error rad2sm (5, 5i) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/isShapeMultipart.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/isShapeMultipart.m +[inst/almanac.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/almanac.m ***** test - assert (isShapeMultipart ([0 1 0], [1 0 0]), 0); + assert (strcmpi (almanac (){1}, "Sun"), true); + assert (strcmpi (almanac (){12}, "Unit Sphere"), true); ***** test - h = [0 0 1 NaN 2 2 NaN 3 3]; - k = [0 1 0 NaN 2 3 NaN 3 2]; - assert (isShapeMultipart (h, k), 3); -***** error isShapeMultipart ([0 0 1 NaN 2 2 NaN 3 3], ... - [0 1 0 NaN 2 3 NaN 3 2]') -***** error isShapeMultipart ([0 1 NaN 2 3 NaN 4], ... - [0 1 NaN 2 NaN 3 4]) -***** error isShapeMultipart ([0 0 1 NaN 2 2 NaN 3 3], ... - [0 1 0 NaN 2 3 NaN 3]) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/geodetic2enu.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodetic2enu.m + assert (almanac ("sun", "radius", "sm"), 432285.77700111, 1e-6); ***** test - lat = 42.002582; lon = -81.997752; alt = 1139.7; - lat0 = 42; lon0 = -82; alt0 = 200; - [e, n, u] = geodetic2enu(lat, lon, alt, lat0, lon0, alt0); - assert([e, n, u], [186.28, 286.84, 939.69], 10e-3); + assert (almanac ("earth", "everest", "nm"), [3443.456768421318, 0.0814729809], 1e-9); ***** test - Rad=deg2rad([42.002582, -81.997752, 42, -82]); - alt = 1139.7; alt0 = 200; - [e, n, u] = geodetic2enu(Rad(1), Rad(2), alt, Rad(3), Rad(4), alt0, "rad"); - assert([e, n, u], [186.28, 286.84, 939.69], 10e-3); + assert (almanac ("jupiter", "ellipsoid", "km"), [71492.0 0.3543164], 1e-7); +***** error almanac ("UFO") +***** error almanac ("Moon", 12) +***** error almanac ("Mars", "flattening") +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/extractfield.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/extractfield.m ***** test - [a, b, c] = enu2geodetic (-7134.8, -4556.3, 2852.4, 46.017, 7.750, 1673, 'wgs84'); - [d, e, f] = geodetic2enu (a, b, c, 46.017, 7.750, 1673); - assert ([d, e, f], [ -7134.8, -4556.3, 2852.4], 1e-6); -***** error geodetic2enu (45, 45, 100, 50, 50, 200, "", "km") -***** error geodetic2enu ("A", 45, 100, 50, 50, 200) -***** error geodetic2enu (45i, 45, 100, 50, 50, 200) -***** error geodetic2enu (45, "A", 100, 50, 50, 200) -***** error geodetic2enu (45, 45i, 100, 50, 50, 200) -***** error geodetic2enu (45, 45, "A", 50, 50, 200) -***** error geodetic2enu (45, 45, 100i, 50, 50, 200) -***** error geodetic2enu (45, 45, 100, "A", 50, 200) -***** error geodetic2enu (45, 45, 100, 50i, 50, 200) -***** error geodetic2enu (45, 45, 100, 50, "A", 200) -***** error geodetic2enu (45, 45, 100, 50, 50i, 200) -***** error geodetic2enu (45, 45, 100, 50, 50, "A") -***** error geodetic2enu (45, 45, 100, 50, 50, 200i) -16 tests, 16 passed, 0 known failure, 0 skipped -[inst/ecef2geodetic.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2geodetic.m -***** shared X, Y, Z - X = 3426949.397; - Y = 601195.852; - Z = 5327723.994; ## meters + a = {1:3, 4:6, [7:9]', 10:11, uint8(12:13), "text"}; + s(1).a = a{1}; + s(2).a = a{2}; + assert (extractfield (s, "a"), 1:6); + s(3).a = a{3}; + assert (extractfield (s, "a"), 1:9); + s(4).a = a{4}; + assert (extractfield (s, "a"), 1:11); + s(5).a = a{5}; + assert (extractfield (s, "a"), a(1:5)); + s(6).a = a{6}; + assert (extractfield (s, "a"), a); ***** test - [latd, lond, h] = ecef2geodetic ("wgs84", X, Y, Z); - assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); + s(1).a = [4 5]; + s(2).a = [6i 7i 8]; + assert (extractfield (s, "a"), [4 5 6i 7i 8]); ***** test - [latd, lond, h] = ecef2geodetic (X, Y, Z); - assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); + s(1).a = 0; + s(2).a = false; + assert (extractfield (s, "a"), {0, false}); ***** test - latr = deg2rad (57.02929569); - lonr = deg2rad (9.950248114); - [lat, lon, h2] = ecef2geodetic ("wgs84", X, Y, Z, "radians"); - assert ([lat, lon, h2], [latr, lonr, 56.95], 10e-3); + s = struct ("a", mat2cell (1:10, 1, [3 3 4]), + "b", mat2cell (11:20, 1, [5 2 3])); + assert (extractfield (s, "a"), 1:10); + assert (extractfield (s, "b"), 11:20); +***** error extractfield (5, "name") +***** error extractfield (struct ("name", 5), "not a name") +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/degrees2dms.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/degrees2dms.m ***** test - latr = deg2rad (57.02929569); - lonr = deg2rad (9.950248114); - [lat, lon, h2] = ecef2geodetic (X, Y, Z, "radians"); - assert ([lat, lon, h2], [latr, lonr, 56.95], 10e-3); -***** error ecef2geodetic ("", 4500000, 450000, 50000000, "km") -***** error ecef2geodetic ("", "A", 450000, 50000000) -***** error ecef2geodetic ("", 45i, 450000, 50000000) -***** error ecef2geodetic ("", 4500000, "B", 50000000) -***** error ecef2geodetic ("", 4500000, 45i, 50000000) -***** error ecef2geodetic ("", 4500000, 450000, "C") -***** error ecef2geodetic (4500000, 450000, "C") -***** error ecef2geodetic ("", 4500000, 450000, 50i) -***** error ecef2geodetic (4500000, 450000, 50i) -13 tests, 13 passed, 0 known failure, 0 skipped -[inst/closePolygonParts.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/closePolygonParts.m + hs = 0.5/60; + deg = [ 10 10.5 -10.5 -10 -0.5 0.5 hs 0 -1/60 ]' + hs; + dms = [ 10 0 30 + 10 30 30 + -10 29 30 + -9 59 30 + 0 -29 30 + 0 30 30 + 0 1 0 + 0 0 30 + 0 0 -30]; + for i = 1:rows (deg) + assert (degrees2dms (deg(i)), dms(i,:)); + endfor + assert (degrees2dms (deg), dms); + assert (degrees2dms (single (deg)), single (dms), 4*10^-6); + + warning ("error", "Octave:array-to-vector", "local") + got_warn = false; + try + degrees2dms (deg'); + catch + got_warn = true; + end_try_catch + assert (got_warn, true) +***** assert (degrees2dms ("f"), [102 0 0]) +***** assert (degrees2dms ("fm"), [102 0 0; 109 0 0]) +***** assert (degrees2dms (true), [1 0 0]) +***** assert (degrees2dms ([true false]), [1 0 0; 0 0 0]) +***** assert (degrees2dms (uint8 ([5 48 9]')), uint8 ([5 0 0; 48 0 0; 9 0 0])) +6 tests, 6 passed, 0 known failure, 0 skipped +[inst/ecef2aer.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecef2aer.m ***** test - xi = [ 1 5 6 2 NaN 11 15 16 12 ]; - yi = [ 1 2 5 6 NaN 1 2 5 6 ]; - zi = [ 1 3 5 3 NaN 11 13 15 13 ]; - mi = [ 8 9 NaN -1 NaN NaN -3 -2 NaN]; - [a, b, c, d] = closePolygonParts (xi, yi, zi, mi); - assert (a, [1 5 6 2 1 NaN 11 15 16 12 11], 1e-10); - assert (b, [1 2 5 6 1 NaN 1 2 5 6 1], 1e-10); - assert (c, [1 3 5 3 1 NaN 11 13 15 13 11], 1e-10); - [d, e, f] = closePolygonParts (a, b, c); - assert (a, d, 1e-10); - assert (b, e, 1e-10); - assert (c, f, 1e-10); + [az, el, slantrange] = ecef2aer (660930.192761082, -4701424.22295701, 4246579.60463288, 42, -82, 200); + assert ([az, el, slantrange], [33, 70, 1e3], 10e-6) ***** test - xxi = [ 400 405 406 402 NaN 311 315 316 312 671 ]; - yyi = [ 1 2 5 6 NaN 1 2 5 6 1 ]; - zzi = [ 1 3 5 3 NaN 11 13 15 13 11 ]; - [a, b, c] = closePolygonParts (xxi, yyi, zzi, "deg"); - assert (a, [400 405 406 402 400 NaN 311 315 316 312 671], 1e-10); - assert (b, [ 1 2 5 6 1 NaN 1 2 5 6 1], 1e-10); - assert (c, [ 1 3 5 3 1 NaN 11 13 15 13 11], 1e-10); -***** error a = closePolygonParts ([0 1], "ged"); -***** error [a, b] = closePolygonParts ([0 1], {"c", "d"}) -***** error a = closePolygonParts ([0 1], [2 3]) -***** error a = closePolygonParts ("radians") -***** error [a, b] = closePolygonParts ([0 NaN 1], [2 NaN 3 4]) -***** error [a, b] = closePolygonParts ([0 1 NaN 1], [2 NaN 3 4]) -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/km2rad.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/km2rad.m + [az, el, slantrange] = ecef2aer (660930.192761082, -4701424.22295701, 4246579.60463288, 0.7330382858, -1.43116999, 200, "", "r"); + assert ([az, el, slantrange], [0.57595865, 1.221730476, 1e3], 5e-3) ***** test - ratio = pi/180; - assert (km2rad (10), ratio*km2deg (10), 10*eps); - assert (km2rad (10, 80), ratio*km2deg (10, 80), 10*eps); - assert (km2rad (10, "pluto"), ratio*km2deg (10, "pluto"), 10*eps); + [az, el, slantrange] = ecef2aer (10766080.3, 14143607.0, 33992388.0, 42.3221, -71.3576, 84.7); + assert ([az, el, slantrange], [24.801, 14.619, 36271632.6754], 1e-3) +***** error ecef2aer (45, 45, 100, 50, 50, 200, "", "km") +***** error ecef2aer ("A", 45, 100, 50, 50, 200) +***** error ecef2aer (45i, 45, 100, 50, 50, 200) +***** error ecef2aer (45, "A", 100, 50, 50, 200) +***** error ecef2aer (45, 45i, 100, 50, 50, 200) +***** error ecef2aer (45, 45, "A", 50, 50, 200) +***** error ecef2aer (45, 45, 100i, 50, 50, 200) +***** error ecef2aer (45, 45, 100, "A", 50, 200) +***** error ecef2aer (45, 45, 100, 50i, 50, 200) +***** error ecef2aer (45, 45, 100, 50, "A", 200) +***** error ecef2aer (45, 45, 100, 50, 50i, 200) +***** error ecef2aer (45, 45, 100, 50, 50, "A") +***** error ecef2aer (45, 45, 100, 50, 50, 200i) +***** error ecef2aer ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error ecef2aer ([1 1], [2 2], [33], 4, 5, 6) +***** error ecef2aer ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** error ecef2aer ([1 1], [2 2], [3 3], 4, [5 5], 6) +***** error ecef2aer ([1 1], [2 2], [3 3], [4; 4], [5; 5], [6; 6]) +21 tests, 21 passed, 0 known failure, 0 skipped +[inst/radtodeg.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/radtodeg.m +***** assert (radtodeg(pi),180,10*eps) 1 test, 1 passed, 0 known failure, 0 skipped -[inst/enu2ecef.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2ecef.m +[inst/shaperead.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/shaperead.m +***** error shaperead ('tst.shp', 'j'); +***** error shaperead ('tst.shp', 7); +***** error shaperead ('tst.shp', 'deb') +***** error < property name expected> shaperead ('tst.shp', "ml", []); +***** error shaperead ('tst.shp', 'deb', {}); +5 tests, 5 passed, 0 known failure, 0 skipped +[inst/ecc2n.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/ecc2n.m ***** test - [x, y, z] = enu2ecef (186.28, 286.84, 939.69, 42, -82, 200); - assert ([x, y, z], [6.6093019515e5, -4.70142422216e6, 4.24657960122e6], 10e-6) + + ecc_earth = .081819221456; + ecc_jupiter = 0.3543164; + e_vec = [ ecc_earth ecc_jupiter ]; + assert ( ecc2n ( ecc_earth ) , 0.001679222 , 10e-10 ); + assert ( ecc2n ( e_vec ), [0.0016792 0.03352464],10e-8); +***** error ecc2n ("ecc") +***** error ecc2n (0.5 + 3i) +***** error n2ecc (-1) +***** error n2ecc (2) +***** error n2ecc (-Inf) +***** error n2ecc (Inf) +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/wrapTo360.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/wrapTo360.m ***** test - [x3, y3, z3] = enu2ecef ( 186.28, 286.84, 939.69, 0.733038285837618, -1.43116998663535, 200, "", "rad"); - assert ([x3, y3, z3], [660.93019e3, -4701.42422e3, 4246.5796e3],10e-3) + x = -800:0.1:800; + xw = wrapTo360 (x); + assert (sind (x), sind (xw), 16 * eps) + assert (cosd (x), cosd (xw), 16 * eps) + assert (! any (xw < 0)) + assert (! any (xw > 360)) ***** test - [a, b, c] = enu2ecef (355601.3, -923083.2, 1041016.4, 45.9132, 36.7484, 1877753.2); - assert ([a, b, c], [5507528.8891, 4556224.1399, 6012820.7522], 1e-4) -***** error enu2ecef("s", 25, 1e3, 0, 0, 0) -***** error enu2ecef(3i, 25, 1e3, 0, 0, 0) -***** error enu2ecef(33, "s", 1e3, 0, 0, 0) -***** error enu2ecef(33, 3i, 1e3, 0, 0, 0) -***** error enu2ecef(33, 25, "s", 0, 0, 0) -***** error enu2ecef(33, 25, 3i, 0, 0, 0) -***** error enu2ecef(33, 25, 1e3, "s", 0, 0) -***** error enu2ecef(33, 25, 1e3, 3i, 0, 0) -***** error enu2ecef(33, 25, 1e3, 0, "s", 0) -***** error enu2ecef(33, 25, 1e3, 0, 3i, 0) -***** error enu2ecef(33, 25, 1e3, 0, 0, "s") -***** error enu2ecef(33, 25, 1e3, 0, 0, 3i) -***** error enu2ecef ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error enu2ecef ([1 1], [2 2], [33], 4, 5, 6) -***** error enu2ecef ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** error enu2ecef ([1 1], [2 2], [3 3], 4, [5 5], 6) -***** error enu2ecef ([1 1], [2 2], [3 3], 4, 5, [6 6]) -20 tests, 20 passed, 0 known failure, 0 skipped + assert (wrapTo360 ([-720, -360, 0; 10, 360, 720]), ... + [0, 0, 0; 10, 360, 360], 1e-13); +2 tests, 2 passed, 0 known failure, 0 skipped [inst/con2geo.m] >>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/con2geo.m ***** test @@ -5955,25 +5844,172 @@ ***** error con2geo ("s") ***** error con2geo (5i) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/antipode.m] ->>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/antipode.m +[inst/majaxis.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/majaxis.m ***** test - [lato, lono] = antipode (90, 0); - assert ([lato, lono], [-90, 180], eps); + + earth_b = 6356752.314245; ## meter + earth_ecc = 0.081819221456; + assert ( majaxis (earth_b, earth_ecc), 6378137.01608, 10e-6); + planets_b = [ 6356752.314245 ; 66854000 ]; ## meter + planets_ecc = [ 0.081819221456 ; 0.3543164 ]; + assert( majaxis (planets_b, planets_ecc), [ 6378137.01608; 71492000.609327 ], 10e-6 ); +***** error majaxis (0.5, "ecc") +***** error majaxis (0.5, 0.3 + 0.5i) +***** error majaxis ("b", 0.5) +***** error majaxis (0.3 + 0.5i , 0.5) +***** error majaxis ([10; 10; 10], [0.5; 0; -0.5]) +***** error minaxis ( [ 6356752.314245 ; 66854000 ] , [ 0.081819221456 ; 0.3543164 ]') +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/makesymbolspec.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/makesymbolspec.m ***** test - [lato, lono] = antipode (43, 15); - assert ([lato, lono], [-43, -165], eps); +***** warning ssp = makesymbolspec ("Line", {"LENGTH", [100 150], "color", "b", ... + "nonsense", "?", "lineWidth", 3, "markersize", "BS", "Visible", 1}); + ssp = makesymbolspec ("Line", {"LENGTH", [100 150], "color", "b", ... + "lineWidth", 3, "Visible", 1}); + assert (reshape (ssp{2}(3:end), 2, [])(1, :), {"Color", "LineWidth", ... + "Visible"}); + assert (ssp{1}, "Line"); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/vincenty.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/vincenty.m ***** test - [lato, lono] = antipode ([-365; -360; -315; -270; -225; -185; -180; -135; -90; -45; 0; 45; 90; 135; 180; 225; 270; 315; 360], ... - [-361; -359; -315; -270; -225; -185; -180; -135; -90; -45; 0; 45; 90; 135; 180; 225; 270; 315; 360]); - assert ([lato, lono], [[5; 0; -45; -90; -45; -5; 0; 45; 90; 45; 0; -45; -90; -45; 0; 45; 90; 45; 0], ... - [179; -179; -135; -90; -45; -5; 0; 45; 90; 135; 180; -135; -90; -45; 0; 45; 90; 135; 180]], eps); -***** error [a, b] = antipode ("a", 1); -***** error a = antipode (0, 0); -***** error [a, b] = antipode (0); -***** error [a, b] = antipode (0, 0, 0); -***** error [a, b] = antipode (0, 0, "a"); + assert (vincenty ([37, -76], [37, -9]), 5830081.063, 1e-2); +***** test + assert (vincenty ([37, -76], [67, -76], referenceEllipsoid (7019)), ... + 3337842.871, 1e-2) +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/geodetic2aer.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/geodetic2aer.m +***** test + lat = 42.002582; lon = -81.997752; alt = 1139.7; + lat0 = 42; lon0 = -82; alt0 = 200; + [az, el, slantRange] = geodetic2aer (lat, lon, alt, lat0, lon0, alt0); + assert([az, el, slantRange], [33, 70, 1000], 10e-3); +***** test + Rad=deg2rad([42.002582, -81.997752, 42, -82, 33, 70]); + alt = 1139.7; alt0 = 200; + [az, el, slantRange] = geodetic2aer(Rad(1), Rad(2), alt, Rad(3), Rad(4), alt0, "rad"); + assert([az, el, slantRange], [Rad(5), Rad(6), 1000], 10e-3); +***** test + [g, h, k] = geodetic2aer (45.977, 7.658, 4531, 46.017, 7.750, 1673); + assert ([g, h, k], [238.075833, 18.743875, 8876.843345], 1e-6); +***** error geodetic2aer (45, 45, 100, 50, 50, 200, "", "km") +***** error geodetic2aer ("A", 45, 100, 50, 50, 200) +***** error geodetic2aer (45i, 45, 100, 50, 50, 200) +***** error geodetic2aer (45, "A", 100, 50, 50, 200) +***** error geodetic2aer (45, 45i, 100, 50, 50, 200) +***** error geodetic2aer (45, 45, "A", 50, 50, 200) +***** error geodetic2aer (45, 45, 100i, 50, 50, 200) +***** error geodetic2aer (45, 45, 100, "A", 50, 200) +***** error geodetic2aer (45, 45, 100, 50i, 50, 200) +***** error geodetic2aer (45, 45, 100, 50, "A", 200) +***** error geodetic2aer (45, 45, 100, 50, 50i, 200) +***** error geodetic2aer (45, 45, 100, 50, 50, "A") +***** error geodetic2aer (45, 45, 100, 50, 50, 200i) +16 tests, 16 passed, 0 known failure, 0 skipped +[inst/angltostr.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/angltostr.m +***** test +***** shared ang + ang = [-291.43 -180.0, -110.5320, -85.5, -80.425, -4.9330, 0, 3.0104, 90.0001, 180.0000, 233.425]; + str = angltostr (ang, "none", "degrees", -3); + res = {" 68.570° ", " -180.000° ", " -110.532° ", " -85.500° ", ... + " -80.425° ", " -4.933° ", " 0.000° ", " 3.010° ", ... + " 90.000° ", " 180.000° ", " -126.575° "}; + assert (str, res); +***** test + str = angltostr (ang, "ew", "degrees2dm", -3); + res = {" 68° 34.200' E ", " 180° 00.000' W ", " 110° 31.920' W ", ... + " 85° 30.000' W ", " 80° 25.500' W ", " 4° 55.980' W ", ... + " 0° 00.000' E ", " 3° 00.624' E ", " 90° 00.006' E ", ... + " 180° 00.000' E ", " 126° 34.500' W "}; + assert (str, res); +***** test + str = angltostr (ang, "NS", "degrees2dms", -1); + res = {" 68° 34' 12.0\" N ", " 0° 00' 00.0\" N ", " 69° 28' 04.8\" S ", ... + " 85° 30' 00.0\" S ", " 80° 25' 30.0\" S ", " 4° 55' 58.8\" S ", ... + " 0° 00' 00.0\" N ", " 3° 00' 37.4\" N ", " 89° 59' 59.6\" N ", ... + " 0° 00' 00.0\" N ", " 53° 25' 30.0\" S "}; + assert (str, res); +***** test + str = angltostr (ang, "EW", "degrees2dms", -1); + res = {" 68° 34' 12.0\" E ", " 180° 00' 00.0\" W ", " 110° 31' 55.2\" W ", ... + " 85° 30' 00.0\" W ", " 80° 25' 30.0\" W ", " 4° 55' 58.8\" W ", ... + " 0° 00' 00.0\" E ", " 3° 00' 37.4\" E ", " 90° 00' 00.4\" E ", ... + " 180° 00' 00.0\" E ", " 126° 34' 30.0\" W "}; + assert (str, res); +***** test + str = angltostr (deg2rad (ang), "pm", "radians", -6); + res = {" +1.196772 R ", " -3.141593 R ", " -1.929147 R ", " -1.492257 R ", ... + " -1.403681 R ", " -0.086097 R ", " +0.000000 R ", " +0.052541 R ", ... + " +1.570798 R ", " +3.141593 R ", " -2.209151 R "}; + assert (str, res); +***** error angltostr ("oo"); +***** error angltostr (2+3i); +***** error angltostr (45, "ff"); +***** error angltostr (33, 65); +***** error angltostr (45, "ew", struct ()); +***** error angltostr (88, "pm", "degs"); +***** error angltostr (45, "ew", "radians", "acc"); +***** error angltostr (45, "ew", "radians", 3+2i); +***** error angltostr (45, "ns", "degs"); +14 tests, 14 passed, 0 known failure, 0 skipped +[inst/roundn.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/roundn.m +***** assert (roundn (pi), 3, 2e-15) +***** assert (roundn (e, -2), 2.7200, 2e-15) +***** assert (roundn (pi, -4), 3.1416, 2e-15) +***** assert (roundn (e, -3), 2.718, 2e-15) +***** assert (roundn ([0.197608841252122, 0.384415323084123; ... + 0.213847642260694, 0.464622347858917], -2), ... + [0.20, 0.38; 0.21, 0.46], 2e-15) +***** assert (roundn (401189, 3), 401000, 2e-15) +***** assert (roundn (5), 5, 2e-15) +***** assert (roundn (-5), -5, 2e-15) 8 tests, 8 passed, 0 known failure, 0 skipped +[inst/referenceSphere.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/referenceSphere.m +***** test + U = referenceSphere ("Unit"); + assert (U.LengthUnit, ""); + assert (U.Radius, 1); + assert (U.SemimajorAxis, 1); + assert (U.SemiminorAxis, 1); + assert (U.InverseFlattening, Inf); + assert (U.Eccentricity, 0); + assert (U.Flattening, 0); + assert (U.ThirdFlattening, 0); + assert (U.MeanRadius, 1); + assert (U.SurfaceArea, 4*pi); + assert (U.Volume, 4*pi/3); +***** error referenceSphere (7i) +***** error referenceSphere ("yy") +***** error referenceSphere ("Unit", "##not a unit@@") +4 tests, 4 passed, 0 known failure, 0 skipped +[inst/enu2aer.m] +>>>>> /build/reproducible-path/octave-mapping-1.4.2/inst/enu2aer.m +***** test + [az, el, slantrange] = enu2aer (186.277521, 286.84222, 939.69262); + assert ([az, el, slantrange], [33, 70, 1e3], 10e-6) +***** test + [az, el, slantrange] = enu2aer (186.277521, 286.84222, 939.69262, "rad"); + assert ([az, el, slantrange], [0.57595865, 1.221730476, 1e3], 10e-6) +***** test + [az, el, sr] = enu2aer ([8450.4; 186.277521], [12473.7; 286.84222], ... + [1104.6; 939.69262]); + assert ([az, el, sr], [34.115966, 4.193108, 15107.037863; 33.000001, ... + 70.0, 999.999997], 1e-6) +***** error enu2aer ("s", 25, 1e3) +***** error enu2aer (3i, 25, 1e3) +***** error enu2aer (33, "s", 1e3) +***** error enu2aer (33, 3i, 1e3) +***** error enu2aer (33, 25, "s") +***** error enu2aer (33, 25, 3i) +***** error enu2aer ([1 1], [2 2]', [4 5]) +***** error enu2aer ([1 1], [2 2], [4 5 6]) +11 tests, 11 passed, 0 known failure, 0 skipped Checking C++ files ... Done running the unit tests. Summary: 1359 tests, 1359 passed, 0 known failures, 0 skipped @@ -6000,8 +6036,8 @@ dpkg-gencontrol: warning: package octave-mapping: substitution variable ${octave:Upstream-Description} unused, but is defined dh_md5sums -O--buildsystem=octave dh_builddeb -O--buildsystem=octave -dpkg-deb: building package 'octave-mapping-dbgsym' in '../octave-mapping-dbgsym_1.4.2-3_armhf.deb'. dpkg-deb: building package 'octave-mapping' in '../octave-mapping_1.4.2-3_armhf.deb'. +dpkg-deb: building package 'octave-mapping-dbgsym' in '../octave-mapping-dbgsym_1.4.2-3_armhf.deb'. dpkg-genbuildinfo --build=binary -O../octave-mapping_1.4.2-3_armhf.buildinfo dpkg-genchanges --build=binary -O../octave-mapping_1.4.2-3_armhf.changes dpkg-genchanges: info: binary-only upload (no source code included) @@ -6009,12 +6045,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/21200/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/7299 and its subdirectories -I: Current time: Mon May 13 11:44:19 -12 2024 -I: pbuilder-time-stamp: 1715643859 +I: removing directory /srv/workspace/pbuilder/21200 and its subdirectories +I: Current time: Tue May 14 13:53:55 +14 2024 +I: pbuilder-time-stamp: 1715644435