mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-19 05:07:55 +00:00
prevent future uploads
This commit is contained in:
parent
77c81dbe73
commit
f71dbde125
@ -228,6 +228,9 @@ def telemetry_filter(telemetry):
|
||||
return (False, f"Unable to parse time")
|
||||
|
||||
sonde_time_threshold = 48
|
||||
future_time_threshold_seconds = 60
|
||||
if _delta_time < -future_time_threshold_seconds:
|
||||
return (False, f"Sonde reported time too far in the future. Either sonde time or system time is invalid. (Threshold: {future_time_threshold_seconds} seconds)")
|
||||
if abs(_delta_time) > (3600 * sonde_time_threshold):
|
||||
return (False, f"Sonde reported time too far from current UTC time. Either sonde time or system time is invalid. (Threshold: {sonde_time_threshold} hours)")
|
||||
|
||||
|
@ -11,7 +11,7 @@ body = [{
|
||||
"uploader_position": [53.23764, 7.74426, 7.0],
|
||||
"uploader_antenna": "5/8-Wave-J-Pole",
|
||||
"time_received": "2023-01-22T22:48:43.208780Z",
|
||||
"datetime": "2023-01-22T22:48:41.000000Z",
|
||||
"datetime": "2023-06-13T00:48:41.000000Z",
|
||||
"manufacturer": "Vaisala",
|
||||
"type": "RS41",
|
||||
"serial": "U1440085",
|
||||
|
Loading…
Reference in New Issue
Block a user