Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 58a71a5

Browse files
committed
getTarget.py important bug fix improve target res accuracy
1 parent 263bd43 commit 58a71a5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/getTarget.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,15 @@ def resolveTarget(y, x, z, azimuth, theta, elevationData, xParams, yParams):
275275
y1 = yParams[1]
276276

277277
dx = xParams[2]
278-
#meters of acceptable distance between constructed line and datapoint
279-
threshold = abs(dx) / 4.0
280278

281-
#meters of increment for each stepwise check (along constructed line)
279+
280+
post_spacing_meters = haversine(0, y, dx, y, z) # meters between datapoints, from degrees
281+
threshold = abs(post_spacing_meters) / decimal.Decimal(8.0) # meters of acceptable distance between constructed line and datapoint. somewhat arbitrary
282+
283+
# meters of increment for each stepwise check (along constructed line)
282284
increment = decimal.Decimal(config.increment)
283285

284286
# start at the aircraft's position
285-
286287
curY = decimal.Decimal(y)
287288
curX = decimal.Decimal(x)
288289
curZ = decimal.Decimal(z)

0 commit comments

Comments
 (0)