ssscoring.datatypes
SSScoring custom type definitions for easier symbolic manipuation.
1# See: https://github.com/pr3d4t0r/SSScoring/blob/master/LICENSE.txt 2 3 4""" 5SSScoring custom type definitions for easier symbolic manipuation. 6""" 7 8from collections import namedtuple 9from enum import Enum 10 11 12# +++ implementation +++ 13 14class FlySightVersion(Enum): 15 """ 16 Symbols for handling device version. 17 """ 18 V1 = 1000 19 V2 = 2000 20 21 22class JumpStatus(Enum): 23 OK = 0 24 ALTITUDE_EXCEEDS_MINIMUM = 100 25 ALTITUDE_EXCEEDS_MAXIMUM = 110 26 INVALID_SPEED_FILE = 120 27 SPEED_ACCURACY_EXCEEDS_LIMIT = 200 28 WARM_UP_FILE = 300 29 30 31JumpResults = namedtuple('JumpResults', 'data maxSpeed score scores table window status') 32""" 33A named tuple containing the score, maximum speed, scores throught the 34performance window, the results table for a jump, the output color for the 35result, and the result information string. 36 37Attributes 38---------- 39- `data` - dataframe containing all the data points for plotting and 40 calculations 41- `maxSpeed` - maximum absolute speed registered during a skydive 42- `score` - maximum mean speed during a 3-second window during the skydive 43- `scores` - a dictionary with all the scored ruding the sliding 3-sec window 44 for the speed run 45- `table` - summary table of results of the speed run 46- `window` - the scoring window data, an instance of `PerformanceWindow` 47- 'status' - An instance of `ssscoring.datatypes.JumpStatus` 48""" 49 50 51PerformanceWindow = namedtuple('PerformanceWindow', 'start end validationStart') 52""" 53An object to handle the performance window (as defined in competition rules) as 54a single object with all the properties necessary to interpret it and manipulate 55it across different function or method calls. 56 57Attributes 58---------- 59- `start` - beginning or start of the performance window, or exit from the 60 aircraft 61- `end` - end of the performance window, or `start-PERFORMANCE_WINDOW_LENGTH` 62- `validationStart` - end of the performance window - the `VALIDATION_WINDOW_END` 63 64See 65--- 66 ssscoring.constants.PERFORMANCE_WINDOW_LENGTH 67 ssscoring.constants.VALIDATION_WINDOW_END 68"""
class
FlySightVersion(enum.Enum):
15class FlySightVersion(Enum): 16 """ 17 Symbols for handling device version. 18 """ 19 V1 = 1000 20 V2 = 2000
Symbols for handling device version.
V1 =
<FlySightVersion.V1: 1000>
V2 =
<FlySightVersion.V2: 2000>
class
JumpStatus(enum.Enum):
23class JumpStatus(Enum): 24 OK = 0 25 ALTITUDE_EXCEEDS_MINIMUM = 100 26 ALTITUDE_EXCEEDS_MAXIMUM = 110 27 INVALID_SPEED_FILE = 120 28 SPEED_ACCURACY_EXCEEDS_LIMIT = 200 29 WARM_UP_FILE = 300
OK =
<JumpStatus.OK: 0>
ALTITUDE_EXCEEDS_MINIMUM =
<JumpStatus.ALTITUDE_EXCEEDS_MINIMUM: 100>
ALTITUDE_EXCEEDS_MAXIMUM =
<JumpStatus.ALTITUDE_EXCEEDS_MAXIMUM: 110>
INVALID_SPEED_FILE =
<JumpStatus.INVALID_SPEED_FILE: 120>
SPEED_ACCURACY_EXCEEDS_LIMIT =
<JumpStatus.SPEED_ACCURACY_EXCEEDS_LIMIT: 200>
WARM_UP_FILE =
<JumpStatus.WARM_UP_FILE: 300>
class
JumpResults(builtins.tuple):
A named tuple containing the score, maximum speed, scores throught the performance window, the results table for a jump, the output color for the result, and the result information string.
Attributes
data
- dataframe containing all the data points for plotting and calculationsmaxSpeed
- maximum absolute speed registered during a skydivescore
- maximum mean speed during a 3-second window during the skydivescores
- a dictionary with all the scored ruding the sliding 3-sec window for the speed runtable
- summary table of results of the speed runwindow
- the scoring window data, an instance ofPerformanceWindow
- 'status' - An instance of
ssscoring.datatypes.JumpStatus
class
PerformanceWindow(builtins.tuple):
An object to handle the performance window (as defined in competition rules) as a single object with all the properties necessary to interpret it and manipulate it across different function or method calls.
Attributes
start
- beginning or start of the performance window, or exit from the aircraftend
- end of the performance window, orstart-PERFORMANCE_WINDOW_LENGTH
validationStart
- end of the performance window - theVALIDATION_WINDOW_END
See
ssscoring.constants.PERFORMANCE_WINDOW_LENGTH
ssscoring.constants.VALIDATION_WINDOW_END