I am currently writing some code to do multilateration using TDOA and currently struggling and wondering if anyone has any reference code that can be used as a test case with some sample data that I have! At the moment I am unsure if it is the code I have written or whether it is the geometry of the points that is off.
One example group of packets that I have received is
station1 = [50.919149572907784,-1.005043823556842,90.729];
station2 = [50.8304,-1.21956,0];
station3 = [51.0569,-1.26224,100];
stations = [station2,station1,station3];
timestamps = [28704.175275109, 28704.175334203, 28704.175334875];
My code currently locates this to 50.910447339754654,-1.2347406519401736 which I am 99% sure is wrong! Does anyone have any code that can verify this at all?
One bit of code I am testing against and get very similar results is https://github.com/bistromath/gr-air-modes/blob/master/python/mlat.py
Answer
At a first glance, the results make sense to me.
If you want to check, you could use this link to convert the coordinates of your three stations and the coordinate of your point into ECEF XYZ coordinates.
Then it is quite straightforward to verify that the solution is correct:
compute the distance from each station to your point (you did not provide the H) and divide it by the speed of light to get the time. If you have the same difference between the timestamp and the time to each station for each station, then it was correct.
EDIT: After checking, there seems to be a problem. Maybe you could check wgs84 to ECEF in the code that you mention. I think that line 82 should be
z = (n(lat)*(1-wgs84_e2)**2+alt)*math.sin(lat)
it could be useful to test your code based on verified ECEF coordinates to identify the source of error.
As a remark, a possible source of (small) error is the use of the height above sea level instead of the height above ellipsoid, but this does not expla the observed error.
No comments:
Post a Comment