[Gcblue-commits] gcb_wx/src/scriptinterface tcPlatformInterface.cpp,1.12,1.13 tcPlatformInterfaceExt
Status: Alpha
Brought to you by:
ddcforge
|
From: <ddc...@us...> - 2004-01-08 23:54:30
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface
In directory sc8-pr-cvs1:/tmp/cvs-serv11677/src/scriptinterface
Modified Files:
tcPlatformInterface.cpp tcPlatformInterfaceExtension.cpp
tcPlatformInterfaceExtensionB.cpp
Log Message:
Index: tcPlatformInterface.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterface.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** tcPlatformInterface.cpp 5 Jan 2004 02:48:03 -0000 1.12
--- tcPlatformInterface.cpp 8 Jan 2004 23:54:27 -0000 1.13
***************
*** 531,539 ****
}
/**
* @param track Track to intercept.
* @return intercept heading to track in radians.
*/
! float tcPlatformInterface::GetInterceptHeadingToTrack(tcTrack track)
{
float fHeading_rad, fTTI;
--- 531,577 ----
}
+ tcTrackList tcPlatformInterface::GetTrackList(int anClassMask,
+ float afMaxRange_km, UINT8 anAffiliation)
+ {
+ tcTrackList trackList;
+
+ tcTrack *pTrack;
+
+ wxASSERT(mpSensorMap);
+
+ int nCount = mpSensorMap->GetTrackCount();
+ if (nCount==0)
+ {
+ return trackList;
+ }
+
+ tnPoolIndex nPos = mpSensorMap->GetStartTrackPosition();
+ for(int n=0;n<nCount;n++)
+ {
+ mpSensorMap->GetNextTrack(nPos, pTrack);
+ bool bAffilMatch = (pTrack->mnAffiliation == anAffiliation) ||
+ (pTrack->mnAffiliation == UNKNOWN);
+ if ((bAffilMatch)&&(pTrack->mnClassification & anClassMask))
+ {
+ tsGeoPoint p;
+ p.mfAlt_m = 0;
+ p.mfLat_rad = pTrack->mfLat_rad;
+ p.mfLon_rad = pTrack->mfLon_rad;
+ float fRange_km = mpPlatformObj->mcKin.RangeToKm(&p);
+ if (fRange_km <= afMaxRange_km)
+ {
+ trackList.track.push_back(*pTrack);
+ }
+ }
+ }
+ return trackList;
+ }
+
+
/**
* @param track Track to intercept.
* @return intercept heading to track in radians.
*/
! float tcPlatformInterface::GetInterceptHeadingToTrack(const tcTrack& track)
{
float fHeading_rad, fTTI;
***************
*** 542,545 ****
--- 580,595 ----
return fHeading_rad;
}
+
+ /**
+ * @param track Track to get range info about.
+ * @return range in km
+ */
+ float tcPlatformInterface::GetRangeToTrack(const tcTrack& track)
+ {
+ wxASSERT(mpPlatformObj);
+
+ return mpPlatformObj->mcKin.RangeToKm(track);
+ }
+
/**
Index: tcPlatformInterfaceExtension.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtension.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tcPlatformInterfaceExtension.cpp 3 Jan 2004 00:45:13 -0000 1.5
--- tcPlatformInterfaceExtension.cpp 8 Jan 2004 23:54:27 -0000 1.6
***************
*** 70,73 ****
--- 70,77 ----
;
+ class_<tcTrackList>("TrackList")
+ .def("Size",&tcTrackList::Size)
+ .def("GetTrack",&tcTrackList::GetTrack)
+ ;
class_<tsGeoPoint>("tsGeoPoint")
Index: tcPlatformInterfaceExtensionB.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtensionB.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tcPlatformInterfaceExtensionB.cpp 5 Jan 2004 02:48:03 -0000 1.8
--- tcPlatformInterfaceExtensionB.cpp 8 Jan 2004 23:54:27 -0000 1.9
***************
*** 54,57 ****
--- 54,58 ----
.def("GetMaxSpeed",&tcPlatformInterface::GetMaxSpeed)
.def("GetHeading",&tcPlatformInterface::GetHeading)
+ .def("GetHeadingRad",&tcPlatformInterface::GetHeadingRad)
.def("GetHeadingToDatum",&tcPlatformInterface::GetHeadingToDatum)
.def("GetRangeToDatum",&tcPlatformInterface::GetRangeToDatum)
***************
*** 112,117 ****
--- 113,120 ----
.def("SetSensorState",&tcPlatformInterface::SetSensorState)
.def("GetInterceptHeadingToTrack",&tcPlatformInterface::GetInterceptHeadingToTrack)
+ .def("GetRangeToTrack",&tcPlatformInterface::GetRangeToTrack)
.def("SetHeadingToInterceptTrack",&tcPlatformInterface::SetHeadingToInterceptTrack)
.def("GetTrackById",&tcPlatformInterface::GetTrackById)
+ .def("GetTrackList",&tcPlatformInterface::GetTrackList)
// flightport, landing
|