Diff of the two buildlogs: -- --- b1/build.log 2023-04-27 00:29:09.016722747 +0000 +++ b2/build.log 2023-04-27 00:33:00.710440724 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Tue May 28 18:50:03 -12 2024 -I: pbuilder-time-stamp: 1716965403 +I: Current time: Thu Apr 27 14:29:11 +14 2023 +I: pbuilder-time-stamp: 1682555351 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bookworm-reproducible-base.tgz] I: copying local configuration @@ -17,7 +17,7 @@ I: copying [./octave-mapping_1.4.2.orig.tar.gz] I: copying [./octave-mapping_1.4.2-3.debian.tar.xz] I: Extracting source -gpgv: Signature made Mon Dec 5 01:27:38 2022 -12 +gpgv: Signature made Tue Dec 6 03:27:38 2022 +14 gpgv: using RSA key 3F464391498FE874BDB5D98F2124AA1983785C90 gpgv: issuer "rafael@debian.org" gpgv: Can't check signature: No public key @@ -29,137 +29,169 @@ 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/97200/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/12047/tmp/hooks/D01_modify_environment starting +debug: Running on ionos2-i386. +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 Apr 27 14:29 /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/12047/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/12047/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='i386' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=16' - DISTRIBUTION='bookworm' - HOME='/root' - HOST_ARCH='i386' + 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]="15" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") + BASH_VERSION='5.2.15(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=i386 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=7' + DIRSTACK=() + DISTRIBUTION=bookworm + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=i686 + HOST_ARCH=i386 IFS=' ' - INVOCATION_ID='0bb63b99136e4d42ba68e137efd826e2' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - LD_LIBRARY_PATH='/usr/lib/libeatmydata' - LD_PRELOAD='libeatmydata.so' - 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='97200' - PS1='# ' - PS2='> ' + INVOCATION_ID=3d055e81658c4c7d9caefcee5aee4592 + LANG=C + LANGUAGE=de_CH:de + LC_ALL=C + LD_LIBRARY_PATH=/usr/lib/libeatmydata + LD_PRELOAD=libeatmydata.so + MACHTYPE=i686-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + 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=12047 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.uUfVjFOI/pbuilderrc_fqHs --distribution bookworm --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.uUfVjFOI/b1 --logfile b1/build.log octave-mapping_1.4.2-3.dsc' - SUDO_GID='112' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://85.184.249.68:3128' + 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.uUfVjFOI/pbuilderrc_92wY --distribution bookworm --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.uUfVjFOI/b2 --logfile b2/build.log --extrapackages usrmerge octave-mapping_1.4.2-3.dsc' + SUDO_GID=112 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://78.137.99.97:3128 I: uname -a - Linux ionos6-i386 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux + Linux i-capture-the-hostname 5.10.0-21-686-pae #1 SMP Debian 5.10.162-1 (2023-01-21) i686 GNU/Linux I: ls -l /bin total 6036 - -rwxr-xr-x 1 root root 1408088 Apr 23 2023 bash - -rwxr-xr-x 3 root root 38404 Sep 18 2022 bunzip2 - -rwxr-xr-x 3 root root 38404 Sep 18 2022 bzcat - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Sep 18 2022 bzdiff - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4893 Nov 27 2021 bzexe - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Sep 18 2022 bzgrep - -rwxr-xr-x 3 root root 38404 Sep 18 2022 bzip2 - -rwxr-xr-x 1 root root 17892 Sep 18 2022 bzip2recover - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Sep 18 2022 bzmore - -rwxr-xr-x 1 root root 42920 Sep 20 2022 cat - -rwxr-xr-x 1 root root 79816 Sep 20 2022 chgrp - -rwxr-xr-x 1 root root 67496 Sep 20 2022 chmod - -rwxr-xr-x 1 root root 79816 Sep 20 2022 chown - -rwxr-xr-x 1 root root 162024 Sep 20 2022 cp - -rwxr-xr-x 1 root root 136916 Jan 5 2023 dash - -rwxr-xr-x 1 root root 137160 Sep 20 2022 date - -rwxr-xr-x 1 root root 100364 Sep 20 2022 dd - -rwxr-xr-x 1 root root 108940 Sep 20 2022 df - -rwxr-xr-x 1 root root 162152 Sep 20 2022 dir - -rwxr-xr-x 1 root root 87760 Mar 22 2023 dmesg - lrwxrwxrwx 1 root root 8 Dec 19 2022 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Dec 19 2022 domainname -> hostname - -rwxr-xr-x 1 root root 38760 Sep 20 2022 echo - -rwxr-xr-x 1 root root 41 Jan 24 2023 egrep - -rwxr-xr-x 1 root root 34664 Sep 20 2022 false - -rwxr-xr-x 1 root root 41 Jan 24 2023 fgrep - -rwxr-xr-x 1 root root 84272 Mar 22 2023 findmnt - -rwsr-xr-x 1 root root 30240 Mar 22 2023 fusermount - -rwxr-xr-x 1 root root 218680 Jan 24 2023 grep - -rwxr-xr-x 2 root root 2346 Apr 9 2022 gunzip - -rwxr-xr-x 1 root root 6447 Apr 9 2022 gzexe - -rwxr-xr-x 1 root root 100952 Apr 9 2022 gzip - -rwxr-xr-x 1 root root 21916 Dec 19 2022 hostname - -rwxr-xr-x 1 root root 75756 Sep 20 2022 ln - -rwxr-xr-x 1 root root 55600 Mar 22 2023 login - -rwxr-xr-x 1 root root 162152 Sep 20 2022 ls - -rwxr-xr-x 1 root root 214568 Mar 22 2023 lsblk - -rwxr-xr-x 1 root root 96328 Sep 20 2022 mkdir - -rwxr-xr-x 1 root root 84008 Sep 20 2022 mknod - -rwxr-xr-x 1 root root 38792 Sep 20 2022 mktemp - -rwxr-xr-x 1 root root 63016 Mar 22 2023 more - -rwsr-xr-x 1 root root 58912 Mar 22 2023 mount - -rwxr-xr-x 1 root root 13856 Mar 22 2023 mountpoint - -rwxr-xr-x 1 root root 157932 Sep 20 2022 mv - lrwxrwxrwx 1 root root 8 Dec 19 2022 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 2 2023 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 38792 Sep 20 2022 pwd - lrwxrwxrwx 1 root root 4 Apr 23 2023 rbash -> bash - -rwxr-xr-x 1 root root 51080 Sep 20 2022 readlink - -rwxr-xr-x 1 root root 75720 Sep 20 2022 rm - -rwxr-xr-x 1 root root 51080 Sep 20 2022 rmdir - -rwxr-xr-x 1 root root 22308 Nov 2 2022 run-parts - -rwxr-xr-x 1 root root 133224 Jan 5 2023 sed - lrwxrwxrwx 1 root root 4 Jan 5 2023 sh -> dash - -rwxr-xr-x 1 root root 38760 Sep 20 2022 sleep - -rwxr-xr-x 1 root root 87976 Sep 20 2022 stty - -rwsr-xr-x 1 root root 83492 Mar 22 2023 su - -rwxr-xr-x 1 root root 38792 Sep 20 2022 sync - -rwxr-xr-x 1 root root 598456 Apr 6 2023 tar - -rwxr-xr-x 1 root root 13860 Nov 2 2022 tempfile - -rwxr-xr-x 1 root root 120776 Sep 20 2022 touch - -rwxr-xr-x 1 root root 34664 Sep 20 2022 true - -rwxr-xr-x 1 root root 17892 Mar 22 2023 ulockmgr_server - -rwsr-xr-x 1 root root 30236 Mar 22 2023 umount - -rwxr-xr-x 1 root root 38760 Sep 20 2022 uname - -rwxr-xr-x 2 root root 2346 Apr 9 2022 uncompress - -rwxr-xr-x 1 root root 162152 Sep 20 2022 vdir - -rwxr-xr-x 1 root root 71216 Mar 22 2023 wdctl - lrwxrwxrwx 1 root root 8 Dec 19 2022 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Apr 9 2022 zcat - -rwxr-xr-x 1 root root 1678 Apr 9 2022 zcmp - -rwxr-xr-x 1 root root 6460 Apr 9 2022 zdiff - -rwxr-xr-x 1 root root 29 Apr 9 2022 zegrep - -rwxr-xr-x 1 root root 29 Apr 9 2022 zfgrep - -rwxr-xr-x 1 root root 2081 Apr 9 2022 zforce - -rwxr-xr-x 1 root root 8103 Apr 9 2022 zgrep - -rwxr-xr-x 1 root root 2206 Apr 9 2022 zless - -rwxr-xr-x 1 root root 1842 Apr 9 2022 zmore - -rwxr-xr-x 1 root root 4577 Apr 9 2022 znew -I: user script /srv/workspace/pbuilder/97200/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 1408088 Apr 24 11:24 bash + -rwxr-xr-x 3 root root 38404 Sep 19 2022 bunzip2 + -rwxr-xr-x 3 root root 38404 Sep 19 2022 bzcat + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Sep 19 2022 bzdiff + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4893 Nov 28 2021 bzexe + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Sep 19 2022 bzgrep + -rwxr-xr-x 3 root root 38404 Sep 19 2022 bzip2 + -rwxr-xr-x 1 root root 17892 Sep 19 2022 bzip2recover + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Sep 19 2022 bzmore + -rwxr-xr-x 1 root root 42920 Sep 21 2022 cat + -rwxr-xr-x 1 root root 79816 Sep 21 2022 chgrp + -rwxr-xr-x 1 root root 67496 Sep 21 2022 chmod + -rwxr-xr-x 1 root root 79816 Sep 21 2022 chown + -rwxr-xr-x 1 root root 162024 Sep 21 2022 cp + -rwxr-xr-x 1 root root 136916 Jan 6 03:20 dash + -rwxr-xr-x 1 root root 137160 Sep 21 2022 date + -rwxr-xr-x 1 root root 100364 Sep 21 2022 dd + -rwxr-xr-x 1 root root 108940 Sep 21 2022 df + -rwxr-xr-x 1 root root 162152 Sep 21 2022 dir + -rwxr-xr-x 1 root root 87760 Mar 24 00:20 dmesg + lrwxrwxrwx 1 root root 8 Dec 20 03:33 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Dec 20 03:33 domainname -> hostname + -rwxr-xr-x 1 root root 38760 Sep 21 2022 echo + -rwxr-xr-x 1 root root 41 Jan 25 04:43 egrep + -rwxr-xr-x 1 root root 34664 Sep 21 2022 false + -rwxr-xr-x 1 root root 41 Jan 25 04:43 fgrep + -rwxr-xr-x 1 root root 84272 Mar 24 00:20 findmnt + -rwsr-xr-x 1 root root 30240 Mar 23 22:38 fusermount + -rwxr-xr-x 1 root root 218680 Jan 25 04:43 grep + -rwxr-xr-x 2 root root 2346 Apr 10 2022 gunzip + -rwxr-xr-x 1 root root 6447 Apr 10 2022 gzexe + -rwxr-xr-x 1 root root 100952 Apr 10 2022 gzip + -rwxr-xr-x 1 root root 21916 Dec 20 03:33 hostname + -rwxr-xr-x 1 root root 75756 Sep 21 2022 ln + -rwxr-xr-x 1 root root 55600 Mar 24 01:43 login + -rwxr-xr-x 1 root root 162152 Sep 21 2022 ls + -rwxr-xr-x 1 root root 214568 Mar 24 00:20 lsblk + -rwxr-xr-x 1 root root 96328 Sep 21 2022 mkdir + -rwxr-xr-x 1 root root 84008 Sep 21 2022 mknod + -rwxr-xr-x 1 root root 38792 Sep 21 2022 mktemp + -rwxr-xr-x 1 root root 63016 Mar 24 00:20 more + -rwsr-xr-x 1 root root 58912 Mar 24 00:20 mount + -rwxr-xr-x 1 root root 13856 Mar 24 00:20 mountpoint + -rwxr-xr-x 1 root root 157932 Sep 21 2022 mv + lrwxrwxrwx 1 root root 8 Dec 20 03:33 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 3 20:25 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 38792 Sep 21 2022 pwd + lrwxrwxrwx 1 root root 4 Apr 24 11:24 rbash -> bash + -rwxr-xr-x 1 root root 51080 Sep 21 2022 readlink + -rwxr-xr-x 1 root root 75720 Sep 21 2022 rm + -rwxr-xr-x 1 root root 51080 Sep 21 2022 rmdir + -rwxr-xr-x 1 root root 22308 Nov 3 06:31 run-parts + -rwxr-xr-x 1 root root 133224 Jan 6 09:55 sed + lrwxrwxrwx 1 root root 9 Apr 27 14:29 sh -> /bin/bash + -rwxr-xr-x 1 root root 38760 Sep 21 2022 sleep + -rwxr-xr-x 1 root root 87976 Sep 21 2022 stty + -rwsr-xr-x 1 root root 83492 Mar 24 00:20 su + -rwxr-xr-x 1 root root 38792 Sep 21 2022 sync + -rwxr-xr-x 1 root root 598456 Apr 7 04:25 tar + -rwxr-xr-x 1 root root 13860 Nov 3 06:31 tempfile + -rwxr-xr-x 1 root root 120776 Sep 21 2022 touch + -rwxr-xr-x 1 root root 34664 Sep 21 2022 true + -rwxr-xr-x 1 root root 17892 Mar 23 22:38 ulockmgr_server + -rwsr-xr-x 1 root root 30236 Mar 24 00:20 umount + -rwxr-xr-x 1 root root 38760 Sep 21 2022 uname + -rwxr-xr-x 2 root root 2346 Apr 10 2022 uncompress + -rwxr-xr-x 1 root root 162152 Sep 21 2022 vdir + -rwxr-xr-x 1 root root 71216 Mar 24 00:20 wdctl + lrwxrwxrwx 1 root root 8 Dec 20 03:33 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Apr 10 2022 zcat + -rwxr-xr-x 1 root root 1678 Apr 10 2022 zcmp + -rwxr-xr-x 1 root root 6460 Apr 10 2022 zdiff + -rwxr-xr-x 1 root root 29 Apr 10 2022 zegrep + -rwxr-xr-x 1 root root 29 Apr 10 2022 zfgrep + -rwxr-xr-x 1 root root 2081 Apr 10 2022 zforce + -rwxr-xr-x 1 root root 8103 Apr 10 2022 zgrep + -rwxr-xr-x 1 root root 2206 Apr 10 2022 zless + -rwxr-xr-x 1 root root 1842 Apr 10 2022 zmore + -rwxr-xr-x 1 root root 4577 Apr 10 2022 znew +I: user script /srv/workspace/pbuilder/12047/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -821,7 +853,7 @@ Get: 614 http://deb.debian.org/debian bookworm/main i386 pkgconf-bin i386 1.8.1-1 [29.8 kB] Get: 615 http://deb.debian.org/debian bookworm/main i386 pkgconf i386 1.8.1-1 [25.9 kB] Get: 616 http://deb.debian.org/debian bookworm/main i386 pkg-config i386 1.8.1-1 [13.7 kB] -Fetched 273 MB in 5s (53.9 MB/s) +Fetched 273 MB in 6s (48.2 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 ... 19604 files and directories currently installed.) @@ -3339,8 +3371,19 @@ Writing extended state information... Building tag database... -> Finished parsing the build-deps +Reading package lists... +Building dependency tree... +Reading state information... +usrmerge is already the newest version (35). +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I: Building the package -I: Running cd /build/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/12047/tmp/hooks/A99_set_merged_usr starting +Re-configuring usrmerge... +removed '/etc/unsupported-skip-usrmerge-conversion' +The system has been successfully converted. +I: user script /srv/workspace/pbuilder/12047/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/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 @@ -3351,10 +3394,10 @@ dh clean --buildsystem=octave dh_auto_clean -O--buildsystem=octave dh_octave_clean -make[1]: Entering directory '/build/octave-mapping-1.4.2/src' -make[1]: *** No rule to make target 'clean'. -make[1]: *** No rule to make target 'distclean'. -make[1]: Leaving directory '/build/octave-mapping-1.4.2/src' +make[1]: Verzeichnis „/build/octave-mapping-1.4.2/src“ wird betreten +make[1]: *** Keine Regel, um „clean“ zu erstellen. +make[1]: *** Keine Regel, um „distclean“ zu erstellen. +make[1]: Verzeichnis „/build/octave-mapping-1.4.2/src“ wird verlassen dh_autoreconf_clean -O--buildsystem=octave dh_clean -O--buildsystem=octave debian/rules binary @@ -3387,25 +3430,115 @@ configure: creating ./config.status config.status: creating Makefile config.status: creating config.h -make[1]: Entering directory '/build/octave-mapping-1.4.2/src' +make[1]: Verzeichnis „/build/octave-mapping-1.4.2/src“ wird betreten /usr/bin/mkoctfile --verbose -DHAVE_CONFIG_H -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/gdal -lgdal -o gdalread.oct gdalread.cc misc.cpp -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-7.3.0/octave/.. -I/usr/include/octave-7.3.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H gdalread.cc -o /tmp/oct-8KIbZX.o -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-7.3.0/octave/.. -I/usr/include/octave-7.3.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H misc.cpp -o /tmp/oct-XJoeUY.o -g++ -I/usr/include/octave-7.3.0/octave/.. -I/usr/include/octave-7.3.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -o gdalread.oct /tmp/oct-8KIbZX.o /tmp/oct-XJoeUY.o -lgdal -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/i386-linux-gnu -shared -Wl,-Bsymbolic -Wl,-z,relro -make[1]: Leaving directory '/build/octave-mapping-1.4.2/src' +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-7.3.0/octave/.. -I/usr/include/octave-7.3.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H gdalread.cc -o /tmp/oct-BdZKch.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-7.3.0/octave/.. -I/usr/include/octave-7.3.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/gdal -DHAVE_CONFIG_H misc.cpp -o /tmp/oct-yeeKWk.o +g++ -I/usr/include/octave-7.3.0/octave/.. -I/usr/include/octave-7.3.0/octave -pthread -fopenmp -mieee-fp -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -ffile-prefix-map=/build/octave-mapping-1.4.2=. -fstack-protector-strong -Wformat -Werror=format-security -o gdalread.oct /tmp/oct-BdZKch.o /tmp/oct-yeeKWk.o -lgdal -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/i386-linux-gnu -shared -Wl,-Bsymbolic -Wl,-z,relro +make[1]: Verzeichnis „/build/octave-mapping-1.4.2/src“ wird verlassen copyfile /build/octave-mapping-1.4.2/./src/gdalread.oct /build/octave-mapping-1.4.2/./inst/i686-pc-linux-gnu-api-v57 For information about changes from previous versions of the mapping package, run 'news mapping'. dh_octave_check -O--buildsystem=octave Checking package... Checking m files ... -[inst/shaperead.m] ->>>>> /build/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/enu2ecefv.m] +>>>>> /build/octave-mapping-1.4.2/inst/enu2ecefv.m +***** test + [u, v, w] = enu2ecefv (224.3854022, 871.0476287, 436.9521873, 42, -82, "d"); + assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) +***** test + [u, v, w] = enu2ecefv (224.3854022, 871.0476287, 436.9521873, ... + 0.733038285837618, -1.43116998663535, "r"); + assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) +***** test ## Multidimensionality + [u, v, w] = enu2ecefv ([224.3854022; 200], [871.0476287; 900], [436.9521873; 500], 42, -82); + assert ([u, v, w], [186.277521, 286.84222, 939.69262; ... + 165.954015, 256.23513, 1003.395646], 1e-6); +***** error enu2ecefv("s", 25, 1e3, 0, 0) +***** error enu2ecefv(3i, 25, 1e3, 0, 0) +***** error enu2ecefv(33, "s", 1e3, 0, 0) +***** error enu2ecefv(33, 3i, 1e3, 0, 0) +***** error enu2ecefv(33, 25, "s", 0, 0) +***** error enu2ecefv(33, 25, 3i, 0, 0) +***** error enu2ecefv(33, 25, 1e3, "s", 0) +***** error enu2ecefv(33, 25, 1e3, 3i, 0) +***** error enu2ecefv(33, 25, 1e3, 0, "s") +***** error enu2ecefv(33, 25, 1e3, 0, 3i) +***** error enu2ecefv (33, 70, 1e3, 0, 0, "f"); +***** error enu2ecefv (33, 70, 1e3, 0, 0, "degreef") +***** error [u, v, w] = enu2ecefv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) +***** 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/enu2ecef.m] +>>>>> /build/octave-mapping-1.4.2/inst/enu2ecef.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) +***** 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) +***** 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 +[inst/meridianfwd.m] +>>>>> /build/octave-mapping-1.4.2/inst/meridianfwd.m +***** test + 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/majaxis.m] +>>>>> /build/octave-mapping-1.4.2/inst/majaxis.m +***** 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 +[inst/degtorad.m] +>>>>> /build/octave-mapping-1.4.2/inst/degtorad.m +***** assert (degtorad(180),pi,10*eps) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/wrapTo2Pi.m] +>>>>> /build/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/sm2km.m] >>>>> /build/octave-mapping-1.4.2/inst/sm2km.m ***** test @@ -3417,6 +3550,63 @@ assert (sm2km (sm), km) ***** assert (sm2km (3937), 6336) 2 tests, 2 passed, 0 known failure, 0 skipped +[inst/fromDegrees.m] +>>>>> /build/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/parametricLatitude.m] +>>>>> /build/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/aer2ned.m] +>>>>> /build/octave-mapping-1.4.2/inst/aer2ned.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/geodetic2enu.m] >>>>> /build/octave-mapping-1.4.2/inst/geodetic2enu.m ***** test @@ -3447,6 +3637,17 @@ ***** 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/unitsratio.m] +>>>>> /build/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/auth2geo.m] >>>>> /build/octave-mapping-1.4.2/inst/auth2geo.m ***** test @@ -3464,117 +3665,6 @@ ***** error auth2geo ("s") ***** error auth2geo (5i) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/almanac.m] ->>>>> /build/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/utmzone.m] ->>>>> /build/octave-mapping-1.4.2/inst/utmzone.m -***** test - lat = 43; ## From Wiki - long = -79; - assert (utmzone (lat, long), "17T") -***** assert (utmzone ("17T"), [40, 48;-84, -78]) -***** assert (utmzone (60, 5), "32V") ## For Bergen Norway -***** assert (utmzone ("32V"), [56, 64;3, 12]) -***** error utmzone ("32X") -***** error utmzone ("31I") -***** error utmzone ("31O") -7 tests, 7 passed, 0 known failure, 0 skipped -[inst/wrapTo180.m] ->>>>> /build/octave-mapping-1.4.2/inst/wrapTo180.m -***** 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)) -***** 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/geodeticfwd.m] ->>>>> /build/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/dm2degrees.m] ->>>>> /build/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/nm2deg.m] ->>>>> /build/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/nm2km.m] ->>>>> /build/octave-mapping-1.4.2/inst/nm2km.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/aer2geodetic.m] >>>>> /build/octave-mapping-1.4.2/inst/aer2geodetic.m ***** test @@ -3606,778 +3696,8 @@ ***** 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/sm2nm.m] ->>>>> /build/octave-mapping-1.4.2/inst/sm2nm.m -***** 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/ned2geodetic.m] ->>>>> /build/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/geo2rect.m] ->>>>> /build/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/closePolygonParts.m] ->>>>> /build/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/roundn.m] ->>>>> /build/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/ned2aer.m] ->>>>> /build/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/toDegrees.m] ->>>>> /build/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/km2nm.m] ->>>>> /build/octave-mapping-1.4.2/inst/km2nm.m -***** 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/removeExtraNanSeparators.m] ->>>>> /build/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/antipode.m] ->>>>> /build/octave-mapping-1.4.2/inst/antipode.m -***** test - [lato, lono] = antipode (90, 0); - assert ([lato, lono], [-90, 180], eps); -***** test - [lato, lono] = antipode (43, 15); - assert ([lato, lono], [-43, -165], eps); -***** 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"); -8 tests, 8 passed, 0 known failure, 0 skipped -[inst/referenceSphere.m] ->>>>> /build/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/makesymbolspec.m] ->>>>> /build/octave-mapping-1.4.2/inst/makesymbolspec.m -***** 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/gcxgc.m] ->>>>> /build/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/meridianfwd.m] ->>>>> /build/octave-mapping-1.4.2/inst/meridianfwd.m -***** test - 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/minaxis.m] ->>>>> /build/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/egm96geoid.m] ->>>>> /build/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/degrees2dms.m] ->>>>> /build/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/ecc2flat.m] ->>>>> /build/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/vincenty.m] ->>>>> /build/octave-mapping-1.4.2/inst/vincenty.m -***** test - 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/ecef2geodetic.m] ->>>>> /build/octave-mapping-1.4.2/inst/ecef2geodetic.m -***** shared X, Y, Z - X = 3426949.397; - Y = 601195.852; - Z = 5327723.994; ## meters -***** test - [latd, lond, h] = ecef2geodetic ("wgs84", X, Y, Z); - assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); -***** test - [latd, lond, h] = ecef2geodetic (X, Y, Z); - assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); -***** 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); -***** 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/ecef2nedv.m] ->>>>> /build/octave-mapping-1.4.2/inst/ecef2nedv.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); -***** 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); -***** 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/iso2geo.m] ->>>>> /build/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/areaquad.m] ->>>>> /build/octave-mapping-1.4.2/inst/areaquad.m -***** test - aq = areaquad (-90, 0, 90, 360); - assert (aq, 1, 1e-8); -***** test - aq = areaquad (-pi / 2, 0, pi / 2, 2 * pi,"r"); - assert (aq, 1, 1e-8); -***** test - aq = areaquad (0, 0, 90, 360, "wgs84"); - assert (aq, 2.5503281086204421875e+14, 1e-8); -***** test - aq = areaquad(-90,0,90,360,[0 6000]); - assert (aq, 4 * pi * 6000 ^ 2, 1e-8) -***** test - aq = areaquad(-90,0,90,360,[6000 0]); - assert (aq, 4 * pi * 6000 ^ 2, 1e-8) -***** test - aq = areaquad(-90,0,90,360,[1 0]); - assert (aq, 4 * pi, 1e-8) -***** test - aq = areaquad(-90,0,90,360,[0 1]); - assert (aq, 4 * pi, 1e-8) -***** 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/geocentricLatitude.m] ->>>>> /build/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/km2deg.m] ->>>>> /build/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/earthRadius.m] ->>>>> /build/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/wrapTo2Pi.m] ->>>>> /build/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/n2ecc.m] ->>>>> /build/octave-mapping-1.4.2/inst/n2ecc.m -***** test - - n_earth = 0.001679221647179929; - n_jupiter = 0.03352464537391420; - n_vec = [ n_earth n_jupiter ]; - assert (n2ecc (n_earth) , .081819221456 , 10e-12); - assert (n2ecc (n_vec), [0.08181922 0.3543164], 10e-8) -***** error n2ecc ("n") -***** error n2ecc (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/octave-mapping-1.4.2/inst/wrapTo360.m -***** 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)) -***** 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/geodetic2ned.m] ->>>>> /build/octave-mapping-1.4.2/inst/geodetic2ned.m -***** test - lat = 42.002582; lon = -81.997752; alt = 1139.7; - lat0 = 42; lon0 = -82; alt0 = 200; - [n, e, d] = geodetic2ned (lat, lon, alt, lat0, lon0, alt0); - assert([n, e, d], [286.84, 186.28, -939.69], 10e-3); -***** test - Rad = deg2rad ([42.002582, -81.997752, 42, -82]); - alt = 1139.7; alt0 = 200; - [e, n, u] = geodetic2ned (Rad(1), Rad(2), alt, Rad(3), Rad(4), alt0, "rad"); - assert([e, n, u], [286.84, 186.28, -939.69], 10e-3); -***** test - [a, b, c] = ned2geodetic (-7134.8, -4556.3, 2852.4, 46.017, 7.750, 1673, 'wgs84'); - [d, e, f] = geodetic2ned (a, b, c, 46.017, 7.750, 1673); - assert ([d, e, f], [ -7134.8, -4556.3, 2852.4], 1e-6); -***** test - [n, e, d] = geodetic2ned (44.544, -72.814, 1340, 44.532, -72.782, 1699); - assert ([n, e, d], [1334.2518, -2543.5645, 359.6460], 1e-4); -***** error geodetic2ned (45, 45, 100, 50, 50, 200, "", "km") -***** error geodetic2ned ("A", 45, 100, 50, 50, 200) -***** error geodetic2ned (45i, 45, 100, 50, 50, 200) -***** error geodetic2ned (45, "A", 100, 50, 50, 200) -***** error geodetic2ned (45, 45i, 100, 50, 50, 200) -***** error geodetic2ned (45, 45, "A", 50, 50, 200) -***** error geodetic2ned (45, 45, 100i, 50, 50, 200) -***** error geodetic2ned (45, 45, 100, "A", 50, 200) -***** error geodetic2ned (45, 45, 100, 50i, 50, 200) -***** error geodetic2ned (45, 45, 100, 50, "A", 200) -***** error geodetic2ned (45, 45, 100, 50, 50i, 200) -***** 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/meridianarc.m] ->>>>> /build/octave-mapping-1.4.2/inst/meridianarc.m -***** test - s = meridianarc (0, 56, "int24", "degrees"); - assert (s, 6208700.08662672, 1e-6) -***** 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/geodeticarc.m] ->>>>> /build/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/str2angle.m] ->>>>> /build/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/ned2ecef.m] ->>>>> /build/octave-mapping-1.4.2/inst/ned2ecef.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) -***** 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/aer2ned.m] ->>>>> /build/octave-mapping-1.4.2/inst/aer2ned.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/degrees2dm.m] ->>>>> /build/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/ecef2ned.m] ->>>>> /build/octave-mapping-1.4.2/inst/ecef2ned.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); -***** 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); -***** 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); -***** 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/rect2geo.m] ->>>>> /build/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 rect2geo ("s") -***** error rect2geo (5i) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/radtodeg.m] ->>>>> /build/octave-mapping-1.4.2/inst/radtodeg.m -***** assert (radtodeg(pi),180,10*eps) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/toRadians.m] ->>>>> /build/octave-mapping-1.4.2/inst/toRadians.m +[inst/fromRadians.m] +>>>>> /build/octave-mapping-1.4.2/inst/fromRadians.m ***** test rad{1} = pi; rad{2} = [pi 2*pi]; @@ -4386,167 +3706,31 @@ 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}) + assert (fromRadians ("degrees", rad{i}), deg{i}) + assert (fromRadians ("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)) + assert (nthargout (1:3, @fromRadians, "degrees", rad{:}), deg) + assert (nthargout (1:2, @fromRadians, "degrees", rad{:}), deg(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/sm2deg.m] ->>>>> /build/octave-mapping-1.4.2/inst/sm2deg.m -***** 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 -[inst/geo2con.m] ->>>>> /build/octave-mapping-1.4.2/inst/geo2con.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/sm2rad.m] ->>>>> /build/octave-mapping-1.4.2/inst/sm2rad.m -***** test - ratio = unitsratio ('km','sm'); - assert (sm2rad (10), km2rad (ratio*10), 10*eps); - 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/dms2degrees.m] ->>>>> /build/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/validateLengthUnit.m] ->>>>> /build/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/km2sm.m] ->>>>> /build/octave-mapping-1.4.2/inst/km2sm.m -***** 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) + assert (nthargout (1:3, @fromRadians, "degree", rad{:}), deg) + assert (nthargout (1:3, @fromRadians, "deg", rad{:}), deg) + assert (nthargout (1:3, @fromRadians, "d", rad{:}), deg) +***** error fromRadians ("INVALID") 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/nm2sm.m] ->>>>> /build/octave-mapping-1.4.2/inst/nm2sm.m +[inst/sm2nm.m] +>>>>> /build/octave-mapping-1.4.2/inst/sm2nm.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) + 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/con2geo.m] ->>>>> /build/octave-mapping-1.4.2/inst/con2geo.m -***** test - chi = [0:15:90]; - phi = con2geo (chi); - Z = degrees2dm (phi - chi); - check = [0 - 5.7891134 - 10.01261 - 11.538913 - 9.9734791 - 5.7499818 - 0]; - assert (Z(:,2), check, 1e-6) -***** error con2geo ("s") -***** error con2geo (5i) -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/departure.m] ->>>>> /build/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/geodetic2aer.m] >>>>> /build/octave-mapping-1.4.2/inst/geodetic2aer.m ***** test @@ -4576,443 +3760,6 @@ ***** 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/deg2km.m] ->>>>> /build/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/scxsc.m] ->>>>> /build/octave-mapping-1.4.2/inst/scxsc.m -***** test - R1 = rad2deg (107.5 / earthRadius ("NM")); # Convert NM to deg - R2 = rad2deg (145 / earthRadius ("NM")); - [lat, lon, jj] = scxsc (37.673442, -90.234036, R1, 36.109997, -90.953669, R2); - assert (lat(1), 36.988778646, 1e-6); - assert (lon(1), -88.15335362, 1e-6); -***** test - [a, b, c] = gc2sc (45, [0:45:360], 45); - ## Correct a, must be 30 exactly degrees. reckon() is a bit inaccurate - a = -30 * ones (9, 1); - [d, e, f] = gc2sc (-45, -135, -45); - wst = warning ("off", "Octave:coinciding-small-circles", "local"); - [g, h] = scxsc (a, b, c, d, e, f); - warning (wst.state, "Octave:coinciding-small-circles"); - assert (g(2, 1), NaN); - assert ([g(9, 1) h(9, 1)], [-57.997936587 -102.76438968], 1e-6); -***** test - wst1 = warning ("off", "Octave:coinciding-small-circles", "local"); - wst2 = warning ("off", "Octave:no-intersecting-circles", "local"); - [~, ~, w] = scxsc (0, 0, 1, 0, [0, 2, 0, 2], [1, 1, 2, 1.5]); - warning (wst2.state, "Octave:no-intersecting-circles"); - warning (wst1.state, "Octave:coinciding-small-circles"); - assert (w, [3; 2; 1; 0], eps); -***** warning scxsc (45, 90, 1, -30, 60, 1); -***** warning scxsc (0, 0, 10, 0, 4, 2); -***** warning scxsc (0, 4, 3, 0, 0, 10); -***** error scxsc ("s", 0, 100, 10, 30, 0); -***** error scxsc (3i, 0, 100, 10, 30, 0); -***** error scxsc (50, "s", 100, 10, 30, 0); -***** error scxsc (50, 2i, 10, 10, 30, 0); -***** error scxsc (50, 0, "s", 10, 30, 0); -***** error scxsc (50, 0, 100i, 10, 30, 0); -***** error scxsc (50, 0, 100, "s", 30, 0); -***** error scxsc (50, 0, 100, 10i, 30, 0); -***** error scxsc (50, 0, 100, 10, "s", 0); -***** error scxsc (50, 0, 100, 10, 30i, 0); -***** error scxsc (50, 0, 100, 10, 30, "s"); -***** error scxsc (50, 0, 100, 10, 30, 2i); -***** error scxsc (50, 0, 100, 10, 30, 0, "f"); -***** error scxsc (50, 0, 100, 10, 30, 0, "degreef"); -***** error scxsc (190, 0, 90, -90.000001, 180, 80); -***** 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/ecef2aer.m] ->>>>> /build/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/gcxsc.m] ->>>>> /build/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/angltostr.m] ->>>>> /build/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/rad2km.m] ->>>>> /build/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/geo2auth.m] ->>>>> /build/octave-mapping-1.4.2/inst/geo2auth.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/majaxis.m] ->>>>> /build/octave-mapping-1.4.2/inst/majaxis.m -***** 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 -[inst/geodetic2ecef.m] ->>>>> /build/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/reckon.m] ->>>>> /build/octave-mapping-1.4.2/inst/reckon.m -***** test - [lato,lono] = reckon(30,-80,20,40); - assert(lato,44.16661401448592,1e-10) - assert(lono,-62.15251496909770,1e-10) -***** 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) -***** 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 -[inst/fromRadians.m] ->>>>> /build/octave-mapping-1.4.2/inst/fromRadians.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 (fromRadians ("degrees", rad{i}), deg{i}) - assert (fromRadians ("radians", rad{i}), rad{i}) - endfor - - ## test multiple angles same time - assert (nthargout (1:3, @fromRadians, "degrees", rad{:}), deg) - assert (nthargout (1:2, @fromRadians, "degrees", rad{:}), deg(1:2)) - - ## test abbreviations of degrees - assert (nthargout (1:3, @fromRadians, "degree", rad{:}), deg) - assert (nthargout (1:3, @fromRadians, "deg", rad{:}), deg) - assert (nthargout (1:3, @fromRadians, "d", rad{:}), deg) -***** error fromRadians ("INVALID") -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/ned2ecefv.m] ->>>>> /build/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) -***** 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); -***** 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/geodeticLatitudeFromParametric.m] ->>>>> /build/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/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/km2rad.m] ->>>>> /build/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/aer2ecef.m] ->>>>> /build/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/axes2ecc.m] ->>>>> /build/octave-mapping-1.4.2/inst/axes2ecc.m -***** test - semimajor = 6378137; - semiminor = 6356752.314245; - Earth = [ semimajor, semiminor ]; - Jupiter = [ 71492 , 66854 ]; - Planets = [ Jupiter ; Earth ]; - assert (axes2ecc (semimajor, semiminor), 0.0818191908429654, 10e-12); - assert (axes2ecc (Earth), 0.0818191908429654, 10e-12); - assert (axes2ecc (Planets), [ 0.354316379; 0.081819190843 ], 10e-10); - assert (axes2ecc (Planets(:, 1), Planets(:, 2)), [ 0.354316379; 0.081819190843 ], 10e-10); -***** error axes2ecc ("a", 1); -***** error axes2ecc ([1; 2]); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/enu2ecefv.m] ->>>>> /build/octave-mapping-1.4.2/inst/enu2ecefv.m -***** test - [u, v, w] = enu2ecefv (224.3854022, 871.0476287, 436.9521873, 42, -82, "d"); - assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) -***** test - [u, v, w] = enu2ecefv (224.3854022, 871.0476287, 436.9521873, ... - 0.733038285837618, -1.43116998663535, "r"); - assert ([u, v, w], [186.277521, 286.84222, 939.69262], 10e-6) -***** test ## Multidimensionality - [u, v, w] = enu2ecefv ([224.3854022; 200], [871.0476287; 900], [436.9521873; 500], 42, -82); - assert ([u, v, w], [186.277521, 286.84222, 939.69262; ... - 165.954015, 256.23513, 1003.395646], 1e-6); -***** error enu2ecefv("s", 25, 1e3, 0, 0) -***** error enu2ecefv(3i, 25, 1e3, 0, 0) -***** error enu2ecefv(33, "s", 1e3, 0, 0) -***** error enu2ecefv(33, 3i, 1e3, 0, 0) -***** error enu2ecefv(33, 25, "s", 0, 0) -***** error enu2ecefv(33, 25, 3i, 0, 0) -***** error enu2ecefv(33, 25, 1e3, "s", 0) -***** error enu2ecefv(33, 25, 1e3, 3i, 0) -***** error enu2ecefv(33, 25, 1e3, 0, "s") -***** error enu2ecefv(33, 25, 1e3, 0, 3i) -***** error enu2ecefv (33, 70, 1e3, 0, 0, "f"); -***** error enu2ecefv (33, 70, 1e3, 0, 0, "degreef") -***** error [u, v, w] = enu2ecefv ([1, 2, 3], [4, 5, 6], [7, 9], 60, 50) -***** 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/unitsratio.m] ->>>>> /build/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/geodeticLatitudeFromGeocentric.m] ->>>>> /build/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/distance.m] ->>>>> /build/octave-mapping-1.4.2/inst/distance.m -***** test - assert (distance ([37, -76], [37, -9]), 52.30942093, 1e-7) -***** test ## Very small distances, haversine formula - assert (distance (0, 0, 0, 1e-8), 1e-8, eps); -***** test ## Very large distance, spherical cosine formula. Sph.cos. degenerates - ## the least there - assert (distance (-90, 0, 89.999999, 0), 179.999999, 1e-6); -***** test - [d, az] = distance (0, 0, 0, pi, "radians"); - assert (d, pi, 1e-7) - assert (az, pi / 2, 1e-7) -4 tests, 4 passed, 0 known failure, 0 skipped -[inst/ecc2n.m] ->>>>> /build/octave-mapping-1.4.2/inst/ecc2n.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) -7 tests, 7 passed, 0 known failure, 0 skipped [inst/angl2str.m] >>>>> /build/octave-mapping-1.4.2/inst/angl2str.m ***** test @@ -5514,6 +4261,70 @@ ' 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/gc2sc.m] +>>>>> /build/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/enu2aer.m] +>>>>> /build/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 +[inst/geo2auth.m] +>>>>> /build/octave-mapping-1.4.2/inst/geo2auth.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/aer2enu.m] >>>>> /build/octave-mapping-1.4.2/inst/aer2enu.m ***** test @@ -5534,42 +4345,32 @@ ***** error aer2enu (33, 70, 1e3, "f"); ***** error aer2enu (33, 70, 1e3, "degreef"); 13 tests, 13 passed, 0 known failure, 0 skipped -[inst/azimuth.m] ->>>>> /build/octave-mapping-1.4.2/inst/azimuth.m +[inst/iso2geo.m] +>>>>> /build/octave-mapping-1.4.2/inst/iso2geo.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/ecef2enuv.m] ->>>>> /build/octave-mapping-1.4.2/inst/ecef2enuv.m + psi = iso2geo (50.227465817); + assert (psi, 45, 1e-6) ***** 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); + 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/reckon.m] +>>>>> /build/octave-mapping-1.4.2/inst/reckon.m ***** 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 + [lato,lono] = reckon(30,-80,20,40); + assert(lato,44.16661401448592,1e-10) + assert(lono,-62.15251496909770,1e-10) +***** 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) +***** 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 [inst/nm2rad.m] >>>>> /build/octave-mapping-1.4.2/inst/nm2rad.m ***** test @@ -5578,6 +4379,206 @@ 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/ned2ecef.m] +>>>>> /build/octave-mapping-1.4.2/inst/ned2ecef.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) +***** 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/antipode.m] +>>>>> /build/octave-mapping-1.4.2/inst/antipode.m +***** test + [lato, lono] = antipode (90, 0); + assert ([lato, lono], [-90, 180], eps); +***** test + [lato, lono] = antipode (43, 15); + assert ([lato, lono], [-43, -165], eps); +***** 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"); +8 tests, 8 passed, 0 known failure, 0 skipped +[inst/removeExtraNanSeparators.m] +>>>>> /build/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/geo2rect.m] +>>>>> /build/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/enu2uvw.m] +>>>>> /build/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/almanac.m] +>>>>> /build/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/con2geo.m] +>>>>> /build/octave-mapping-1.4.2/inst/con2geo.m +***** test + chi = [0:15:90]; + phi = con2geo (chi); + Z = degrees2dm (phi - chi); + check = [0 + 5.7891134 + 10.01261 + 11.538913 + 9.9734791 + 5.7499818 + 0]; + assert (Z(:,2), check, 1e-6) +***** error con2geo ("s") +***** error con2geo (5i) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/meridianarc.m] +>>>>> /build/octave-mapping-1.4.2/inst/meridianarc.m +***** test + s = meridianarc (0, 56, "int24", "degrees"); + assert (s, 6208700.08662672, 1e-6) +***** 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/deg2sm.m] +>>>>> /build/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/roundn.m] +>>>>> /build/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/utmzone.m] +>>>>> /build/octave-mapping-1.4.2/inst/utmzone.m +***** test + lat = 43; ## From Wiki + long = -79; + assert (utmzone (lat, long), "17T") +***** assert (utmzone ("17T"), [40, 48;-84, -78]) +***** assert (utmzone (60, 5), "32V") ## For Bergen Norway +***** assert (utmzone ("32V"), [56, 64;3, 12]) +***** error utmzone ("32X") +***** error utmzone ("31I") +***** error utmzone ("31O") +7 tests, 7 passed, 0 known failure, 0 skipped +[inst/shaperead.m] +>>>>> /build/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/extractfield.m] >>>>> /build/octave-mapping-1.4.2/inst/extractfield.m ***** test @@ -5609,37 +4610,333 @@ ***** error extractfield (5, "name") ***** error extractfield (struct ("name", 5), "not a name") 6 tests, 6 passed, 0 known failure, 0 skipped -[inst/ecef2enu.m] ->>>>> /build/octave-mapping-1.4.2/inst/ecef2enu.m +[inst/azimuth.m] +>>>>> /build/octave-mapping-1.4.2/inst/azimuth.m ***** test - [e, n, u] = ecef2enu (660930.192761082, -4701424.222957011, 4246579.604632881, 42, -82, 200); - assert([e, n, u], [186.27752, 286.84222, 939.69262], 10e-6); + 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/angltostr.m] +>>>>> /build/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/km2nm.m] +>>>>> /build/octave-mapping-1.4.2/inst/km2nm.m +***** 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/nm2deg.m] +>>>>> /build/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/km2deg.m] +>>>>> /build/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/minaxis.m] +>>>>> /build/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/geo2iso.m] +>>>>> /build/octave-mapping-1.4.2/inst/geo2iso.m +***** test + 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/ecef2geodetic.m] +>>>>> /build/octave-mapping-1.4.2/inst/ecef2geodetic.m +***** shared X, Y, Z + X = 3426949.397; + Y = 601195.852; + Z = 5327723.994; ## meters +***** test + [latd, lond, h] = ecef2geodetic ("wgs84", X, Y, Z); + assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); +***** test + [latd, lond, h] = ecef2geodetic (X, Y, Z); + assert ([latd, lond, h], [57.02929569, 9.950248114, 56.95], 10e-3); +***** 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); +***** 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/ecef2ned.m] +>>>>> /build/octave-mapping-1.4.2/inst/ecef2ned.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); ***** test Rad = deg2rad ([42, -82]); - [e, n, u] = ecef2enu (660930.192761082, -4701424.222957011, 4246579.604632881, Rad(1), Rad(2), 200, "rad"); - assert ([e, n, u], [186.28, 286.84, 939.69], 10e-3); + [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 - [a, b, c] = ecef2enu (5507528.9, 4556224.1, 6012820.8, 45.9132, 36.7484, 1877753.2); - assert ([a, b, c], [355601.2616, -923083.1558, 1041016.4238], 1e-4); -***** error ecef2enu (45, 45, 100, 50, 50, 200, "", "km") -***** error ecef2enu ("A", 45, 100, 50, 50, 200) -***** error ecef2enu (45i, 45, 100, 50, 50, 200) -***** error ecef2enu (45, "A", 100, 50, 50, 200) -***** error ecef2enu (45, 45i, 100, 50, 50, 200) -***** error ecef2enu (45, 45, "A", 50, 50, 200) -***** error ecef2enu (45, 45, 100i, 50, 50, 200) -***** error ecef2enu (45, 45, 100, "A", 50, 200) -***** error ecef2enu (45, 45, 100, 50i, 50, 200) -***** error ecef2enu (45, 45, 100, 50, "A", 200) -***** error ecef2enu (45, 45, 100, 50, 50i, 200) -***** error ecef2enu (45, 45, 100, 50, 50, "A") -***** error ecef2enu (45, 45, 100, 50, 50, 200i) -***** error ecef2enu ([1 1], [2 2]', [3 3], 4, 5, 6) -***** error ecef2enu ([1 1], [2 2], [33], 4, 5, 6) -***** error ecef2enu ([1 1], [2 2], [3 3], [4 4], 5, 6) -***** 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 + [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 + [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/ecc2flat.m] +>>>>> /build/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/geodetic2ned.m] +>>>>> /build/octave-mapping-1.4.2/inst/geodetic2ned.m +***** test + lat = 42.002582; lon = -81.997752; alt = 1139.7; + lat0 = 42; lon0 = -82; alt0 = 200; + [n, e, d] = geodetic2ned (lat, lon, alt, lat0, lon0, alt0); + assert([n, e, d], [286.84, 186.28, -939.69], 10e-3); +***** test + Rad = deg2rad ([42.002582, -81.997752, 42, -82]); + alt = 1139.7; alt0 = 200; + [e, n, u] = geodetic2ned (Rad(1), Rad(2), alt, Rad(3), Rad(4), alt0, "rad"); + assert([e, n, u], [286.84, 186.28, -939.69], 10e-3); +***** test + [a, b, c] = ned2geodetic (-7134.8, -4556.3, 2852.4, 46.017, 7.750, 1673, 'wgs84'); + [d, e, f] = geodetic2ned (a, b, c, 46.017, 7.750, 1673); + assert ([d, e, f], [ -7134.8, -4556.3, 2852.4], 1e-6); +***** test + [n, e, d] = geodetic2ned (44.544, -72.814, 1340, 44.532, -72.782, 1699); + assert ([n, e, d], [1334.2518, -2543.5645, 359.6460], 1e-4); +***** error geodetic2ned (45, 45, 100, 50, 50, 200, "", "km") +***** error geodetic2ned ("A", 45, 100, 50, 50, 200) +***** error geodetic2ned (45i, 45, 100, 50, 50, 200) +***** error geodetic2ned (45, "A", 100, 50, 50, 200) +***** error geodetic2ned (45, 45i, 100, 50, 50, 200) +***** error geodetic2ned (45, 45, "A", 50, 50, 200) +***** error geodetic2ned (45, 45, 100i, 50, 50, 200) +***** error geodetic2ned (45, 45, 100, "A", 50, 200) +***** error geodetic2ned (45, 45, 100, 50i, 50, 200) +***** error geodetic2ned (45, 45, 100, 50, "A", 200) +***** error geodetic2ned (45, 45, 100, 50, 50i, 200) +***** 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/egm96geoid.m] +>>>>> /build/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/referenceEllipsoid.m] +>>>>> /build/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/isShapeMultipart.m] +>>>>> /build/octave-mapping-1.4.2/inst/isShapeMultipart.m +***** test + assert (isShapeMultipart ([0 1 0], [1 0 0]), 0); +***** 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/toDegrees.m] +>>>>> /build/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/octave-mapping-1.4.2/inst/scxsc.m +***** test + R1 = rad2deg (107.5 / earthRadius ("NM")); # Convert NM to deg + R2 = rad2deg (145 / earthRadius ("NM")); + [lat, lon, jj] = scxsc (37.673442, -90.234036, R1, 36.109997, -90.953669, R2); + assert (lat(1), 36.988778646, 1e-6); + assert (lon(1), -88.15335362, 1e-6); +***** test + [a, b, c] = gc2sc (45, [0:45:360], 45); + ## Correct a, must be 30 exactly degrees. reckon() is a bit inaccurate + a = -30 * ones (9, 1); + [d, e, f] = gc2sc (-45, -135, -45); + wst = warning ("off", "Octave:coinciding-small-circles", "local"); + [g, h] = scxsc (a, b, c, d, e, f); + warning (wst.state, "Octave:coinciding-small-circles"); + assert (g(2, 1), NaN); + assert ([g(9, 1) h(9, 1)], [-57.997936587 -102.76438968], 1e-6); +***** test + wst1 = warning ("off", "Octave:coinciding-small-circles", "local"); + wst2 = warning ("off", "Octave:no-intersecting-circles", "local"); + [~, ~, w] = scxsc (0, 0, 1, 0, [0, 2, 0, 2], [1, 1, 2, 1.5]); + warning (wst2.state, "Octave:no-intersecting-circles"); + warning (wst1.state, "Octave:coinciding-small-circles"); + assert (w, [3; 2; 1; 0], eps); +***** warning scxsc (45, 90, 1, -30, 60, 1); +***** warning scxsc (0, 0, 10, 0, 4, 2); +***** warning scxsc (0, 4, 3, 0, 0, 10); +***** error scxsc ("s", 0, 100, 10, 30, 0); +***** error scxsc (3i, 0, 100, 10, 30, 0); +***** error scxsc (50, "s", 100, 10, 30, 0); +***** error scxsc (50, 2i, 10, 10, 30, 0); +***** error scxsc (50, 0, "s", 10, 30, 0); +***** error scxsc (50, 0, 100i, 10, 30, 0); +***** error scxsc (50, 0, 100, "s", 30, 0); +***** error scxsc (50, 0, 100, 10i, 30, 0); +***** error scxsc (50, 0, 100, 10, "s", 0); +***** error scxsc (50, 0, 100, 10, 30i, 0); +***** error scxsc (50, 0, 100, 10, 30, "s"); +***** error scxsc (50, 0, 100, 10, 30, 2i); +***** error scxsc (50, 0, 100, 10, 30, 0, "f"); +***** error scxsc (50, 0, 100, 10, 30, 0, "degreef"); +***** error scxsc (190, 0, 90, -90.000001, 180, 80); +***** 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/enu2geodetic.m] >>>>> /build/octave-mapping-1.4.2/inst/enu2geodetic.m ***** test @@ -5669,152 +4966,269 @@ ***** 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/isShapeMultipart.m] ->>>>> /build/octave-mapping-1.4.2/inst/isShapeMultipart.m -***** test - assert (isShapeMultipart ([0 1 0], [1 0 0]), 0); +[inst/ned2aer.m] +>>>>> /build/octave-mapping-1.4.2/inst/ned2aer.m ***** 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/referenceEllipsoid.m] ->>>>> /build/octave-mapping-1.4.2/inst/referenceEllipsoid.m + [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/ecc2n.m] +>>>>> /build/octave-mapping-1.4.2/inst/ecc2n.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 ( " " ) + 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/distance.m] +>>>>> /build/octave-mapping-1.4.2/inst/distance.m +***** test + assert (distance ([37, -76], [37, -9]), 52.30942093, 1e-7) +***** test ## Very small distances, haversine formula + assert (distance (0, 0, 0, 1e-8), 1e-8, eps); +***** test ## Very large distance, spherical cosine formula. Sph.cos. degenerates + ## the least there + assert (distance (-90, 0, 89.999999, 0), 179.999999, 1e-6); +***** test + [d, az] = distance (0, 0, 0, pi, "radians"); + assert (d, pi, 1e-7) + assert (az, pi / 2, 1e-7) 4 tests, 4 passed, 0 known failure, 0 skipped -[inst/enu2uvw.m] ->>>>> /build/octave-mapping-1.4.2/inst/enu2uvw.m +[inst/str2angle.m] +>>>>> /build/octave-mapping-1.4.2/inst/str2angle.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) +***** 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 - [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/gc2sc.m] ->>>>> /build/octave-mapping-1.4.2/inst/gc2sc.m + tstc = strsplit (tst, "\n"); + assert (str2angle (tstc), res, 1e-3); ***** test - [lat, lon, radius] = gc2sc (60, 25, 60); - assert (lat, -25.6589, 1e-5) - assert (lon, 58.69006, 1e-5) + tstc = strjoin (strsplit (tst, "\n"), " "); + assert (str2angle (tstc), res, 1e-3); ***** 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/enu2ecef.m] ->>>>> /build/octave-mapping-1.4.2/inst/enu2ecef.m + assert (str2angle ('24E77''33" 25W43''57.7"'), [NaN, -25.7333], 1e-3); ***** 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) + 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/dm2degrees.m] +>>>>> /build/octave-mapping-1.4.2/inst/dm2degrees.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) + 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/geocentricLatitude.m] +>>>>> /build/octave-mapping-1.4.2/inst/geocentricLatitude.m ***** 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 -[inst/enu2aer.m] ->>>>> /build/octave-mapping-1.4.2/inst/enu2aer.m + 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/ned2geodetic.m] +>>>>> /build/octave-mapping-1.4.2/inst/ned2geodetic.m ***** test - [az, el, slantrange] = enu2aer (186.277521, 286.84222, 939.69262); - assert ([az, el, slantrange], [33, 70, 1e3], 10e-6) + [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 - [az, el, slantrange] = enu2aer (186.277521, 286.84222, 939.69262, "rad"); - assert ([az, el, slantrange], [0.57595865, 1.221730476, 1e3], 10e-6) + [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 - [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/rcurve.m] ->>>>> /build/octave-mapping-1.4.2/inst/rcurve.m + [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 - assert (rcurve ("", 45), 4517590.87885, 10e-6) + [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/ecef2enuv.m] +>>>>> /build/octave-mapping-1.4.2/inst/ecef2enuv.m ***** test - assert (rcurve ("", [45; 20]), [4517590.87885; 5995836.38390], 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 - assert (rcurve ("", [45, 20]), [4517590.87885, 5995836.38390], 10e-6) + [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/referenceSphere.m] +>>>>> /build/octave-mapping-1.4.2/inst/referenceSphere.m ***** test - assert (rcurve ("", [60 45; 35 20]), [3197104.58692, 4517590.87885; 5230426.84020, 5995836.38390], 10e-6) + 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/degrees2dms.m] +>>>>> /build/octave-mapping-1.4.2/inst/degrees2dms.m ***** test - assert (rcurve ("", "", 45), 4517590.87885, 10e-6) + 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/ecef2enu.m] +>>>>> /build/octave-mapping-1.4.2/inst/ecef2enu.m ***** test - assert (rcurve ("transverse", "", 45), 6388838.29012, 10e-6) + [e, n, u] = ecef2enu (660930.192761082, -4701424.222957011, 4246579.604632881, 42, -82, 200); + assert([e, n, u], [186.27752, 286.84222, 939.69262], 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 + Rad = deg2rad ([42, -82]); + [e, n, u] = ecef2enu (660930.192761082, -4701424.222957011, 4246579.604632881, Rad(1), Rad(2), 200, "rad"); + assert ([e, n, u], [186.28, 286.84, 939.69], 10e-3); +***** test + [a, b, c] = ecef2enu (5507528.9, 4556224.1, 6012820.8, 45.9132, 36.7484, 1877753.2); + assert ([a, b, c], [355601.2616, -923083.1558, 1041016.4238], 1e-4); +***** error ecef2enu (45, 45, 100, 50, 50, 200, "", "km") +***** error ecef2enu ("A", 45, 100, 50, 50, 200) +***** error ecef2enu (45i, 45, 100, 50, 50, 200) +***** error ecef2enu (45, "A", 100, 50, 50, 200) +***** error ecef2enu (45, 45i, 100, 50, 50, 200) +***** error ecef2enu (45, 45, "A", 50, 50, 200) +***** error ecef2enu (45, 45, 100i, 50, 50, 200) +***** error ecef2enu (45, 45, 100, "A", 50, 200) +***** error ecef2enu (45, 45, 100, 50i, 50, 200) +***** error ecef2enu (45, 45, 100, 50, "A", 200) +***** error ecef2enu (45, 45, 100, 50, 50i, 200) +***** error ecef2enu (45, 45, 100, 50, 50, "A") +***** error ecef2enu (45, 45, 100, 50, 50, 200i) +***** error ecef2enu ([1 1], [2 2]', [3 3], 4, 5, 6) +***** error ecef2enu ([1 1], [2 2], [33], 4, 5, 6) +***** error ecef2enu ([1 1], [2 2], [3 3], [4 4], 5, 6) +***** 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/km2rad.m] +>>>>> /build/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/flat2ecc.m] >>>>> /build/octave-mapping-1.4.2/inst/flat2ecc.m ***** test @@ -5825,58 +5239,487 @@ ***** error flat2ecc ("a") ***** error flat2ecc(1) 3 tests, 3 passed, 0 known failure, 0 skipped -[inst/fromDegrees.m] ->>>>> /build/octave-mapping-1.4.2/inst/fromDegrees.m +[inst/gcxsc.m] +>>>>> /build/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/geodeticarc.m] +>>>>> /build/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/radtodeg.m] +>>>>> /build/octave-mapping-1.4.2/inst/radtodeg.m +***** assert (radtodeg(pi),180,10*eps) +1 test, 1 passed, 0 known failure, 0 skipped +[inst/deg2nm.m] +>>>>> /build/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/wrapTo360.m] +>>>>> /build/octave-mapping-1.4.2/inst/wrapTo360.m +***** 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)) +***** 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/ecef2aer.m] +>>>>> /build/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/aer2ecef.m] +>>>>> /build/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/geodeticLatitudeFromParametric.m] +>>>>> /build/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/axes2ecc.m] +>>>>> /build/octave-mapping-1.4.2/inst/axes2ecc.m +***** test + semimajor = 6378137; + semiminor = 6356752.314245; + Earth = [ semimajor, semiminor ]; + Jupiter = [ 71492 , 66854 ]; + Planets = [ Jupiter ; Earth ]; + assert (axes2ecc (semimajor, semiminor), 0.0818191908429654, 10e-12); + assert (axes2ecc (Earth), 0.0818191908429654, 10e-12); + assert (axes2ecc (Planets), [ 0.354316379; 0.081819190843 ], 10e-10); + assert (axes2ecc (Planets(:, 1), Planets(:, 2)), [ 0.354316379; 0.081819190843 ], 10e-10); +***** error axes2ecc ("a", 1); +***** error axes2ecc ([1; 2]); +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/n2ecc.m] +>>>>> /build/octave-mapping-1.4.2/inst/n2ecc.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") + n_earth = 0.001679221647179929; + n_jupiter = 0.03352464537391420; + n_vec = [ n_earth n_jupiter ]; + assert (n2ecc (n_earth) , .081819221456 , 10e-12); + assert (n2ecc (n_vec), [0.08181922 0.3543164], 10e-8) +***** error n2ecc ("n") +***** error n2ecc (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/departure.m] +>>>>> /build/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/rect2geo.m] +>>>>> /build/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 rect2geo ("s") +***** error rect2geo (5i) +3 tests, 3 passed, 0 known failure, 0 skipped +[inst/makesymbolspec.m] +>>>>> /build/octave-mapping-1.4.2/inst/makesymbolspec.m +***** 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/parametricLatitude.m] ->>>>> /build/octave-mapping-1.4.2/inst/parametricLatitude.m +[inst/nm2km.m] +>>>>> /build/octave-mapping-1.4.2/inst/nm2km.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") + 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/closePolygonParts.m] +>>>>> /build/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/geo2iso.m] ->>>>> /build/octave-mapping-1.4.2/inst/geo2iso.m +[inst/rad2nm.m] +>>>>> /build/octave-mapping-1.4.2/inst/rad2nm.m ***** test - psi = geo2iso (45); - assert (psi, 50.227465817, 1e-6) +***** 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/nm2sm.m] +>>>>> /build/octave-mapping-1.4.2/inst/nm2sm.m ***** test - psi = geo2iso ([-90 90]); - assert (psi, [-Inf Inf]) + 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/earthRadius.m] +>>>>> /build/octave-mapping-1.4.2/inst/earthRadius.m ***** 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) + radius = earthRadius / 1000;; + assert (earthRadius ("km"), radius); +1 test, 1 passed, 0 known failure, 0 skipped +[inst/sm2rad.m] +>>>>> /build/octave-mapping-1.4.2/inst/sm2rad.m +***** test + ratio = unitsratio ('km','sm'); + assert (sm2rad (10), km2rad (ratio*10), 10*eps); + 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/rad2sm.m] +>>>>> /build/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/geodeticfwd.m] +>>>>> /build/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/degrees2dm.m] +>>>>> /build/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/wrapTo180.m] +>>>>> /build/octave-mapping-1.4.2/inst/wrapTo180.m +***** 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)) +***** 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/dms2degrees.m] +>>>>> /build/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/vincenty.m] +>>>>> /build/octave-mapping-1.4.2/inst/vincenty.m +***** test + 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/gcxgc.m] +>>>>> /build/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/validateLengthUnit.m] +>>>>> /build/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/sm2deg.m] +>>>>> /build/octave-mapping-1.4.2/inst/sm2deg.m +***** 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 [inst/wrapToPi.m] >>>>> /build/octave-mapping-1.4.2/inst/wrapToPi.m ***** test @@ -5891,6 +5734,33 @@ [-pi, -pi, pi-1, 0.00000 ; ... pi-1, pi, -pi+1, pi], 1e-13) 2 tests, 2 passed, 0 known failure, 0 skipped +[inst/rcurve.m] +>>>>> /build/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/deg2km.m] +>>>>> /build/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/shapewrite.m] >>>>> /build/octave-mapping-1.4.2/inst/shapewrite.m ***** test @@ -5989,34 +5859,207 @@ unlink ([fname ".shp"]); unlink ([fname ".shx"]); 2 tests, 2 passed, 0 known failure, 0 skipped -[inst/rad2nm.m] ->>>>> /build/octave-mapping-1.4.2/inst/rad2nm.m +[inst/geodetic2ecef.m] +>>>>> /build/octave-mapping-1.4.2/inst/geodetic2ecef.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) -5 tests, 5 passed, 0 known failure, 0 skipped -[inst/degtorad.m] ->>>>> /build/octave-mapping-1.4.2/inst/degtorad.m -***** assert (degtorad(180),pi,10*eps) -1 test, 1 passed, 0 known failure, 0 skipped -[inst/rad2sm.m] ->>>>> /build/octave-mapping-1.4.2/inst/rad2sm.m +***** 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 -***** 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/deg2nm.m] ->>>>> /build/octave-mapping-1.4.2/inst/deg2nm.m + 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/toRadians.m] +>>>>> /build/octave-mapping-1.4.2/inst/toRadians.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 + 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/areaquad.m] +>>>>> /build/octave-mapping-1.4.2/inst/areaquad.m +***** test + aq = areaquad (-90, 0, 90, 360); + assert (aq, 1, 1e-8); +***** test + aq = areaquad (-pi / 2, 0, pi / 2, 2 * pi,"r"); + assert (aq, 1, 1e-8); +***** test + aq = areaquad (0, 0, 90, 360, "wgs84"); + assert (aq, 2.5503281086204421875e+14, 1e-8); +***** test + aq = areaquad(-90,0,90,360,[0 6000]); + assert (aq, 4 * pi * 6000 ^ 2, 1e-8) +***** test + aq = areaquad(-90,0,90,360,[6000 0]); + assert (aq, 4 * pi * 6000 ^ 2, 1e-8) +***** test + aq = areaquad(-90,0,90,360,[1 0]); + assert (aq, 4 * pi, 1e-8) +***** test + aq = areaquad(-90,0,90,360,[0 1]); + assert (aq, 4 * pi, 1e-8) +***** 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/rad2km.m] +>>>>> /build/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/ecef2nedv.m] +>>>>> /build/octave-mapping-1.4.2/inst/ecef2nedv.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); +***** 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); +***** 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/ned2ecefv.m] +>>>>> /build/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) +***** 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); +***** 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/km2sm.m] +>>>>> /build/octave-mapping-1.4.2/inst/km2sm.m +***** 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 +[inst/geo2con.m] +>>>>> /build/octave-mapping-1.4.2/inst/geo2con.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/geodeticLatitudeFromGeocentric.m] +>>>>> /build/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 Checking C++ files ... Summary: 1359 tests, 1359 passed, 0 known failures, 0 skipped dh_installdocs -O--buildsystem=octave @@ -6042,8 +6085,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' in '../octave-mapping_1.4.2-3_i386.deb'. -dpkg-deb: building package 'octave-mapping-dbgsym' in '../octave-mapping-dbgsym_1.4.2-3_i386.deb'. +dpkg-deb: Paket »octave-mapping« wird in »../octave-mapping_1.4.2-3_i386.deb« gebaut. +dpkg-deb: Paket »octave-mapping-dbgsym« wird in »../octave-mapping-dbgsym_1.4.2-3_i386.deb« gebaut. dpkg-genbuildinfo --build=binary -O../octave-mapping_1.4.2-3_i386.buildinfo dpkg-genchanges --build=binary -O../octave-mapping_1.4.2-3_i386.changes dpkg-genchanges: info: binary-only upload (no source code included) @@ -6051,12 +6094,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/12047/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/12047/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/97200 and its subdirectories -I: Current time: Tue May 28 18:52:08 -12 2024 -I: pbuilder-time-stamp: 1716965528 +I: removing directory /srv/workspace/pbuilder/12047 and its subdirectories +I: Current time: Thu Apr 27 14:33:00 +14 2023 +I: pbuilder-time-stamp: 1682555580