nicotupe
lvl.2
France
Offline
|
Hi,
I'm trying to program a waypointV2 mission for the M300 but the drone has a weird altitude behavior when I launch the mission.
When I set a waypoint around the altitude 300m, the drone tries to go either too high (about 100m too high) or too low (since it reaches the ground I don't know how much but I guess the same offset) and, sometimes (about 1 out of 20 times), it goes to the good altitude.
I've reproduced the problem with the drone flying or with the simulator active in four different locations.
There is no upload problem and the mission starts properly....
Any idea on what could cause this problem?
Here is a sample code of this part. In this example, instead of going to 30m, the simulator goes to 130m...
var lewp1 = DJIWaypointV2.init(coordinate: CLLocationCoordinate2D.init(latitude: 0.582165, longitude: 0.356691))
lewp1.altitude = 30
lewp1.heading = 0
lewp1.headingMode = .waypointCustom
lewp1.isUsingWaypointMaxFlightSpeed = true
lewp1.autoFlightSpeed = 5
lewp1.isUsingWaypointMaxFlightSpeed = true
lewp1.maxFlightSpeed = 5
lewp1.flightPathMode = .goToPointInAStraightLineAndStop
lewp1.dampingDistance = 0
var lewp2 = DJIWaypointV2.init(coordinate: CLLocationCoordinate2D.init(latitude: 0.582265, longitude: 0.356791))
lewp2.altitude = 20
lewp2.heading = 0
lewp2.headingMode = .waypointCustom
lewp2.isUsingWaypointMaxFlightSpeed = true
lewp2.autoFlightSpeed = 5
lewp2.isUsingWaypointMaxFlightSpeed = true
lewp2.maxFlightSpeed = 5
lewp2.flightPathMode = .goToPointInAStraightLineAndStop
lewp2.dampingDistance = 0
|
|