Beispiel #1
0
void TDecisor::CabeceraResultadosInsControlador(stringstream& insoutput) {
	std::string Label;

	if(FResInstantCtrl.Output) {
		Label = "\t" + PutLabel(705) + std::to_string(fID) + PutLabel(901);
		insoutput << Label.c_str();
	}
}
Beispiel #2
0
void TDecisor::CabeceraResultadosMedControlador(stringstream& medoutput) {
	std::string Label;

	if(FResMediosCtrl.Output) {
		Label = "\t" + PutLabel(705) + std::to_string(fID) + PutLabel(901);
		medoutput << Label.c_str();
	}

}
Beispiel #3
0
void TTable1D::CabeceraResultadosInsControlador(stringstream& insoutput) {
	try {
		std::string Label;

		if(FResInstantCtrl.Output) {
			Label = "\t" + PutLabel(705) + std::to_string(fID) + PutLabel(901);
			insoutput << Label.c_str();
		}

	} catch(exception & N) {
		std::cout << "ERROR: TTable::CabeceraResultadosInsControlador en el controlador " << fID << std::endl;
		std::cout << "Tipo de error: " << N.what() << std::endl;
		throw Exception(N.what());
	}
}
Beispiel #4
0
void TEjeTurbogrupo::CabeceraResultadosMedEje(stringstream & medoutput) {
	try {
		// FILE *fich=fopen(FileSALIDA,"a");
		std::string Label;

		if(FResMediosEje.Regimen) {
			Label = "\t" + PutLabel(703) + std::to_string(FNumeroEje) + PutLabel(918);
			medoutput << Label.c_str();
		}

		// fclose(fich);
	} catch(exception & N) {
		std::cout << "ERROR: TEjeTurbogrupo::CabeceraResultadosMedEje en el eje " << FNumeroEje << std::endl;
		std::cout << "Tipo de error: " << N.what() << std::endl;
		throw Exception(N.what());
	}
}
Beispiel #5
0
void TWasteGate::CabeceraGraficaINS(stringstream& insoutput, int lam) {
	try {
//FILE *fich=fopen(FileSALIDA,"a");
		std::string Label;

		if(FGraficasWG) {
			if(FGrafLev) {
				Label = "\t" + PutLabel(13) + std::to_string(lam) + PutLabel(902);
				insoutput << Label.c_str();
			}
		}
//fclose(fich);
	} catch(exception &N) {
		std::cout << "ERROR: CabeceraGrafica WasteGate" << std::endl;
		//std::cout << "Tipo de error: " << N.what().scr() << std::endl;
		throw Exception(N.what());

	}
}
Beispiel #6
0
void TEjeTurbogrupo::HeaderInstantaneousResultsEje(stringstream & insoutput) {
	try {
		// FILE *fich=fopen(FileSALIDA,"a");

		std::string Label;

		if(FResInstantEje.Regimen) {
			Label = "\t" + PutLabel(703) + std::to_string(FNumeroEje) + PutLabel(918);
			insoutput << Label.c_str();
		}
		if(FResInstantEje.MechPower) {
			Label = "\t" + PutLabel(713) + std::to_string(FNumeroEje) + PutLabel(903);
			insoutput << Label.c_str();
		}
		if(FResInstantEje.MechEff) {
			Label = "\t" + PutLabel(714) + std::to_string(FNumeroEje) + PutLabel(901);
			insoutput << Label.c_str();
		}
#ifdef tchtm
		if(FResInstantEje.NodeTemp) {
			FHTM->HeaderInsTemperatures(insoutput);
		}
		if(FResInstantEje.HeatFlow) {
			FHTM->HeaderInsHeatFlow(insoutput);
		}
#endif

		// fclose(fich);
	} catch(exception & N) {
		std::cout << "ERROR: TEjeTurbogrupo::HeaderInstantaneousResultsEje en el eje " << FNumeroEje << std::endl;
		std::cout << "Tipo de error: " << N.what() << std::endl;
		throw Exception(N.what());
	}
}
Beispiel #7
0
void SystemView::PutBody(SBody *b, vector3d offset)
{
	if (b->type == SBody::TYPE_STARPORT_SURFACE) return;
	if (b->type != SBody::TYPE_GRAVPOINT) {
		glGetFloatv (GL_MODELVIEW_MATRIX, &s_invRot[0]);
		s_invRot[12] = s_invRot[13] = s_invRot[14] = 0;
		s_invRot = s_invRot.InverseOf();

		glColor3f(1,1,1);
		glBegin(GL_TRIANGLE_FAN);
		double radius = b->GetRadius() * m_zoom;
		const vector3f offsetf(offset);
		for (float ang=0; ang<2.0f*M_PI; ang+=M_PI*0.05f) {
			vector3f p = offsetf + s_invRot * vector3f(radius*sin(ang), -radius*cos(ang), 0);
			glVertex3fv(&p.x);
		}
		glEnd();

		PutLabel(b, offset);
	}

	if (b->children.size()) for(std::vector<SBody*>::iterator kid = b->children.begin(); kid != b->children.end(); ++kid) {

		if (float_is_zero_general((*kid)->orbit.semiMajorAxis)) continue;
		if ((*kid)->orbit.semiMajorAxis * m_zoom < ROUGH_SIZE_OF_TURD) {
			PutOrbit(*kid, offset);
		}

		// not using current time yet
		vector3d pos = (*kid)->orbit.OrbitalPosAtTime(m_time);
		pos *= double(m_zoom);
		//glTranslatef(pos.x, pos.y, pos.z);

		PutBody(*kid, offset + pos);
	}
}