How to change the altitude in UAV Package Delivery Example?

3 views (last 30 days)
I am using the UAV Package Delivery Example to fly a drone on top of the buildings in the US City Block. Are the heights of the buildings have a finite value or they are assumed to be inifinity? How do i change the altitude of the UAV such that I can fly above the buildings?

Answers (1)

Jianxin Sun
Jianxin Sun on 6 Dec 2023
The buildings in US City Block has finite height. You can increase your flight altitude in simulation to 150, which should put your UAV well above any buildings. Or you can use a lower value that suit your needs. To change the flight altitude, you can use the following methods:
  1. If you are using QGroundControl to upload mission to UAV in simulation, you can set waypoint height in QGroundControl
  2. If you are using the pre-deifined mission in UAV package delivery example, you can modify the mission by editing the baseMission variable in the associated data dictionary. The baseMission is a struct array with field position. You can change the last column in position variable with a different z value. The position is defined in NED frame, thus z value is negative. You can set it to -150 to increase the altidue to 150.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!