mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-21 22:17:52 +00:00
add descending field
This commit is contained in:
parent
a99f6de735
commit
9618ba13cf
@ -3,8 +3,6 @@ import botocore.credentials
|
||||
from botocore.awsrequest import AWSRequest
|
||||
from botocore.endpoint import URLLib3Session
|
||||
from botocore.auth import SigV4Auth
|
||||
from aws_xray_sdk.core import xray_recorder
|
||||
from aws_xray_sdk.core import patch_all
|
||||
import json
|
||||
import os
|
||||
from datetime import datetime, timedelta, timezone
|
||||
@ -309,6 +307,7 @@ def predict(event, context):
|
||||
"ascent_rate":value['request']['ascent_rate'],
|
||||
"descent_rate":value['request']['descent_rate'],
|
||||
"burst_altitude": value['request']['burst_altitude'],
|
||||
"descending": 1 if serials[serial]['rate'] < 0 else 0,
|
||||
"landed": 0,
|
||||
"data": json.dumps(data)
|
||||
})
|
||||
@ -339,10 +338,10 @@ if __name__ == "__main__":
|
||||
# max_positions: 0
|
||||
# position_id: 0
|
||||
# vehicles: RS_*;*chase
|
||||
predict(
|
||||
print(predict(
|
||||
{"queryStringParameters" : {
|
||||
}},{}
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
|
||||
|
@ -264,7 +264,13 @@ def datanew(event, context):
|
||||
"1": {
|
||||
"top_hits": {
|
||||
"size": 5,
|
||||
"sort": [{"pressure": {"order": "desc","mode" : "median"}},{"humidity": {"order": "desc","mode" : "median"}},{"temp": {"order": "desc","mode" : "median"}},{"alt": {"order": "desc","mode" : "median"}}],
|
||||
"sort": [
|
||||
{"datetime": {"order": "desc"}},
|
||||
{"pressure": {"order": "desc","mode" : "median"}},
|
||||
{"humidity": {"order": "desc","mode" : "median"}},
|
||||
{"temp": {"order": "desc","mode" : "median"}},
|
||||
{"alt": {"order": "desc","mode" : "median"}}
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user