diff --git a/shared/Log Analysis.ipynb b/shared/Log Analysis.ipynb index 387a790..f68b9d0 100644 --- a/shared/Log Analysis.ipynb +++ b/shared/Log Analysis.ipynb @@ -154,30 +154,7 @@ "outputs": [], "source": [ "folder_path = \"test_logs/\" + str(run_id)\n", - "file_list_start = os.listdir(folder_path)" - ] - }, - { - "cell_type": "markdown", - "id": "44b7438a", - "metadata": {}, - "source": [ - "## Clean anomalies based on threshold on last height" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f4c3b78c", - "metadata": {}, - "outputs": [], - "source": [ - "file_list = []\n", - "for file in file_list_start:\n", - " with open(folder_path + \"/\" + file, \"rb\") as file_pkl:\n", - " data = pickle.load(file_pkl)\n", - " if len(data[1]) == 2 and np.abs(data[0]['z'][-1]) < 0.15: # Threshold height, otherwise not landed (vz not trained)\n", - " file_list.append(file)" + "file_list = os.listdir(folder_path)" ] }, { @@ -212,6 +189,8 @@ "for i in range(len(last_pos)):\n", " if last_pos[i][0] <= 0.3 and last_pos[i][1] <= 0.3:\n", " success_cont += 1\n", + " if len(data[1]) == 3 and last_pos[i][2] > 0.3: # Checking also vz, if available\n", + " success_cont -= 1\n", "sr = 100 * success_cont / len(last_pos)\n", "\n", "print(\"Success Rate: {}\".format(sr))\n",