Indoor Positioning Most indoor positioning algorithms depend on accurate base station…
- User
Indoor Positioning Most indoor positioning algorithms depend on accurate base station locations. However, in actual scenarios, the cost of obtaining accurate base station locations is high. Many base stations are hidden in the ceiling and cannot be measured. It is a difficult problem in the industry to locate users and sites simultaneously by using only a few accurate sites and a large number of users’ delay measurements. Consider a room as 20 20 meters square in 2D. The center of the room has the coordinate (0, 0). There are four base stations (BS) and n user equipment (UE) devices located in the room. Both BSs and UEs can be considered points inside the room. Base stations are located in four different quadrants of the plane in the order shown in the image below. You know the exact locations of the first two BSs, but you don’t know the locations of the remaining two BSs as well as all UEs. For each UE, you are given the time of arrival (ToA) in nanoseconds (ns) of signal from the UE to each of the four base stations. ToA is measured on the base station and includes transmission delay and noise. More information on how ToA is calculated can be found in the Test generation section below. Based on the given information, your task is to estimate the coordinates of the remaining two BSs as well as all UEs as closely as possible to the actual positions. Input The first line contains a single integer n – the number of UEs. The second line contains two space-separated floating-point numbers xbs;1 and ybs;1 – the coordinates of the first BS. The third line contains two space-separated floating-point numbers xbs;2 and ybs;2 – the coordinates of the second BS. The following n lines contain four space-separated floating-point numbers ti;1 ti;2 ti;3 ti;4 each, denoting the measured time of arrival from the i-th UE to the corresponding BS. 1 Output In the first line print two space-separated floating-point numbers xbs;3 and ybs;3 – the estimated coordinates of the third BS. In the second line print two space-separated floating-point numbers xbs;4 and ybs;4 – the estimated coordinates of the fourth BS. In the next n lines print estimated coordinates xue;i and yue;i of the corresponding UEs. Constraints 20 n 200, ti;j > 0, xbs;1 0 and ybs;1 0, xbs;2 0 and ybs;2 0, xbs;3 0 and ybs;3 0, xbs;4 0 and ybs;4 0, 10 xbs;i; ybs;i; xue;i; yue;i 10. Notes Sample test case Check the following sample test case. Note that in this test case the number of UEs is less than the allowed lower limit in the constraints (20). This test case is for demonstration purposes only and is not included in the provisional or final test sets. Input (stdin) Output (stdout) 7 -5.000 -5.000 7.000 -4.000 126.299 95.354 120.525 119.727 135.098 180.551 172.184 194.325 234.749 259.073 214.143 242.686 229.045 226.359 212.143 234.152 88.203 56.870 66.165 95.202 244.898 246.406 219.213 211.507 165.713 182.486 188.144 209.985 -0.657574772 2.202897216 9.612727847 7.184456177 6.052894344 -3.230646577 -6.258069892 -5.628141926 -7.630356154 8.287634824 0.906085783 0.813700552 5.519233285 -2.995729624 3.011525986 8.822308221 -0.400688838 -7.997504188 The actual positions of the four BSs are (-5, -5), (7, -4), (-2, 3) and (7, 9). There are 7 UEs in positions (5, -4), (-5, -8), (-9, 7), (1, 1), (4, -1), (4, 6) and (1, -5). All actual and estimated positions for this sample test case are shown on the image below. 2 Scoring If your output for the test is invalid, i.e. the coordinates are missing, out of bounds of the room or corresponding base station quadrant, your score for a test is 0. Otherwise, your score for the test is
- Assistant