Modified mlat solver to solve to a threshold and quit. Also sorts incoming timestamps.

This commit is contained in:
Nick Foster
2010-12-06 10:28:44 -08:00
parent 1acea7c9fd
commit 35ca3c8869
2 changed files with 32 additions and 9 deletions

View File

@@ -2,6 +2,12 @@
import mlat
import numpy
ans = mlat.mlat(mlat.teststations, mlat.teststamps, mlat.testalt)
replies = []
for i in range(0, len(mlat.teststations)):
replies.append((mlat.teststations[i], mlat.teststamps[i]))
ans = mlat.mlat(replies, mlat.testalt)
error = numpy.linalg.norm(numpy.array(mlat.llh2ecef(ans))-numpy.array(mlat.testplane))
print error
range = numpy.linalg.norm(mlat.llh2geoid(ans)-numpy.array(mlat.llh2geoid(mlat.teststations[0])))
print "Error: %.2fm" % (error)
print "Range: %.2fkm (from first station in list)" % (range/1000)