# Desired track for aircraft navigation

I am working on a flight planning application and I am need to calculate the desired track(DTK) of the current leg and upcoming legs of a entered flight plan. The formula and logic of solving that is easy in code but what I am unsure of is when/where do I introduce magnetic variation when displaying this data.

It could be calculated at "Waypoint1"(start of leg) but then then over large distances as the magvar changes I'd assume this number would become inaccurate.

I could use the halfway point between "Waypoint1" and "Waypoint2" but then again over large distances this number could prove to be incorrect and provide the pilot with a inaccurate DTK on entry of the leg.

Using a WMM model we I can predict the magvar at any point with known lat/longs and I also have access to a magnetometer data output.

Does anyone know what RTCA or AIRNC manual that may point me in the right direction or have some insight on best practices?

• Why are you specifying track as a magnetic direction? Shouldn't you calculate track in true? Commented Dec 14, 2023 at 19:44
• That is a option for the user to select if the representation is in true, magnetic or user defined. Commented Dec 14, 2023 at 19:52
• Is that something pilots actually need? What would be the use of "custom"? I also think you are assuming that the magnetic direction of a track is the same at the start as at the end. Commented Dec 14, 2023 at 20:18
• The use case for the pilot is unknown but we have it as more as debug option for us here while we are developing. Can you elaborate on what you mean by the mag direction from start to end? Is that because the the magnetic variation changes as you traverse the globe? Commented Dec 14, 2023 at 21:23
• Yes. Also, are your tracks great circles? Or are you assuming each track segment has a constant true direction along its length? Commented Dec 15, 2023 at 0:12