<HTML><FONT FACE=arial,helvetica><HTML><FONT COLOR="#000000" FACE="Palatino" FAMILY="SERIF" SIZE="2"><BR>
At this very moment I happen to be sitting in the first session of Map Projections oral presentations at the ICC biannual conference of the International Cartographic Association, so my attention and resources are a little limited. However, it seems to me that you are computing the wrong integral. The integral you give calculates the arc length from the pole to 10 degrees south of it, not from the equator. That seems quite apparent from the way you set it up. You need to subtract your result from the complete elliptic integral.<BR>
<BR>
I have checked the proj result with my own completely independent implementation. The proj result is correct.<BR>
<BR>
Regards,<BR>
<BR>
daan Strebe<BR>
Chair, Commission on Map Projections<BR>
International Cartographic Association<BR>
</FONT><FONT COLOR="#000000" FACE="Palatino" FAMILY="SERIF" SIZE="2"><BR>
----- Original Message -----<BR>
From: "Peter Albert" <peter.albert@gmx.de><BR>
To: <proj@xserve.flids.com><BR>
Sent: Tuesday, July 12, 2005 10:24 AM<BR>
Subject: [Proj] wrong computation of meridinal distance / pj mlfn.c<BR>
<BR>
<BR>
> Dear all,<BR>
><BR>
> I am new to proj and also relatively new to projection in general;however,<BR>
> I think I found a problem in how the meridinal distance is approximated in<BR>
> proj (using the subroutine in pj_mlfn.c).<BR>
><BR>
> Actually, it seems to me as if the meridinal distance on a given ellipsoid<BR>
> is not calculated from the equator to the given (geodetic) latitude but<BR>
> between the Pole and (90° - the appropriate geocentric latitude)!<BR>
><BR>
> Let me give you an example: For the sake of simplicity, let the major axis<BR>
> of our ellipsoid be a = 1.0 and the squared eccentricity es = 0.007.<BR>
><BR>
> Let the geodetic latitude be 10N, then the appropriate geocentric latitude<BR>
> calculates to 9.931398465N.<BR>
><BR>
> (Following this transformation:<BR>
> float(arctan((a-es*a)/a*tan(10*PI/180))*180/PI)<BR>
> )<BR>
><BR>
> Now, if I understand the sinusoidal projection correctly, then the<BR>
> y-coordinate of a given point in this projection should just equal its<BR>
> meridinal distance from the equator, in our case:<BR>
><BR>
> echo "0 10" | proj +proj=sinu +a=1.0 +es=0.007 -f %.8f | cut -f 2<BR>
><BR>
> The result is 0.17332956, which generally makes sense given the major axis<BR>
> being set to 1. (If I choose a realistic ellipsoid, the resulting value is<BR>
> just 0.17332956 times a.)<BR>
><BR>
> Just to be sure, let's cross-check my calculation of geocentric latitude<BR>
> by<BR>
> adding "+geoc" to the previous call and using the geocentric latitude<BR>
> instead of 10N:<BR>
><BR>
> echo "0 9.931398465" | proj +geoc +proj=sinu +a=1.0 +es=0.007 -f %.8f |<BR>
> cut -f 2<BR>
><BR>
> gives 0.17332956, no problems so far.<BR>
><BR>
> However, now I tried to calculate the elliptical integral myself, i.e.<BR>
> int(sqrt(a-es*(cos(t)^2)) dt) from the equator up to the given geocentric<BR>
> latitude. I did this using mupad, a computer algebra system:<BR>
><BR>
> numeric::int(sqrt(1.0-0.007*(cos(x))^2), x=0..9.931398465*PI/180)<BR>
><BR>
> The result now is 0.1727339231, which significantly differs from the proj<BR>
> output.<BR>
><BR>
> However, if you integrate from 90° - the geocentric latitude up to the<BR>
> pole<BR>
> like this:<BR>
><BR>
> numeric::int(sqrt(1.0-0.007*(cos(x))^2),<BR>
> x=(90-9.931398465)*PI/180..90*PI/180)<BR>
><BR>
> then you get 0.1733295629, which perfectly matches proj's results.<BR>
><BR>
><BR>
><BR>
> I would greatly appreciate if someone could tell me whether I really got<BR>
> something wrong here, or if there actually is a problem in proj. I looked<BR>
> into the code, and the meridinal distance is unfortunately approximated<BR>
> using a weird 8th order polynomial which I can't say anything about ...<BR>
><BR>
> Thanks in advance and kind regards,<BR>
><BR>
> Peter<BR>
><BR>
><BR>
> P.S.: BTW, I am using proj-4.4.9<BR>
><BR>
><BR>
> --<BR>
> 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail<BR>
> +++ GMX - die erste Adresse für Mail, Message, More +++<BR>
> _______________________________________________<BR>
> Proj mailing list<BR>
> Proj@xserve.flids.com<BR>
> http://xserve.flids.com/mailman/listinfo/proj<BR>
><BR>
<BR>
</FONT><FONT COLOR="#000000" FACE="Palatino" FAMILY="SERIF" SIZE="2"></FONT></HTML>