[Gcblue-commits] gcb_wx/src/common math_constants.cpp,1.4,1.5 nsNav.cpp,1.7,1.8
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-01 00:14:09
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/src/common Modified Files: math_constants.cpp nsNav.cpp Log Message: namespace housekeeping Index: nsNav.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/nsNav.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** nsNav.cpp 8 Aug 2004 00:31:33 -0000 1.7 --- nsNav.cpp 1 Jun 2005 00:13:28 -0000 1.8 *************** *** 18,24 **** */ ! #include "wx/wx.h" ! #ifdef WIN32 ! #include "wx/msw/private.h" // for MS Windows specific definitions #endif --- 18,25 ---- */ ! #include "stdwx.h" ! ! #ifndef WX_PRECOMP ! #include "wx/wx.h" #endif *************** *** 34,38 **** // both points are assumed to be at sea level #define GCDISTANCE_APPROXDELTA 2.0f*C_PIOVER180 ! float nsNav::GCDistance_rad(tsGeoPointRad a, tsGeoPointRad b) { float fDeltaLat = fabsf(a.mfLat_rad - b.mfLat_rad); --- 35,41 ---- // both points are assumed to be at sea level #define GCDISTANCE_APPROXDELTA 2.0f*C_PIOVER180 ! ! float nsNav::GCDistance_rad(tsGeoPointRad a, tsGeoPointRad b) ! { float fDeltaLat = fabsf(a.mfLat_rad - b.mfLat_rad); *************** *** 56,60 **** } } ! // version that always uses approximation float nsNav::GCDistanceApprox_rad(tsGeoPointRad a, tsGeoPointRad b) { --- 59,66 ---- } } ! ! /** ! * version that always uses approximation ! */ float nsNav::GCDistanceApprox_rad(tsGeoPointRad a, tsGeoPointRad b) { *************** *** 83,86 **** --- 89,94 ---- return sqrtf(fDeltaLat*fDeltaLat + adjustedLon*adjustedLon); } + + float nsNav::GCDistanceApprox_rad(float afLatA_rad, float afLonA_rad, float afLatB_rad, float afLonB_rad, *************** *** 98,101 **** --- 106,110 ---- return sqrtf(fDeltaLat*fDeltaLat + adjustedLon*adjustedLon + fDeltaAlt*fDeltaAlt); } + /** * great circle heading from point a to point b *************** *** 279,280 **** --- 288,290 ---- } + Index: math_constants.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/math_constants.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** math_constants.cpp 8 Aug 2004 00:31:33 -0000 1.4 --- math_constants.cpp 1 Jun 2005 00:13:28 -0000 1.5 *************** *** 21,30 **** #include "math_constants.h" ! namespace UnitConversions { ! double toRadians(double deg) {return C_PIOVER180*deg;} ! float toRadians(float deg) {return C_PIOVER180*deg;} ! double toDegrees(double rad) {return C_180OVERPI*rad;} ! float toDegrees(float rad) {return C_180OVERPI*rad;} } --- 21,44 ---- #include "math_constants.h" ! ! double UnitConversions::toRadians(double deg) { ! return C_PIOVER180*deg; ! } ! ! float UnitConversions::toRadians(float deg) ! { ! return C_PIOVER180*deg; ! } ! ! double UnitConversions::toDegrees(double rad) ! { ! return C_180OVERPI*rad; } + float UnitConversions::toDegrees(float rad) + { + return C_180OVERPI*rad; + } + + |