Retrieving Waypoint Properties Using Lua

I’m working on some Lua scripts and I was wondering if there is a way to retrieve/read the various properties of waypoints using Lua. Specifically, the altitude property but grade and angle would be useful too.

See here:

ardupilot/wp_test.lua at master · ArduPilot/ardupilot (github.com)

There’s a binding to calculate bearing between two Location objects, but you’ll have to write your own function to calculate climb/descent gradient.

1 Like

Perhaps this is what you are looking for ardupilot/mission-load.lua at master · ArduPilot/ardupilot · GitHub

1 Like

Ah perfect, thanks guys.