![]() |
naev 0.12.5
|
Handles the pilot heat stuff. More...

Go to the source code of this file.
Functions | |
| static double | pilot_heatOutfitMod (const Pilot *p, const Outfit *o) |
| Gets the heat mod for an outfit. | |
| void | pilot_heatCalc (Pilot *p) |
| Calculates the heat parameters for a pilot. | |
| double | pilot_heatCalcOutfitC (const Outfit *o) |
| Calculates the thermal mass of an outfit. | |
| double | pilot_heatCalcOutfitArea (const Outfit *o) |
| Calculates the effective transfer area of an outfit. | |
| void | pilot_heatCalcSlot (PilotOutfitSlot *o) |
| Calculates the heat parameters for a pilot's slot. | |
| void | pilot_heatReset (Pilot *p) |
| Resets a pilot's heat. | |
| void | pilot_heatAddSlot (const Pilot *p, PilotOutfitSlot *o) |
| Adds heat to an outfit slot. | |
| void | pilot_heatAddSlotTime (const Pilot *p, PilotOutfitSlot *o, double dt) |
| Adds heat to an outfit slot over a period of time. | |
| double | pilot_heatUpdateSlot (const Pilot *p, PilotOutfitSlot *o, double dt) |
| Heats the pilot's slot. | |
| void | pilot_heatUpdateShip (Pilot *p, double Q_cond, double dt) |
| Heats the pilot's ship. | |
| double | pilot_heatEfficiencyMod (double T, double Tb, double Tc) |
| Returns a 0:1 modifier representing efficiency (1. being normal). | |
| void | pilot_heatUpdateCooldown (Pilot *p) |
| Overrides the usual heat model during active cooldown. | |
| double | pilot_heatAccuracyMod (double T) |
| Returns a 0:1 modifier representing accuracy (0. being normal). | |
| double | pilot_heatFireRateMod (double T) |
| Returns a 0:1 modifier representing fire rate (1. being normal). | |
| double | pilot_heatFirePercent (double T) |
| Returns a 0:2 level of fire, 0:1 is the accuracy point, 1:2 is fire rate point. | |
Handles the pilot heat stuff.
Definition in file pilot_heat.c.
| double pilot_heatAccuracyMod | ( | double | T | ) |
Returns a 0:1 modifier representing accuracy (0. being normal).
Definition at line 281 of file pilot_heat.c.
| void pilot_heatAddSlot | ( | const Pilot * | p, |
| PilotOutfitSlot * | o ) |
Adds heat to an outfit slot.
| p | Pilot whose slot it is. |
| o | The slot in question. |
Definition at line 135 of file pilot_heat.c.
| void pilot_heatAddSlotTime | ( | const Pilot * | p, |
| PilotOutfitSlot * | o, | ||
| double | dt ) |
Adds heat to an outfit slot over a period of time.
| p | Pilot whose slot it is. |
| o | The slot in question. |
| dt | Delta tick. |
Definition at line 154 of file pilot_heat.c.
| void pilot_heatCalc | ( | Pilot * | p | ) |
Calculates the heat parameters for a pilot.
We treat the ship as more or less a constant slab of steel.
| p | Pilot to update heat properties of. |
<
Definition at line 32 of file pilot_heat.c.
| double pilot_heatCalcOutfitArea | ( | const Outfit * | o | ) |
Calculates the effective transfer area of an outfit.
Definition at line 75 of file pilot_heat.c.
| double pilot_heatCalcOutfitC | ( | const Outfit * | o | ) |
Calculates the thermal mass of an outfit.
Definition at line 63 of file pilot_heat.c.
| void pilot_heatCalcSlot | ( | PilotOutfitSlot * | o | ) |
Calculates the heat parameters for a pilot's slot.
Definition at line 85 of file pilot_heat.c.
| double pilot_heatEfficiencyMod | ( | double | T, |
| double | Tb, | ||
| double | Tc ) |
Returns a 0:1 modifier representing efficiency (1. being normal).
| T | Actual temperature (K) |
| Tb | Base temperature for overheating purposes (K) |
| Tc | Max temperature for overheating purposes (K) |
Definition at line 237 of file pilot_heat.c.
| double pilot_heatFirePercent | ( | double | T | ) |
Returns a 0:2 level of fire, 0:1 is the accuracy point, 1:2 is fire rate point.
Definition at line 298 of file pilot_heat.c.
| double pilot_heatFireRateMod | ( | double | T | ) |
Returns a 0:1 modifier representing fire rate (1. being normal).
Definition at line 289 of file pilot_heat.c.
Gets the heat mod for an outfit.
Definition at line 113 of file pilot_heat.c.
| void pilot_heatReset | ( | Pilot * | p | ) |
Resets a pilot's heat.
| p | Pilot to reset heat of. |
Definition at line 103 of file pilot_heat.c.
| void pilot_heatUpdateCooldown | ( | Pilot * | p | ) |
Overrides the usual heat model during active cooldown.
| p | Pilot to update. |
Definition at line 247 of file pilot_heat.c.
| void pilot_heatUpdateShip | ( | Pilot * | p, |
| double | Q_cond, | ||
| double | dt ) |
Heats the pilot's ship.
The ship besides having conduction like in pilot_heatUpdateSlot it also has radiation. So now the equation we use is:
q = -k * dT/dx + sigma * epsilon * (T^4 - To^4)
However the first part is passed as parameter p so we get:
q = p + sigma * epsilon * (T^4 - To^4)
sigma being the Stefan-Boltzmann constant [5] = 5.67×10−8 W/(m^2 K^4) epsilon being a parameter between 0 and 1 (1 being black body) T being body temperature To being "space temperature"
| p | Pilot to update. |
| Q_cond | Heat energy moved from slots. |
| dt | Delta tick. |
Definition at line 215 of file pilot_heat.c.
| double pilot_heatUpdateSlot | ( | const Pilot * | p, |
| PilotOutfitSlot * | o, | ||
| double | dt ) |
Heats the pilot's slot.
We only consider conduction with the ship's chassis.
q = -k * dT/dx
q being heat flux W/m^2 k being conductivity W/(m*K) dT/dx temperature gradient along one dimension K/m
Slots are connected only with the chassis.
Definition at line 182 of file pilot_heat.c.