Hi everyone
I am writing a python script to go to a waypoint using Mission Planner, I define the latitude, longitude and altitude and set the guided mode in the script. The latitude and longitude works fine, but the altitude it doesn’t work and starts to drop inmedeatly, no matter what altitude I set.
Here is the code:
import sys
import clr
import time
import MissionPlanner #import *
clr.AddReference(“MissionPlanner.Utilities”) # includes the Utilities class
from MissionPlanner.Utilities import Locationwp
print ‘Starting Mission’
Script.ChangeMode(“Guided”)
print ‘Guided Mode’
item = MissionPlanner.Utilities.Locationwp()
lat = -35.363261
lng = 149.165235
alt = 60.000000
MissionPlanner.Utilities.Locationwp.lat.SetValue(item,lat)
MissionPlanner.Utilities.Locationwp.lng.SetValue(item,lng)
MissionPlanner.Utilities.Locationwp.alt.SetValue(item,alt)
print ‘WP 1 Defined’
MAV.setGuidedModeWP(item)
print ‘Going to WP 1’
time.sleep(150)
I have no problems using Guided Mode in the software, but with the python script the altitude drops
Is there any parameters I should check to fix this problem?
Thank You