{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":60095,"databundleVersionId":6542333,"sourceType":"competition"}],"dockerImageVersionId":30646,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"**Should the distance of phones in same trip keep EXACTLY same for each epoch?\nI thinks so, because the phones are fixed on the car and they keep relative static.\nBut the code bellow shows that the distance changes slightly over time.**","metadata":{}},{"cell_type":"code","source":"import glob\nimport os\nimport numpy as np\nimport pandas as pd\nimport pynmeagps as pm\n\n\ndirs =sorted(glob.glob(os.path.join('..', 'input','smartphone-decimeter-2023','sdc2023', 'train', '2023-05-23-19-56-us-ca-mtv-ie2','*','ground_truth.csv')))\n\nsm_a226b_gt=pd.read_csv(dirs[0])\nsm_a505g_gt=pd.read_csv(dirs[1])\n\n#to keep same length of the two groundtruth\nbbb=sm_a226b_gt\nccc=sm_a505g_gt[1:-1]\n\n#I don't konw why UnixTimeMillis is not excatly step by one second, so I just print the distance which is synchronous\nfor (_, m), (_, n) in zip(bbb.iterrows(), ccc.iterrows()):\n    dis=np.linalg.norm(np.array(pm.llh2ecef(*m[2:5]))-np.array(pm.llh2ecef(*n[2:5])))\n    print(f'YES,{dis}') if m['UnixTimeMillis'] == n['UnixTimeMillis'] else print(f'NO, diff={m[\"UnixTimeMillis\"]-n[\"UnixTimeMillis\"]}')\n    #print(index, type(row), row['code'], row['name'])","metadata":{"_uuid":"ab7efc8d-5d08-4b2c-9b4c-1c9907a90b79","_cell_guid":"95d74035-550b-4673-974f-d6ea8bb85a9d","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2024-02-17T06:43:54.234860Z","iopub.execute_input":"2024-02-17T06:43:54.235964Z","iopub.status.idle":"2024-02-17T06:43:54.575590Z","shell.execute_reply.started":"2024-02-17T06:43:54.235929Z","shell.execute_reply":"2024-02-17T06:43:54.574471Z"},"trusted":true},"execution_count":null,"outputs":[]}]}