Skip to content

Commit

Permalink
fuel scooping: use variable for standard hydrogen pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
Mc-Pain committed Sep 9, 2023
1 parent 9b2185f commit f84d9fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Ship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,9 +1257,10 @@ void Ship::StaticUpdate(const float timeStep)
const vector3d pdir = -GetOrient().VectorZ();
const double dot = vdir.Dot(pdir);
const double speed_times_density = speed * density;
const double hydrogen_pressure = 0.00000333;
// reference: speed > 100.0, density > 0.3
if ((m_stats.free_capacity) && (dot > 0.90) && speed_times_density > (100.0 * 0.3)) {
const double rate = speed_times_density * 0.00000333 * double(m_stats.fuel_scoop_cap);
const double rate = speed_times_density * hydrogen_pressure * double(m_stats.fuel_scoop_cap);
m_hydrogenScoopedAccumulator += rate * Pi::game->GetTimeAccelRate();
if (m_hydrogenScoopedAccumulator > 1) {
const double scoopedTons = floor(m_hydrogenScoopedAccumulator);
Expand Down

0 comments on commit f84d9fa

Please sign in to comment.