set_SemiMajor Method

WRAPPER_API void set_SemiMajor(LinearValue &value)

 

Description

The set_SemiMajor method sets the length of the semi-major radius of this Ellipsoid.  

 

Example

void Ellipsoid_setSemiMajor(GeoCalcPBW::DataSource & data)

{

GeoCalcPBW::Ellipsoid ell;

GeoCalcPBW::LinearValue semiMaj;

semiMaj.set_InMeters(6378137);

ell.set_SemiMajor(semiMaj);

ell.set_InvFlatDefinitive(true);

ell.set_InverseFlattening(298.257223563);

 

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);

double azimuth = 1.004;

double geodesic = 1336;

if(! ell.ComputeDirect(*fromPt, geodesic, azimuth, *toPt))

{

AfxMessageBox("ComputeDirect failed");

}

 

delete fromPt;

delete toPt;

}