Hi guys
I made a script in python to Mission Planner.
I want the drone goes to the waypoint and just after it arrives it returns to the launch. But when it starts the mission, it returns immediately without goes to the waypoint.
This is my script:
import time
import MissionPlanner #import *
clr.AddReference(“MissionPlanner.Utilities”) # includes the Utilities class
time.sleep(10) # wait 10 seconds before starting
print 'Starting Mission’
Script.ChangeMode(“Guided”) # changes mode to "Guided"
print 'Guided Mode’
item = MissionPlanner.Utilities.Locationwp() # creating waypoint
lat = -3.779830 # Latitude value
lng = -38.541590 # Longitude value
alt = 100 # altitude value
MissionPlanner.Utilities.Locationwp.lat.SetValue(item,lat) # sets latitude
MissionPlanner.Utilities.Locationwp.lng.SetValue(item,lng) # sets longitude
MissionPlanner.Utilities.Locationwp.alt.SetValue(item,alt) # sets altitude
MAV.setGuidedModeWP(item) # tells UAV “go to” the set lat/long @ alt
print 'Going to Point 1’
Script.ChangeMode(“RTL”) # Return to Launch point
print ‘Returning to Launch’
Please someone help me!!!