From 7a713a7a0a0bf689b7ecfd71314bffa195531673 Mon Sep 17 00:00:00 2001 From: Charles Nicholson <83499056+crnicholson@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:54:40 -0500 Subject: [PATCH] Commit --- .DS_Store | Bin 10244 -> 10244 bytes Code/.DS_Store | Bin 8196 -> 8196 bytes Code/groundStation/uploader/main.py | 8 ++++---- Code/groundStation/websockets.cpp | 7 +++++++ README.md | 6 ++++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.DS_Store b/.DS_Store index 62c38016a5d97aac1023f712a4d59bfa82052565..af057be0c868ed8c545c457bc0a6efe404493449 100644 GIT binary patch delta 90 zcmZn(XbIThC%|;&#^eA23AW_qhWlJqlk)_mV9Y)NX{PQ6n^z0$V`1jdF`t|x8pU{F W@^R6NlVgP4H{TcQ;=?Me$_N1X!694# delta 132 zcmZn(XbIThC%}~CIXOT;f=%o0fDnXcS|^ r1=&sx6HSbQDa?OePly8*jcZ*2PD>T2)2>gc>a6 diff --git a/Code/.DS_Store b/Code/.DS_Store index 3aaa5cf757eea99818af2693565dced06f8689d3..3091f38e792972333c373c3ee2ce390a8ce61e26 100644 GIT binary patch delta 135 zcmZp1XmQxkCd!m~WwM=!oJelIi%U{Yei8!%1Bc9oIr{09#~eWtlW&OfpbBt_@i7KW RwiS`zY$4{yPMQ8Qi~x}3Dv$sG delta 135 zcmZp1XmQxkCd#DgHrY-@P9!(q#U&{xKZ${XfrHUb?X_mOn6BLFSvC9nVh diff --git a/Code/groundStation/uploader/main.py b/Code/groundStation/uploader/main.py index 9763da3..5cb1818 100644 --- a/Code/groundStation/uploader/main.py +++ b/Code/groundStation/uploader/main.py @@ -285,13 +285,13 @@ def input_thread(): ) -# Main WebSocket server coroutine +# Main WebSocket server coroutine. async def main(): print(f"Starting server on ws://0.0.0.0:{PORT}") async with websockets.serve(handle_connection, "0.0.0.0", PORT): - await asyncio.Future() # Run forever + await asyncio.Future() # Run forever. -# Run the server if __name__ == "__main__": - asyncio.run(main()) + threading.Thread(target=input_thread).start() + asyncio.run(main()) \ No newline at end of file diff --git a/Code/groundStation/websockets.cpp b/Code/groundStation/websockets.cpp index aca49a3..aee3a6e 100644 --- a/Code/groundStation/websockets.cpp +++ b/Code/groundStation/websockets.cpp @@ -58,6 +58,13 @@ void websocketsSetup() { Serial.print("Got Message: "); Serial.println(message.data()); #endif + JsonDocument doc; + deserializeJson(doc, message.data()); + + const char *sensor = doc["sensor"]; + long time = doc["time"]; + double latitude = doc["data"][0]; + double longitude = doc["data"][1]; }); } diff --git a/README.md b/README.md index abc2deb..205899f 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,12 @@ Do you have any questions? Are the docs incomplete and you want to ask anything? Reach out to me at [charlienicholsonr@gmail.com](mailto:charlienicholsonr@gmail.com). +## Flights + +# Mid August + +The glider was realeased from 5,000 feet. You can see the launch video [here](https://www.youtube.com/watch?v=DZU_8TDUlJg). You can find data on the release [here](https://www.youtube.com/watch?v=TiqkcGWG4g8). + ## License Both the software and documentation are under the [GNU GPL v3 license](https://choosealicense.com/licenses/gpl-3.0/). The hardware and the 3D files are under the [CERN Open Hardware Licence Version 2 - Strongly Reciprocal](https://choosealicense.com/licenses/cern-ohl-s-2.0/). The media is under the [CC BY 4.0 DEED](https://creativecommons.org/licenses/by/4.0/).