X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Ftest-up.cxx;h=48de4b7ed84885df4cf50e988cfce1e989b72759;hb=d0bbe1f45dbefba65a1e8a3d4ed82e294efc8d9d;hp=9564720b87d2cca0a56e4af7f077e54a9ec8051e;hpb=59e811fb443ea857ba6aceb1da368838276fe801;p=flightgear.git diff --git a/tests/test-up.cxx b/tests/test-up.cxx index 9564720b8..48de4b7ed 100644 --- a/tests/test-up.cxx +++ b/tests/test-up.cxx @@ -1,12 +1,21 @@ // do some test relating to the concept of "up" -#include +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include STL_IOSTREAM #include #include #include +SG_USING_STD(cout); +SG_USING_STD(endl); + int main() { // for each lat/lon given in goedetic coordinates, calculate // geocentric coordinates, cartesian coordinates, the local "up" @@ -21,10 +30,10 @@ int main() { cout << "lon = " << lon << " geod lat = " << lat; double sl_radius, lat_geoc; - sgGeodToGeoc( lat * DEG_TO_RAD, alt, &sl_radius, &lat_geoc ); - cout << " geoc lat = " << lat_geoc * RAD_TO_DEG << endl; + sgGeodToGeoc( lat * SGD_DEGREES_TO_RADIANS, alt, &sl_radius, &lat_geoc ); + cout << " geoc lat = " << lat_geoc * SGD_RADIANS_TO_DEGREES << endl; - Point3D pgd( lon * DEG_TO_RAD, lat * DEG_TO_RAD, 0.0 ); + Point3D pgd( lon * SGD_DEGREES_TO_RADIANS, lat * SGD_DEGREES_TO_RADIANS, 0.0 ); Point3D pc = sgGeodToCart( pgd ); cout << " cartesian = " << pc << endl; @@ -37,7 +46,7 @@ int main() { sgdMat4 GEOC_UP; sgdVec3 geoc_up; - sgdMakeRotMat4( GEOC_UP, lon, 0.0, -lat_geoc * RAD_TO_DEG ); + sgdMakeRotMat4( GEOC_UP, lon, 0.0, -lat_geoc * SGD_RADIANS_TO_DEGREES ); sgdSetVec3( geoc_up, GEOC_UP[0][0], GEOC_UP[0][1], GEOC_UP[0][2] ); cout << " geoc up = " << geoc_up[0] << ", " << geoc_up[1] << ", " << geoc_up[2] << endl;