octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #9974] [octave forge](mapping) gc2sc scxsc


From: Philip Nienhuis
Subject: [Octave-patch-tracker] [patch #9974] [octave forge](mapping) gc2sc scxsc gcxsc
Date: Tue, 22 Sep 2020 15:28:39 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #2, patch #9974 (project octave):

Playing around with gc2sc.m and scxsc.m yields a few issues:

* gc2sc with vector arguments always returns a scalar for radius.
Cause:
  range = pi / 2;
  radius = range;
...should read:
  range = pi / 2;
  radius = repmat (range, size (vect(:, 1)));
and a little lower:
    radius = rad2deg (range);
...should read:
    radius = rad2deg (radius);
and then it's fixed.

I'll fix gc2sc.m and polish some style things and push it soon.

Then, 
* scxsc.m doesn't really accept vectors.
Copying over L.94-112 from gcxgc.m before L.111 fixes that but then still the
code doesn't work properly.
What I did:

## These are copied from test #3 in gcxgc:
[a, b, c] = gc2sc (45, [0:45:360], 45)
[d, e, f] = gc2sc (-45, -135, -45)
## and then just:
>> [g, h] = scxsc (a, b, c, d, e, f)
g =
   NaN   NaN
h =
   NaN   NaN


However, feeding entries from a, b, and c one by one yields correct results
when compared with the results of test #3 in gcxgc run as:
[lats, lons, idl] = gcxgc (45, [0:45:360], 45, -45, -135, -45)
e.g.,:

>> id = 3; [g, h] = scxsc (a(id), b(id), c(id), d,  e, f)
g =
   57.998  -57.998
h =
   122.236   -57.764


* I didn't see any scxsc warnings for coinciding circles (id = 2 and 6), NaNs
should be returned there.

Could you please fix the above issue in scxsc?

In the mean time I'll next look at gcxsc.m.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?9974>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]