typedef struct { double x, y; } point_xy; typedef struct { double λ, φ; } point_λφ; typedef struct projection projection; typedef struct elliptic elliptic; struct projection { point_λφ o; point_xy false; double M₀, /* arc measure to φ₀*/ k₀; /* scale at λ₀ */ point_λφ (*λφ)(point_xy, elliptic *, projection *); /* conversion routines */ point_xy (*xy)(point_λφ, elliptic *, projection *); int (*init)(projection*, elliptic*, char*); char *description; }; struct elliptic { double a, /* major axis */ b, /* minor axis */ f, /* flattening */ e⁲, /* first */ E⁲, /* second */ *en; /* arc params */ }; double lenMarc(double φ, double Sφ, double Cφ, struct elliptic *ell); double arcMlen(double y, struct elliptic *ell); double *ell_en_init(struct elliptic *ell); int get_ell(struct elliptic *ell, char *name); int get_projection(projection *p, char *name); int tmin(projection*, elliptic*, char*); int utmin(projection*, elliptic*, char*);