Copter drifting while using LUA script to fly in a circle

I am trying to make my copter goes in circles using this Lua script:

When I tried to fly with the script, the copter started to drift as seen in the image of the flight log below:

I think I am looking for a Lua script that works more like a “waypoint file/mission” where the copter navigates to exact waypoint locations that together make a circle. These waypoint positions need to update so that every time the “Circle Lua Script” is activated, the corresponding circle waypoints are created.

Any ideas that could help me move forward? :slight_smile: