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_PLOT_INCREMENT = 75.0 20""" 21Used to adjust the plot's max scale to `score` + `DEFAULT_PLOT_INCREMENT` so 22that the whole jump progression is visible in the plot. 23""" 24 25 26DEFAULT_PLOT_MAX_V_SCALE = 550.0 27""" 28Default speed plot scale max is set to 550 km/h, but there is evidence it can 29be higher and adjusted on-the-fly based on jump results. 30""" 31 32 33DEFAULT_SPEED_ACCURACY_SCALE = 5.0 34""" 35Default speed accuracy scale set to 5, to make it visible in plots. This value 36was chosen because the valid threshold is accuracy < 3.0, and this makes most 37values visible without intefering with other curves in the same plot. 38 39See 40=== 41 ssscoring.notebook 42 ssscoring.appcommon 43""" 44 45DEG_IN_RADIANS = math.pi/180.0 46""" 47π/180º 48""" 49 50 51DZ_DIRECTORY = 'drop-zones-loc-elev.csv' 52""" 53The CSV file database dump of the drop zones directory. 54""" 55 56 57EXIT_SPEED = 10.0 58""" 59Guesstimate of the exit speed; ~g 60""" 61 62FLYSIGHT_1_HEADER = set([ 'time', 'lat', 'lon', 'hMSL', 'velN', 'velE', 'velD', 'hAcc', 'vAcc', 'sAcc', 'heading', 'cAcc', 'gpsFix', 'numSV', ]) 63""" 64FlySight v1 CSV file headers. 65""" 66 67FLYSIGHT_2_HEADER = ('GNSS', 'time', 'lat', 'lon', 'hMSL', 'velN', 'velE', 'velD', 'hAcc', 'vAcc', 'sAcc', 'numSV', ) 68""" 69FlySight v1 CSV file headers. Unlike other constants, this is a `tuple` instead 70of a `set` because the code manipulates the headers/columns during file ingress. 71""" 72 73 74FLYSIGHT_FILE_ENCODING = 'utf-8' 75""" 76File encoding as it comes raw from the FlySight device. 77""" 78 79 80FT_IN_M = 3.2808 81""" 82Number of feet in a meter. 83""" 84 85 86IGNORE_LIST = [ '.ipynb_checkpoints', ] 87""" 88Internal use - list of files to be ignored during bulk file processing in the 89data lake (e.g. `./data`). 90""" 91 92 93KMH_AS_MS = 3.6 94""" 95km/h as m/s 96""" 97 98 99LAST_TIME_TRANCHE = 25.0 100""" 101Times > 25 s are irrelevant because it means that the speed skydiver flew at 102vSpeed < 400 km/h. 103""" 104 105 106MAX_VALID_ELEVATION = 4602.0 107""" 108Max valid elevation allowed in the FlySight or FlySsight 2 time series. Speed 109skydivers are known to jump from as high as `MAX_VALID_ELEVATION` without O2. 110The SSScoring algorithms eliminate all data entries where elevation AGL > `MAX_VALID_ELEVATION` 111before processing the jump for scoring. That's because occasional FlySight 112errors caused by intermittent GPS signal loss and invalid GPS readings when the 113skydiver sits under an airplane's wing during the climb to altitude and other 114factors. 115""" 116 117 118MAX_VALID_ELEVATION_FT = MAX_VALID_ELEVATION*3.28 119""" 120Same as `MAX_VALID_ELEVATION`, in ft. 121""" 122 123 124MAX_ALTITUDE_FT = 14000.0 125""" 126Maximum exit altitude AGL according to FAI Competition Rules Speed Skydiving 127section 5.3. 128""" 129 130MAX_ALTITUDE_METERS = MAX_ALTITUDE_FT/3.28 131""" 132See 133--- 134Maximum exit altitude AGL according to FAI Competition Rules Speed Skydiving 135section 5.3. 136""" 137 138 139M_2_FT = 3.28084 140""" 141Meters to feet conversion factor. 142""" 143 144 145MIN_JUMP_FILE_SIZE = 1024*512 146MIN_JUMP_FILE_SIZE = 1024*64 147""" 148FlySight v1 files smaller than `MIN_JUMP_FILE_SIZE` are ignored because they 149lack the minimum number of data points to contain a valid speed skydive. 150""" 151 152 153MPS_2_KMH = 3.6 154""" 155m/s to km/h conversion factor: 156 157```python 158s = mps * 60 * 60 / 1000 159 = mps * 3600 / 1000 160 = mps * 3.6 161``` 162""" 163 164 165PERFORMANCE_WINDOW_LENGTH = 2256.0 166""" 167Performance window length as defined by ISSA/IPC/USPA. 168""" 169 170 171RESOURCES = 'ssscoring.resources' 172""" 173The package resources in the manifest or package wheel resources. 174""" 175 176 177SAMPLE_RATE = 0.2 178""" 179Expected interval, in seconds, for the FlySight sample rate. 180""" 181 182 183SCORING_INTERVAL = 3.0 184""" 185Scoring is based on the maximum speed the jumper attained within the `VALIDATION_WINDOW_LENGTH` 186as the average speed during a sliding window of SCORING_INTERVAL seconds. The 187value is set by governing bodies like ISC and USPA. 188""" 189 190 191SKYTRAX_1_HEADER = set([ 'time', 'lat', 'lon', 'hMSL', 'velN', 'velE', 'velD', 'hAcc', 'vAcc', 'sAcc', 'heading', 'cAcc', 'gpsFix', 'numSV', ]) 192""" 193SkyTraX GPS + barometric SMD v1 CSV file headers. 194""" 195 196 197SPEED_ACCURACY_THRESHOLD = 3.0 198""" 199Speed accuracy for the FlySight device. 200""" 201 202 203SSSCORE_INSTRUCTIONS_MD = 'instructions.md' 204""" 205Markdown representation of the end-user instructions on how to use SSScore. 206""" 207 208 209SSSCORE_MOVED_DOMAIN_MD = 'moved-2-new-domain.md' 210""" 211Markdown representation of the end-user instructions to go to the new SSScore 212domain. 213""" 214 215 216TABLE_INTERVAL = 5.0 217""" 218Speed run table interval. 219""" 220 221 222VALIDATION_WINDOW_LENGTH = 1006.0 223""" 224The validation window length as defined in the competition rules. 225"""
Breakoff altitude or hard deck.
Used to adjust the plot's max scale to score
+ DEFAULT_PLOT_INCREMENT
so
that the whole jump progression is visible in the plot.
Default speed plot scale max is set to 550 km/h, but there is evidence it can be higher and adjusted on-the-fly based on jump results.
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º
The CSV file database dump of the drop zones directory.
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.
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.
The package resources in the manifest or package wheel resources.
Expected interval, in seconds, for the FlySight sample rate.
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 accuracy for the FlySight device.
Markdown representation of the end-user instructions on how to use SSScore.
Markdown representation of the end-user instructions to go to the new SSScore domain.
Speed run table interval.
The validation window length as defined in the competition rules.