ssscoring.constants
Constants module and definitions.
All measurements are expressed in meters unless noted otherwise.
1# See: https://github.com/pr3d4t0r/SSScoring/blob/master/LICENSE.txt 2 3""" 4Constants module and definitions. 5 6**All measurements are expressed in meters unless noted otherwise.** 7""" 8 9import math 10 11 12# +++ implementation +++ 13 14BREAKOFF_ALTITUDE = 1707.0 15""" 16Breakoff altitude or hard deck. 17""" 18 19DEFAULT_SPEED_ACCURACY_SCALE = 5.0 20""" 21Default speed accuracy scale set to 5, to make it visible in plots. This value 22was chosen because the valid threshold is accuracy < 3.0, and this makes most 23values visible without intefering with other curves in the same plot. 24 25See 26=== 27 ssscoring.notebook 28 ssscoring.appcommon 29""" 30 31DEG_IN_RADIANS = math.pi/180.0 32""" 33π/180º 34""" 35 36EXIT_SPEED = 10.0 37""" 38Guesstimate of the exit speed; ~g 39""" 40 41FLYSIGHT_1_HEADER = set([ 'time', 'lat', 'lon', 'hMSL', 'velN', 'velE', 'velD', 'hAcc', 'vAcc', 'sAcc', 'heading', 'cAcc', 'gpsFix', 'numSV', ]) 42""" 43FlySight v1 CSV file headers. 44""" 45 46FLYSIGHT_2_HEADER = ('GNSS', 'time', 'lat', 'lon', 'hMSL', 'velN', 'velE', 'velD', 'hAcc', 'vAcc', 'sAcc', 'numSV', ) 47""" 48FlySight v1 CSV file headers. Unlike other constants, this is a `tuple` instead 49of a `set` because the code manipulates the headers/columns during file ingress. 50""" 51 52 53FLYSIGHT_FILE_ENCODING = 'utf-8' 54""" 55File encoding as it comes raw from the FlySight device. 56""" 57 58 59FT_IN_M = 3.2808 60""" 61Number of feet in a meter. 62""" 63 64 65IGNORE_LIST = [ '.ipynb_checkpoints', ] 66""" 67Internal use - list of files to be ignored during bulk file processing in the 68data lake (e.g. `./data`). 69""" 70 71 72KMH_AS_MS = 3.6 73""" 74km/h as m/s 75""" 76 77 78LAST_TIME_TRANCHE = 25.0 79""" 80Times > 25 s are irrelevant because it means that the speed skydiver flew at 81vSpeed < 400 km/h. 82""" 83 84 85MAX_VALID_ELEVATION = 4602.0 86""" 87Max valid elevation allowed in the FlySight or FlySsight 2 time series. Speed 88skydivers are known to jump from as high as `MAX_VALID_ELEVATION` without O2. 89The SSScoring algorithms eliminate all data entries where elevation AGL > `MAX_VALID_ELEVATION` 90before processing the jump for scoring. That's because occasional FlySight 91errors caused by intermittent GPS signal loss and invalid GPS readings when the 92skydiver sits under an airplane's wing during the climb to altitude and other 93factors. 94""" 95 96 97MAX_VALID_ELEVATION_FT = MAX_VALID_ELEVATION*3.28 98""" 99Same as `MAX_VALID_ELEVATION`, in ft. 100""" 101 102 103MAX_ALTITUDE_FT = 14000.0 104""" 105Maximum exit altitude AGL according to FAI Competition Rules Speed Skydiving 106section 5.3. 107""" 108 109MAX_ALTITUDE_METERS = MAX_ALTITUDE_FT/3.28 110""" 111See 112--- 113Maximum exit altitude AGL according to FAI Competition Rules Speed Skydiving 114section 5.3. 115""" 116 117 118M_2_FT = 3.28084 119""" 120Meters to feet conversion factor. 121""" 122 123 124SPEED_ACCURACY_THRESHOLD = 3.0 125""" 126Speed accuracy for the FlySight device. 127""" 128 129 130MIN_JUMP_FILE_SIZE = 1024*512 131MIN_JUMP_FILE_SIZE = 1024*64 132""" 133FlySight v1 files smaller than `MIN_JUMP_FILE_SIZE` are ignored because they 134lack the minimum number of data points to contain a valid speed skydive. 135""" 136 137 138MPS_2_KMH = 3.6 139""" 140m/s to km/h conversion factor: 141 142```python 143s = mps * 60 * 60 / 1000 144 = mps * 3600 / 1000 145 = mps * 3.6 146``` 147""" 148 149 150PERFORMANCE_WINDOW_LENGTH = 2256.0 151""" 152Performance window length as defined by ISSA/IPC/USPA. 153""" 154 155 156SCORING_INTERVAL = 3.0 157""" 158Scoring is based on the maximum speed the jumper attained within the `VALIDATION_WINDOW_LENGTH` 159as the average speed during a sliding window of SCORING_INTERVAL seconds. The 160value is set by governing bodies like ISC and USPA. 161""" 162 163 164SKYTRAX_1_HEADER = set([ 'time', 'lat', 'lon', 'hMSL', 'velN', 'velE', 'velD', 'hAcc', 'vAcc', 'sAcc', 'heading', 'cAcc', 'gpsFix', 'numSV', ]) 165""" 166SkyTraX GPS + barometric SMD v1 CSV file headers. 167""" 168 169 170TABLE_INTERVAL = 5.0 171""" 172Speed run table interval. 173""" 174 175 176VALIDATION_WINDOW_LENGTH = 1006.0 177""" 178The validation window length as defined in the competition rules. 179"""
Breakoff altitude or hard deck.
Default speed accuracy scale set to 5, to make it visible in plots. This value was chosen because the valid threshold is accuracy < 3.0, and this makes most values visible without intefering with other curves in the same plot.
See
ssscoring.notebook
ssscoring.appcommon
π/180º
Guesstimate of the exit speed; ~g
FlySight v1 CSV file headers.
FlySight v1 CSV file headers. Unlike other constants, this is a tuple
instead
of a set
because the code manipulates the headers/columns during file ingress.
File encoding as it comes raw from the FlySight device.
Number of feet in a meter.
Internal use - list of files to be ignored during bulk file processing in the
data lake (e.g. ./data
).
km/h as m/s
Times > 25 s are irrelevant because it means that the speed skydiver flew at vSpeed < 400 km/h.
Max valid elevation allowed in the FlySight or FlySsight 2 time series. Speed
skydivers are known to jump from as high as MAX_VALID_ELEVATION
without O2.
The SSScoring algorithms eliminate all data entries where elevation AGL > MAX_VALID_ELEVATION
before processing the jump for scoring. That's because occasional FlySight
errors caused by intermittent GPS signal loss and invalid GPS readings when the
skydiver sits under an airplane's wing during the climb to altitude and other
factors.
Same as MAX_VALID_ELEVATION
, in ft.
Maximum exit altitude AGL according to FAI Competition Rules Speed Skydiving section 5.3.
See
Maximum exit altitude AGL according to FAI Competition Rules Speed Skydiving section 5.3.
Meters to feet conversion factor.
Speed accuracy for the FlySight device.
FlySight v1 files smaller than MIN_JUMP_FILE_SIZE
are ignored because they
lack the minimum number of data points to contain a valid speed skydive.
m/s to km/h conversion factor:
s = mps * 60 * 60 / 1000
= mps * 3600 / 1000
= mps * 3.6
Performance window length as defined by ISSA/IPC/USPA.
Scoring is based on the maximum speed the jumper attained within the VALIDATION_WINDOW_LENGTH
as the average speed during a sliding window of SCORING_INTERVAL seconds. The
value is set by governing bodies like ISC and USPA.
SkyTraX GPS + barometric SMD v1 CSV file headers.
Speed run table interval.
The validation window length as defined in the competition rules.