void Node::showFile() { FILE *fp; fp = fopen("saida.txt", "a"); for (int i = 0; i < 3; ++i) { for (unsigned h = 0; h < height; ++h) { fprintf(fp,"\t"); } for (int j = 0; j < 3; ++j) { fprintf(fp,"%d ", tile[i*3+j]); } fprintf(fp," %u+%u=%u \n",distanceToGoal(), height, cost); } fprintf(fp,"\n"); fclose(fp); }
/*! * @brief Updates the spherical position, angular location and transformed spherical position. * * This method uses the camera transform and as such if it was not valid when retrieved from the wrapper * this will leave m_transformed_spherical_position at all zeros. */ bool Goal::calculatePositions() { const Transformer& tran = VisionBlackboard::getInstance()->getTransformer(); //To the bottom of the Goal Post. tran.screenToRadial2D(m_location); double dist = distanceToGoal(m_location.angular.x, m_location.angular.y); tran.screenToRadial3D(m_location, dist); //m_spherical_error - not calculated #if VISION_GOAL_VERBOSITY > 2 debug << "Goal::calculatePositions: "; debug << d2p << " " << width_dist << " " << m_location.relativeRadial.x << endl; #endif return distance_valid && dist > 0; }