Page 1 of 1

Lazy Planner Equation/Logic Needed

Posted: Oct 15 2017 8:58 pm
by joebartels
Someone that shall remain nameless constantly haggles me RS calls out the wrong distance to a waypoint.
example.png
Exhibit A
Should I spend days if not weeks figuring out how to calculate the distance this chap desires?
- He could simply place the waypoint at the blue dot

Or should I ignore nameless and move on to more important things like the smilies to emojis conversion.

Those with the math or logic skills to solve the above please message me.
Already have the logic to
- find the nearest track
- find nearest point in track ( series of coordinates )
Need logic to
- find the nearest distance within x feet of waypoint
- seems we need to know every point in the line within x feet then take the one with the least distance to reach

Re: Lazy Planner Equation/Logic Needed

Posted: Oct 15 2017 9:30 pm
by big_load
I don't get where the 14.7 miles came from. Is it 14.7 miles from where he started and he's now about 3/4 of the way through a ~20 mile trip? If you're using distances along an out-and-back track, it can be tricky to pick the right one. One could probably design a track to fool any given algorithm. Anyway, I can survive without a numerical readout of the distance. I can tell from the map roughly how far it is. I vote for placing the waypoint at the blue dot.

Re: Lazy Planner Equation/Logic Needed

Posted: Oct 15 2017 9:34 pm
by joebartels
@big_load
- hiker is 4.75 miles into hike
- waypoint is closest to a point in the track at 14.7 miles
- however 100 feet away where the waypoint should have been placed is a track point at 5.1 miles

Re: Lazy Planner Equation/Logic Needed

Posted: Oct 15 2017 9:54 pm
by joebartels
Nairmind believe I figured out a low calculation solution! :y:
Expect the smilies to emojis conversion in the next year Image

Re: Lazy Planner Equation/Logic Needed

Posted: Oct 15 2017 9:57 pm
by big_load
joebartels wrote:Expect the smilies to emojis conversion in the next year
When we switch to emojis, do I have to get a modern haircut?

Re: Lazy Planner Equation/Logic Needed

Posted: Oct 15 2017 10:24 pm
by The_Eagle
Thanks,
Nameless
:pout: :sl: :wrt: :M2C: :lone: 8) :x :oops: :cry: : rambo : :| : app : :doh: :pray: 8-[ [-( :-k :stop: :sk: :-$ :-s :DANCE: :--: :zzz: :welcome: :pk: :next: :yr: