You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DroneDetector/train_scripts/triangulation_direction_2D....

58 lines
1.4 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "f18afe4b",
"metadata": {},
"outputs": [],
"source": [
"import numpy \n",
"from math import sqrt as square\n",
"from numpy import sqrt, dot, cross \n",
"from numpy.linalg import norm \n",
"\n",
"#rssi = [rssi, max_rssi, min_rssi, gamma]\n",
"\n",
"def dist(rssi):\n",
" rssi = list(map(float, rssi))\n",
" return square(abs(rssi[0]-rssi[1]))*rssi[3]/square(abs(rssi[0]-rssi[2]))\n",
"\n",
"def sol(x1,x2,x3,rssi1,rssi2,rssi3):\n",
" r1 = dist(rssi1)\n",
" r2 = dist(rssi2)\n",
" r3 = dist(rssi3)\n",
" x1=numpy.array(x1)\n",
" x2=numpy.array(x2)\n",
" x3=numpy.array(x3)\n",
" \n",
" return sector.\n",
"\n",
"\n",
"print(sol([0,0,1],[0,0,-1],[0,10,0],[50,100,0,10.3],[50,100,0,10.3],[50,100,0,10.3]))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}