// (C)2007 Attila Kovacs <attila@submm.caltech.edu>



public class GeodesicCoordinates extends SphericalCoordinates {	
	public GeodesicCoordinates() {}
	
	public GeodesicCoordinates(String text) { super(text); }
	
	public GeodesicCoordinates(double lon, double lat) { super(lon, lat); }
	
	// Approximation for converting geocentric to geodesic coordinates.
	// Marik: Csillagaszat (1989)
	// based on Woolard & Clemence: Spherical Astronomy (1966)
	public GeodesicCoordinates(GeocentricCoordinates geocentric) {
		x = geocentric.x;
		y = geocentric.y + X * Math.sin(2.0 * geocentric.y);
	}
	
	public final static double a = 6378137.0 * Unit.m; // Earth major axis
	public final static double b = 6356752.3 * Unit.m; // Earth minor axis
	
	public final static double f = 1.0 / 298257.0; // Flattening of Earth (Marik: Csillagaszat)
	private final static double X = 103132.4 * Unit.deg * (2.0 * f - f*f); // Approximation term for geodesic conversion (Marik: Csillagaszat)
	
	// TODO verify units of X...
	
}
