Update of /cvsroot/gcblue/gcb_wx/src/common
In directory sc8-pr-cvs1:/tmp/cvs-serv11677/src/common
Modified Files:
simmath.cpp
Log Message:
Index: simmath.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/common/simmath.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** simmath.cpp 28 Oct 2003 12:32:34 -0000 1.3
--- simmath.cpp 8 Jan 2004 23:54:27 -0000 1.4
***************
*** 302,306 ****
(float)k.mfLat_rad,(float)k.mfLon_rad);
}
! // returns range in km including altitude difference
float tcKinematics::RangeToKmAlt(tcKinematics& k) {
return C_RADTOKM * nsNav::GCDistanceApprox_rad((float)mfLat_rad,(float)mfLon_rad,
--- 302,308 ----
(float)k.mfLat_rad,(float)k.mfLon_rad);
}
! /**
! * @return range in km including range due to altitude difference
! */
float tcKinematics::RangeToKmAlt(tcKinematics& k) {
return C_RADTOKM * nsNav::GCDistanceApprox_rad((float)mfLat_rad,(float)mfLon_rad,
***************
*** 314,317 ****
--- 316,332 ----
}
+ /**
+ * @return approximate range in km, altitude difference is neglected
+ */
+ float tcKinematics::RangeToKm(const tcTrack& track)
+ {
+ float lat_rad = (float)track.mfLat_rad;
+ float lon_rad = (float)track.mfLon_rad;
+ return C_RADTOKM * nsNav::GCDistanceApprox_rad((float)mfLat_rad,(float)mfLon_rad,
+ lat_rad,lon_rad);
+ }
+
+
+
void tcKinematics::Serialize(tcFile& file, bool abLoad) {
if (abLoad) {
***************
*** 339,343 ****
}
! void tcKinematics::GetInterceptData2D(tcTrack& track,
float& rfHeading_rad, float& rfTimeToIntercept) {
float dx,dy;
--- 354,358 ----
}
! void tcKinematics::GetInterceptData2D(const tcTrack& track,
float& rfHeading_rad, float& rfTimeToIntercept) {
float dx,dy;
***************
*** 383,387 ****
}
! void tcKinematics::GetInterceptData3D(tcTrack& track, float& rfHeading_rad,
float& rfClimbAngle_rad, float& rfTimeToIntercept, float& rfRange_rad)
{
--- 398,402 ----
}
! void tcKinematics::GetInterceptData3D(const tcTrack& track, float& rfHeading_rad,
float& rfClimbAngle_rad, float& rfTimeToIntercept, float& rfRange_rad)
{
|