#include "groundnetwork.hxx"
#include <algorithm>
-SG_USING_STD(sort);
+using std::sort;
/*****************************************************************************
* Helper function for parsing position string
return value;
}
-bool sortByHeadingDiff(FGTaxiSegment *a, FGTaxiSegment *b) {
- return a->hasSmallerHeadingDiff(*b);
-}
+//bool sortByHeadingDiff(FGTaxiSegment *a, FGTaxiSegment *b) {
+// return a->hasSmallerHeadingDiff(*b);
+//}
bool sortByLength(FGTaxiSegment *a, FGTaxiSegment *b) {
return a->getLength() > b->getLength();
/**************************************************************************
* FGTaxiNode
*************************************************************************/
-FGTaxiNode::FGTaxiNode()
+void FGTaxiNode::setElevation(double val)
+{
+ geod.setElevationM(val);
+}
+
+void FGTaxiNode::setLatitude (double val)
{
+ geod.setLatitudeDeg(val);
}
-void FGTaxiNode::sortEndSegments(bool byLength)
+void FGTaxiNode::setLongitude(double val)
{
- if (byLength)
- sort(next.begin(), next.end(), sortByLength);
- else
- sort(next.begin(), next.end(), sortByHeadingDiff);
+ geod.setLongitudeDeg(val);
}
+
+void FGTaxiNode::setLatitude (const string& val)
+{
+ geod.setLatitudeDeg(processPosition(val));
+}
+
+void FGTaxiNode::setLongitude(const string& val)
+{
+ geod.setLongitudeDeg(processPosition(val));
+}
+
+//void FGTaxiNode::sortEndSegments(bool byLength)
+//{
+// if (byLength)
+// sort(next.begin(), next.end(), sortByLength);
+// else
+// sort(next.begin(), next.end(), sortByHeadingDiff);
+//}