if (node == -1) {
node = park->guid();
} else if (node == 0) {
- // HAndle case where parking doens't have a node
+ // Handle case where parking doesn't have a node
if (firstFlight) {
node = park->guid();
} else {
// push each node on the taxi route as a waypoint
// int route;
//cerr << "Building taxi route" << endl;
+
+ // Note that the line wpt->setRouteIndex was commented out by revision [afcdbd] 2012-01-01,
+ // which breaks the rendering functions.
+ // These can probably be generated on the fly however.
while (taxiRoute.next(&node)) {
char buffer[10];
snprintf(buffer, 10, "%lld", (long long int) node);
FGAIWaypoint *wpt =
createOnGround(ac, buffer, tn->geod(), apt->getElevation(),
ac->getPerformance()->vTaxi());
- // wpt->setRouteIndex(route);
+ // TODO: find an alternative way to pass route information to the waypoint.
+ //wpt->setRouteIndex(route);
//cerr << "Nodes left " << taxiRoute->nodesLeft() << " ";
if (taxiRoute.nodesLeft() == 1) {
// Note that we actually have hold points in the ground network, but this is just an initial test.
FGAIWaypoint *wpt =
createOnGround(ac, buffer, tn->geod(), apt->getElevation(),
ac->getPerformance()->vTaxi());
- // wpt->setRouteIndex(route);
+ //TODO: find an alternative way to pass route information to the waypoint.
+ //wpt->setRouteIndex(route);
pushBackWaypoint(wpt);
}
return true;
}
void FGTowerController::render(bool visible) {
- //cerr << "FGTowerController::render function not yet implemented" << endl;
+ //std::cerr << "FGTowerController::render function not yet implemented" << std::endl;
}
string FGTowerController::getName() {
void FGStartupController::render(bool visible)
{
-
+ //std::cerr << "Rendering startup controller" << std::endl;
SGMaterialLib *matlib = globals->get_matlib();
if (group) {
//int nr = ;
}
void FGApproachController::render(bool visible) {
- //cerr << "FGApproachController::render function not yet implemented" << endl;
+ std::cerr << "FGApproachController::render function not yet implemented" << std::endl;
}
void FGGroundNetwork::render(bool visible)
{
-
SGMaterialLib *matlib = globals->get_matlib();
if (group) {
//int nr = ;
//for ( FGTaxiSegmentVectorIterator i = segments.begin(); i != segments.end(); i++) {
//double dx = 0;
for (TrafficVectorIterator i = activeTraffic.begin(); i != activeTraffic.end(); i++) {
- // Handle start point
+ // Handle start point i.e. the segment that is connected to the aircraft itself on the starting end
+ // and to the the first "real" taxi segment on the other end.
int pos = i->getCurrentPosition() - 1;
if (pos >= 0) {
double coveredDistance = length * 0.5;
SGGeod center;
SGGeodesy::direct(start, heading, coveredDistance, center, az2);
- //cerr << "Active Aircraft : Centerpoint = (" << center.getLatitudeDeg() << ", " << center.getLongitudeDeg() << "). Heading = " << heading << endl;
+ //std::cerr << "Active Aircraft : Centerpoint = (" << center.getLatitudeDeg() << ", " << center.getLongitudeDeg() << "). Heading = " << heading << std::endl;
///////////////////////////////////////////////////////////////////////////////
// Make a helper function out of this
osg::Matrix obj_pos;
group->addChild( obj_trans );
/////////////////////////////////////////////////////////////////////
} else {
- //cerr << "BIG FAT WARNING: current position is here : " << pos << endl;
+ //std::cerr << "BIG FAT WARNING: current position is here : " << pos << std::endl;
}
+ // Next: Draw the other taxi segments.
for (intVecIterator j = (i)->getIntentions().begin(); j != (i)->getIntentions().end(); j++) {
osg::Matrix obj_pos;
int k = (*j)-1;