Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 73 lines (55 sloc) 2.2 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
/*
* See Licensing and Copyright notice in naev.h
*/


#ifndef PILOT_HEAT_H
# define PILOT_HEAT_H


#include "pilot.h"


/*
* Fundamental heat properties.
*/
#define HEAT_WORST_ACCURACY (38./180.*M_PI) /**< Pretty bad accuracy, a 76 degree arc. */


/*
* Some random physics constants.
*/
#define CONST_STEFAN_BOLTZMANN (5.67e-8) /**< Stefan-Botzmann thermal radiation constant. [W/(m^2 K^4)] */
#define CONST_SPACE_TEMP (3.18) /**< Aproximation of the absolute temperature of space. [K] */
#define CONST_SPACE_TEMP_4 \
(CONST_SPACE_TEMP*CONST_SPACE_TEMP*CONST_SPACE_TEMP*CONST_SPACE_TEMP) /**< CONST_SPACE_TEMP^4 */
#define CONST_SPACE_STAR_TEMP (250.) /**< Aproximation of the black body temperature near a star. */
#define CONST_SPACE_STAR_TEMP_4 \
(CONST_SPACE_STAR_TEMP*CONST_SPACE_STAR_TEMP*CONST_SPACE_STAR_TEMP*CONST_SPACE_STAR_TEMP) /**< CONST_SPACE_STAR_TEMP^4 */


/*
* Properties of steel.
*
* Yes, there are many different types of steels, these are sort of "average values" for carbon steel.
*/
#define STEEL_HEAT_CONDUCTIVITY (54.) /**< Thermal conductivity of steel (@ 25C). [W/(m*K)] */
#define STEEL_HEAT_CAPACITY (0.49) /**< Thermal capacity of steel. [J/(kg*K)] */
#define STEEL_DENSITY (7.88e3) /**< Density of steel. [kg/m^3] */


/*
* Outfit core value calculations.
*/
double pilot_heatCalcOutfitC( const Outfit *o );
double pilot_heatCalcOutfitArea( const Outfit *o );

/*
* Heat initializations.
*/
void pilot_heatCalc( Pilot *p );
void pilot_heatCalcSlot( PilotOutfitSlot *o );

/*
* Heat management.
*/
void pilot_heatReset( Pilot *p );
void pilot_heatAddSlot( Pilot *p, PilotOutfitSlot *o );
void pilot_heatAddSlotTime( Pilot *p, PilotOutfitSlot *o, double dt );
double pilot_heatUpdateSlot( Pilot *p, PilotOutfitSlot *o, double dt );
void pilot_heatUpdateShip( Pilot *p, double Q_cond, double dt );
void pilot_heatUpdateCooldown( Pilot *p );

/*
* Modifiers.
*/
double pilot_heatEfficiencyMod( double T, double Tb, double Tc );
double pilot_heatAccuracyMod( double T );
double pilot_heatFireRateMod( double T );
double pilot_heatFirePercent( double T );


#endif /* PILOT_HEAT_H */
Something went wrong with that request. Please try again.