Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 40,
|
"execution_count": 44,
|
||||||
"id": "9a9714f8",
|
"id": "9a9714f8",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -10,9 +10,13 @@
|
|||||||
"name": "stderr",
|
"name": "stderr",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
|
"logger WARNING \tFailed to load schedule from FastF1 backend!\n",
|
||||||
|
"req INFO \tUsing cached data for season_schedule\n",
|
||||||
|
"req INFO \tUsing cached data for season_schedule\n",
|
||||||
"core INFO \tLoading data for Italian Grand Prix - Race [v3.6.1]\n",
|
"core INFO \tLoading data for Italian Grand Prix - Race [v3.6.1]\n",
|
||||||
"req INFO \tUsing cached data for session_info\n",
|
"req INFO \tUsing cached data for session_info\n",
|
||||||
"req INFO \tUsing cached data for driver_info\n",
|
"req INFO \tUsing cached data for driver_info\n",
|
||||||
|
"core INFO \tLoading data for Italian Grand Prix - Race [v3.6.1]\n",
|
||||||
"req INFO \tUsing cached data for session_info\n",
|
"req INFO \tUsing cached data for session_info\n",
|
||||||
"req INFO \tUsing cached data for driver_info\n",
|
"req INFO \tUsing cached data for driver_info\n",
|
||||||
"req INFO \tUsing cached data for session_status_data\n",
|
"req INFO \tUsing cached data for session_status_data\n",
|
||||||
@@ -33,28 +37,28 @@
|
|||||||
"req INFO \tUsing cached data for position_data\n",
|
"req INFO \tUsing cached data for position_data\n",
|
||||||
"req INFO \tUsing cached data for weather_data\n",
|
"req INFO \tUsing cached data for weather_data\n",
|
||||||
"req INFO \tUsing cached data for race_control_messages\n",
|
"req INFO \tUsing cached data for race_control_messages\n",
|
||||||
"core WARNING \tDriver 1 completed the race distance 06:25.888000 before the recorded end of the session.\n",
|
|
||||||
"core WARNING \tDriver 11 completed the race distance 06:19.824000 before the recorded end of the session.\n",
|
|
||||||
"core WARNING \tDriver 55 completed the race distance 06:14.695000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 55 completed the race distance 06:14.695000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 16 completed the race distance 06:14.511000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 4 completed the race distance 05:40.439000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 63 completed the race distance 06:07.860000 before the recorded end of the session.\n",
|
|
||||||
"core WARNING \tDriver 44 completed the race distance 05:48.209000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 44 completed the race distance 05:48.209000 before the recorded end of the session.\n",
|
||||||
|
"core WARNING \tDriver 16 completed the race distance 06:14.511000 before the recorded end of the session.\n",
|
||||||
|
"core WARNING \tDriver 1 completed the race distance 06:25.888000 before the recorded end of the session.\n",
|
||||||
"req INFO \tUsing cached data for weather_data\n",
|
"req INFO \tUsing cached data for weather_data\n",
|
||||||
"req INFO \tUsing cached data for race_control_messages\n",
|
"req INFO \tUsing cached data for race_control_messages\n",
|
||||||
|
"core WARNING \tDriver 55 completed the race distance 06:14.695000 before the recorded end of the session.\n",
|
||||||
|
"core WARNING \tDriver 4 completed the race distance 05:40.439000 before the recorded end of the session.\n",
|
||||||
|
"core WARNING \tDriver 44 completed the race distance 05:48.209000 before the recorded end of the session.\n",
|
||||||
|
"core WARNING \tDriver 16 completed the race distance 06:14.511000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 1 completed the race distance 06:25.888000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 1 completed the race distance 06:25.888000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 11 completed the race distance 06:19.824000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 11 completed the race distance 06:19.824000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 55 completed the race distance 06:14.695000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 11 completed the race distance 06:19.824000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 16 completed the race distance 06:14.511000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 23 completed the race distance 05:40.782000 before the recorded end of the session.\n",
|
||||||
|
"core WARNING \tDriver 23 completed the race distance 05:40.782000 before the recorded end of the session.\n",
|
||||||
|
"core WARNING \tDriver 14 completed the race distance 05:39.594000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 63 completed the race distance 06:07.860000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 63 completed the race distance 06:07.860000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 44 completed the race distance 05:48.209000 before the recorded end of the session.\n",
|
|
||||||
"core WARNING \tDriver 23 completed the race distance 05:40.782000 before the recorded end of the session.\n",
|
|
||||||
"core WARNING \tDriver 4 completed the race distance 05:40.439000 before the recorded end of the session.\n",
|
|
||||||
"core WARNING \tDriver 14 completed the race distance 05:39.594000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 14 completed the race distance 05:39.594000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 23 completed the race distance 05:40.782000 before the recorded end of the session.\n",
|
"core WARNING \tDriver 63 completed the race distance 06:07.860000 before the recorded end of the session.\n",
|
||||||
"core WARNING \tDriver 4 completed the race distance 05:40.439000 before the recorded end of the session.\n",
|
"core INFO \tFinished loading data for 20 drivers: ['55', '4', '44', '16', '1', '10', '81', '11', '40', '20', '23', '24', '27', '2', '14', '63', '77', '31', '22', '18']\n",
|
||||||
"core WARNING \tDriver 14 completed the race distance 05:39.594000 before the recorded end of the session.\n",
|
"core INFO \tFinished loading data for 20 drivers: ['55', '4', '44', '16', '1', '10', '81', '11', '40', '20', '23', '24', '27', '2', '14', '63', '77', '31', '22', '18']\n"
|
||||||
"core INFO \tFinished loading data for 20 drivers: ['1', '11', '55', '16', '63', '44', '23', '4', '14', '77', '40', '81', '2', '24', '10', '18', '27', '20', '31', '22']\n",
|
|
||||||
"core INFO \tFinished loading data for 20 drivers: ['1', '11', '55', '16', '63', '44', '23', '4', '14', '77', '40', '81', '2', '24', '10', '18', '27', '20', '31', '22']\n"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -261,7 +265,7 @@
|
|||||||
"9 MEDIUM 1.0 42.5 False "
|
"9 MEDIUM 1.0 42.5 False "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 40,
|
"execution_count": 44,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
@@ -353,7 +357,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 41,
|
"execution_count": 45,
|
||||||
"id": "45d27f05",
|
"id": "45d27f05",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -517,7 +521,7 @@
|
|||||||
"max 100.000000 33.000000 44.400000 "
|
"max 100.000000 33.000000 44.400000 "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"execution_count": 41,
|
"execution_count": 45,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"output_type": "execute_result"
|
"output_type": "execute_result"
|
||||||
}
|
}
|
||||||
@@ -534,17 +538,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 42,
|
"execution_count": 46,
|
||||||
"id": "2fbcd2f9",
|
"id": "2fbcd2f9",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"final_df.to_csv(\"ALONSO_2023_MONZA_RACE\")"
|
"final_df.to_csv(\"ALONSO_2023_MONZA_RACE.csv\")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 43,
|
"execution_count": 47,
|
||||||
"id": "729fb12e",
|
"id": "729fb12e",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
|||||||
|
Can't render this file because it is too large.
|
@@ -164,8 +164,6 @@ def main():
|
|||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Simulate Raspberry Pi telemetry streaming from CSV data"
|
description="Simulate Raspberry Pi telemetry streaming from CSV data"
|
||||||
)
|
)
|
||||||
parser.add_argument("--data", type=str, default="ALONSO_2023_MONZA_RACE",
|
|
||||||
help="Path to telemetry CSV file")
|
|
||||||
parser.add_argument("--endpoint", type=str, default="http://localhost:8000/telemetry",
|
parser.add_argument("--endpoint", type=str, default="http://localhost:8000/telemetry",
|
||||||
help="HPC API endpoint")
|
help="HPC API endpoint")
|
||||||
parser.add_argument("--speed", type=float, default=1.0,
|
parser.add_argument("--speed", type=float, default=1.0,
|
||||||
@@ -176,12 +174,9 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Handle relative paths from the project root
|
# Hardcoded CSV file location in the same folder as this script
|
||||||
data_path = Path(args.data)
|
script_dir = Path(__file__).parent
|
||||||
if not data_path.is_absolute():
|
data_path = script_dir / "ALONSO_2023_MONZA_RACE.csv"
|
||||||
# Try relative to script location first
|
|
||||||
script_dir = Path(__file__).parent.parent
|
|
||||||
data_path = script_dir / args.data
|
|
||||||
|
|
||||||
df = load_telemetry_csv(data_path)
|
df = load_telemetry_csv(data_path)
|
||||||
simulate_stream(
|
simulate_stream(
|
||||||
@@ -192,8 +187,8 @@ def main():
|
|||||||
args.end_lap
|
args.end_lap
|
||||||
)
|
)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print(f"❌ File not found: {args.data}")
|
print(f"❌ File not found: {data_path}")
|
||||||
print(f" Tried: {data_path}")
|
print(f" Make sure ALONSO_2023_MONZA_RACE.csv is in the scripts/ folder")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"❌ Error: {e}")
|
print(f"❌ Error: {e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user