WRAPPER_API void set_InverseFlattening(double value)
The set_InverseFlattening method sets the inverse flattening value for this Ellipsoid. If the value of InvFlatDefinitive is false, then setting this property will not affect the Ellipsoid. If InvFlatDefinitive is true, then setting this value will affect the value of the Eccentricity, EccentricitySquared, and SemiMinor properties.
If the argument to this method is less than 1, a GeoCalcException will be thrown.
void Ellipsoid_setInverseFlattening(GEOCALCPBW_NAMESPACE::DataSource & data)
{
GEOCALCPBW_NAMESPACE::Ellipsoid ell;
GEOCALCPBW_NAMESPACE::LinearValue semiMaj;
semiMaj.set_InMeters(6378137);
ell.set_SemiMajor(semiMaj);
ell.set_InvFlatDefinitive(true);
ell.set_InverseFlattening(298.257223563);
GEOCALCPBW_NAMESPACE::GeodeticPoint * fromPt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");
GEOCALCPBW_NAMESPACE::GeodeticPoint * toPt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");
fromPt->set_InUnits(-77.36, 45.45);
double azimuth = 1.004;
double geodesic = 1336;
if(! ell.ComputeDirect(*fromPt, geodesic, azimuth, *toPt))
{
AfxMessageBox("ComputeDirect failed");
}
delete fromPt;
delete toPt;
}