WRAPPER_API static Ellipsoid* CreateEllipsoid()
The CreateEllipsoid constructor creates a new instance of the Ellipsoid class. Upon construction, The Ellipsoid has a SemiMajor radius of one meter, a SemiMinor radius of 1 meter, and InvFlatDefinitive set to true.
void Ellipsoid_CreateEllipsoid(GeoCalcPBW::DataSource & data)
{
GeoCalcPBW::Ellipsoid * ell = GeoCalcPBW::Ellipsoid::CreateEllipsoid();
GeoCalcPBW::LinearValue semiMaj;
semiMaj.set_InMeters(6378137);
ell->set_SemiMajor(semiMaj);
ell->set_InvFlatDefinitive(false);
GeoCalcPBW::LinearValue semiMin;
semiMin.set_InMeters(6356752.31424518);
ell->set_SemiMinor(semiMin);
GeoCalcPBW::GeodeticPoint * fromPt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");
GeoCalcPBW::GeodeticPoint * toPt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");
fromPt->set_InUnits(-77.36, 45.45);
toPt->set_InUnits(-77.43, 46.68);
double azimuthAhead;
double azimuthBack;
double geodesic;
if(! ell->ComputeInverse(*fromPt, *toPt, geodesic, azimuthAhead, azimuthBack))
{
AfxMessageBox("ComputeInverse failed");
}
delete ell;
delete fromPt;
delete toPt;
}