svn-gvsig-desktop / trunk / libraries / libjni-proj4 / src / pj_qsfn.c @ 7098
History | View | Annotate | Download (422 Bytes)
1 |
/* determine small q */
|
---|---|
2 |
#ifndef lint
|
3 |
static const char SCCSID[]="@(#)pj_qsfn.c 4.3 93/06/12 GIE REL"; |
4 |
#endif
|
5 |
#include <math.h> |
6 |
#include <projects.h> |
7 |
|
8 |
# define EPSILON 1.0e-7 |
9 |
double
|
10 |
pj_qsfn(double sinphi, double e, double one_es) { |
11 |
double con;
|
12 |
|
13 |
if (e >= EPSILON) {
|
14 |
con = e * sinphi; |
15 |
return (one_es * (sinphi / (1. - con * con) - |
16 |
(.5 / e) * log ((1. - con) / (1. + con)))); |
17 |
} else
|
18 |
return (sinphi + sinphi);
|
19 |
} |