SRL Archive - OSR Help

Radial walking compass compatibility


riwu

2012-10-10 09:34:02

I'm trying to radial walk with any compass direction (instead of restricting to perfect north).
What i'm currently doing is to add the radial recorded at north compass by (360-Round(rs_GetCompassAngleDegrees)) during run time. However, it seems to give me problem at certain radial.

Referring to the picture above, if i want to search the unshaded area, my SR would be 340, and ER would be 360+20=380? But it ended up walking in the completely opposite direction!

Any help will be appreciated.

litoris

2012-10-10 09:54:37

ER would be 20, no? Doesn't it always go through the smallest arc?

masterBB

2012-10-10 09:57:13

I said it ages ago. But it is still not changed. mapwalk.simba needs a fix.

Needs to be removed: (line 711)

if (SD > ED) then
Swap(SD, ED);

Needs to be change: (line 47)
    Result := FixD(dir + 0.0)   

into:
    Result := dir;   

I don't think it will ever be changed. Try another method then walking with Radials.

Footy

2012-10-10 09:57:43

You use -20, 20.

masterBB

2012-10-10 10:00:54

From: Footy
You use -20, 20.


no because someone decided it would be smart to use this:
https://github.com/MerlijnWajer/Simba/blob/master/Units/MMLAddon/PSInc/Wrappers/math.inc#L149

litoris

2012-10-10 10:08:33

From: masterBB
I said it ages ago. But it is still not changed. mapwalk.simba needs a fix.

Needs to be removed: (line 711)

if (SD > ED) then
Swap(SD, ED);

Needs to be change: (line 47)
    Result := FixD(dir + 0.0)   

into:
    Result := dir;   

I don't think it will ever be changed. Try another method then walking with Radials.


Send a pull request? I sent a trivial one a few months ago and they pulled it after a few weeks.

masterBB

2012-10-10 10:10:04

You are free to do so.

edit:
I have some problems with git. I fixed the FilterPointPie function making radialwalk possible, but didn't needed the radialwalk function. However, I said it in that thread, and in others multiple times, that radialwalk itself also needs a fix.

J J

2012-10-10 10:50:34

Yeah I had this problem aswell, I believe I combined the results of two different radial walks, one from 345->359 degrees and one from 1->15 or something :P Hope to see this getting fixed soon!

BraK

2012-10-10 11:01:27

Use TPAWalk instead? So much Better.