Takeoff/Land

set_takeoffALT(mavID, altitude)

Used to specify the takeoff altitude of a sepcific Mav.

Altitudes in the upwards direction are NEGATIVE, as the NED frame is used.

mavID=1;
alt=-2; % 2 meters upwards
obj.set_takeoffALT(mavID,alt);

takeoff(mavID)

Used to start sending the takeof position. The Mav will not takeoff untill the OFFBOARD mode is activated.

mavID=1;
obj.takeoff(mavID);

To actually takeoff the intended Pixhawk, use the following in order to activate the OFFBOARD command:

mavID=1;
alt=-2; % 2 meters upwards
obj.set_takeoffALT(mavID,alt);
obj.takeoff(mavID);
activate=1;
m.toggle_OFFB(mavID,activate);

Land(mavID)

Used to land the vehicle at its current (x,y) position.

mavID=1;
obj.Land(mavID);

Put the vehicle back into Manual mode after landing. The vehicle might get close to ground, and wait for disarm. Use the following commands to, deactivate OFFBOARD mode, disarm, and set the mode back to MANUAL:

mavID=1;
deactivate=0;
obj.toggle_OFFB(mavID,deactivate);
obj.Arm(mavID,deactivate);
obj.setManual(mavID);

results matching ""

    No results matching ""