IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#550 closed defect (fixed)

psSphereRotInvert enhancement

Reported by: David.Robbins@… Owned by: Paul Price
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc:

Description

the function, psSphereRotInvert needs a little tweaking. While it can work the
way that it is currently spec'd, I suggest the following:

Drop the return of psSphereRot* and either allow the function to return void or
bool. Next, add a second argument to the function that is consistent with the
other functions. Namely, make the first argument a psSphereRot *out. ie,
psSphereRotInvert(psSphereRot *out, const psSphereRot *rot) <-(I'd actually
change "rot" to "in").

Doing this would allow the user to call the function such as,
psSphereRotInvert(rot, rot)
and have the same functionality as the current spec. HOWEVER, it would also
allow the user to keep both transformations which is especially useful when
doing transformations.

Change History (3)

comment:1 by Paul Price, 21 years ago

Status: newassigned

So you would like to be able to get a new psSphereRot out of psSphereRotInvert?

How about:

psSphereRot *psSphereRotInvert(psSphereRot *out, const psSphereRot *in);

This allows us to either get a new one (out=NULL), or alter one in-place (out=in).

comment:2 by David.Robbins@…, 21 years ago

Resolution: fixed
Status: assignedclosed

Due to the update on the specifications you sent me, I have done the following:

psSphereRot *psSphereRotInvert(alphaP, deltaP, phiP);
So that this returns psSphereRotAlloc(-phiP, -deltaP, -alphaP)

and

psSphereRot *psSphereRotConjugate(psSphereRot *out, const psSphereRot *in)
which was formerly the invert function and returns -q0, -q1, -q2, q3

any problems with this?

comment:3 by Paul Price, 21 years ago

Looks good.

Note: See TracTickets for help on using tickets.