In chrRaidTransport (CharonPirates.xml) we calculate this by laboriously iterating over points along the nav path (using sysGetNavPathPoint). This function would be able to do it quicker and more accurate.