Jump to content

Question on geospatial math to compute intercept course

Recommended Posts

ETA, Apologies, should have posted this in the MOOSE thread. Mods, please relocate if possible.






I essentially want to route a water vessel to a point where it will generally intercept another one.


Since this is occurring in an OnSpawnGroup() function, as the units to be routed are dynamically spawned with SpawnScheduled() , I don't have the group and unit names available outside it in order to continue re-routing them, such as in a scheduler.


So my intent is to collect the heading and coordinate(vec) of the target vessel, and compute a 'predictive' route to an x/y point that will generally result in an intercept.


TL;DR: I want to get the present position and heading of a ship, then mathematically compute a point in front of it.


If anyone's tackled this or sees a better way to approach it. Perhaps this is a great candidate for another method? e.g.


COORDINATE:GetInterceptPoint(Vec2, heading, distance)


Where Vec2 is the current position, heading is the direction, and distance is how far away in meters the returned point on the course should be.


Return could be a coordinate or one of the pointvec's. The over arching purpose is to route some other unit there. :D





Edited by fargo007
wrong forum


Banner EDForum2020.jpg

Have fun. Don't suck. Kill bad guys. 👍


Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...