#240 closed defect (fixed)
psSphereTransformAlloc()
| Reported by: | Owned by: | Paul Price | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | PSLib SDRS | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
psSphereTransformAlloc() has parameters for the North Pole longitude and the
North Pole Latitude. However, the psSphereTransform struct only has members for
the lattitude. Something doesn't make sense to me. Furthermore the code I
implemented was based onan erroneous intermediate state based on bugzilla bug 116.
Can you specify the algorithm for setting the members of the psSphereTransform
struct when psSphereTransformAlloc() is called? How are the NPlon and ZP
parameters used?
Change History (4)
comment:1 by , 22 years ago
| Status: | new → assigned |
|---|
comment:2 by , 22 years ago
I don't have any preference for the names of the psSphereTransform structure
other than that they should agree with the names chosen for the variables in the
ADD which define how those members are used.
Also, I'm still stuck on the original question in this bug:
Can you specify the algorithm for setting the members of the psSphereTransform
struct when psSphereTransformAlloc() is called? How are the NPlon and ZP
parameters used?
comment:3 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Renamed the elements in the psSphereTransform structure to more clearly
correspond to the concepts in the ADD. If the behaviour of the constructor is
now not obvious, please let me know.
\begin{verbatim}
typedef struct {
double cosDeltaP; /< Cosine of target pole latitude in the
source system
double sinDeltaP; /< Sine of target pole latitude in the source system
double alphaP; /< Longitude of the target system pole in the source
system
double phiP; /< Longitude of the ascending node in the target system
} psSphereTransform;
\end{verbatim}
The constructor is defined as follows:
\begin{verbatim}
psSphereTransform *psSphereTransformAlloc(double alphaP, double deltaP, double
phiP);
\end{verbatim}
where \code{alphaP} and \code{deltaP} define the coordinates in the
input system of the north pole in the output system and \code{phiP}
defines the longitude in the input system of the equatorial
intersection between the two systems (e.g, the first point of Ares).
The constructor must calculate the sines and cosines above.

If it helps, please feel free to suggest new names for the elements of
psSphereTransform. I don't have a strong preference as to what goes in there,
since it is an opaque data structure to the user; the intent is to precalculate
the sines and cosines so that rotations may be performed simply and quickly.