Skip to content

Commit

Permalink
Addition of 'average cruise height difference' performance indicator. c…
Browse files Browse the repository at this point in the history
…lose #67
  • Loading branch information
GliderGeek committed Jul 21, 2016
1 parent 758a33a commit 5646336
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions PySoar/performanceClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ def det_s_glide_avg(self, leg, cruise_distance, no_cruises):
s_glide_avg = float(cruise_distance) / no_cruises
self.store_perf(leg, "s_glide_avg", s_glide_avg / 1000)

def det_dh_cruise_avg(self, leg, cruise_dh, no_cruises):
if no_cruises == 0:
dh_cruise_avg = 0
else:
dh_cruise_avg = float(cruise_dh) / no_cruises
self.store_perf(leg, "dh_cruise_avg", dh_cruise_avg)

def det_s_extra(self, leg, cruise_distance, task_distance, thermal_drift):
s_extra = float(cruise_distance + thermal_drift - task_distance) / task_distance
s_extra *= 100
Expand Down Expand Up @@ -160,6 +167,7 @@ def write_perfs(self, leg,
self.det_s_extra(leg, cruise_distance, task_distance, thermal_drift)
self.det_h_loss_turn(leg, thermal_altitude_loss, thermal_altitude_gain)
self.det_s_glide_avg(leg, cruise_distance, no_cruises)
self.det_dh_cruise_avg(leg, cruise_height_diff, no_cruises)
self.det_v_glide_avg(leg, cruise_distance, cruise_time)
self.det_tsk_v(leg, task_distance, thermal_time, cruise_time)

Expand Down
3 changes: 2 additions & 1 deletion PySoar/settingsClass.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def determine_performance_dictionary(self):
self.set_performance_entry("v_glide_avg", "Average cruise speed (GS)", "number", "high", "[km/h]", True, False, True, True)
self.set_performance_entry("v_turn_avg", "Average thermal speed (GS)", "number", "low", "[km/h]", False, False, True, True)
self.set_performance_entry("s_glide_avg", "Average cruise distance", "number", "high", "[km]", True, False, True, True)
self.set_performance_entry("dh_cruise_avg", "Average cruise height difference", "number", "low", "[m]", True, False, True, True)
self.set_performance_entry("LD_avg", "Average L/D", "number", "high", "[-]", True, False, True, True)
self.set_performance_entry("s_extra", "Excess distance covered", "number", "low", "[%]", True, False, True, True)
self.set_performance_entry("tsk_v", "Task speed", "number", "high", "[km/h]", True, False, True, True)
Expand Down Expand Up @@ -68,7 +69,7 @@ def __init__(self):
thermal_threshold_bearingRate = 4 #degr/s

perf_indic_all = ["ranking", "airplane", "compID", "s_flown_task", "t_start", "t_finish", "h_start", "h_finish",
"vario_gem", "v_glide_avg", "v_turn_avg", "s_glide_avg", "LD_avg", "s_extra", "tsk_v",
"vario_gem", "v_glide_avg", "v_turn_avg", "s_glide_avg", "dh_cruise_avg", "LD_avg", "s_extra", "tsk_v",
"turn_percentage", "h_loss_turn"]

WGS84_mayor_axis = 6378137
Expand Down
6 changes: 6 additions & 0 deletions docs/manual/EN/ch2_performance_indicators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ \section{Average cruise distance [km]}
{s_{avg - cruise}} = \frac{{{s_{cruise}}}}{{{n_{cruises}}}}
\end{equation}

\section{Average cruise height difference [m]}
The average cruise height difference is calculated using:
\begin{equation}
{dh_{avg - cruise}} = \frac{{{dh_{cruise}}}}{{{n_{cruises}}}}
\end{equation}

\section{Average L/D [-]}
The average glide ratio is calculated using:
\begin{equation}
Expand Down

0 comments on commit 5646336

Please sign in to comment.