Motion#
Introduction#
The VEX AIR Hornet features four propellers, allowing it to move in any direction and rotate independently. Motion provides methods for movement, turning, speed adjustments, and position tracking.
Below is a list of available blocks:
Actions – Move and turn the Hornet.
take off - Lifts the Hornet to a specified height.
land - Lands the Hornet.
hover - Keeps the Hornet at its position.
climb - Moves the Hornet in a specified vertical direction.
climb for - Moves the Hornet in a specified vertical direction for a specific distance.
climb to altitude - Moves the Hornet to a specified altitude.
move – Moves the Hornet forward, reverse, left, or right.
move at angle – Moves the Hornet in a specified direction using an angle.
move for – Moves the Hornet in a specific direction for a set distance.
move at angle for – Moves the Hornet at a specific angle for a set distance.
turn – Rotates the Hornet left or right.
turn for – Rotates the Hornet for a specified number of degrees.
turn to heading – Rotates the Hornet to face a specific heading.
move with controller – Allows the Hornet to be driven using the controller.
Flight Control – Adjust flight settings.
set steering POV – Sets the POV for steering the Hornet.
set movement – Sets the movement style of the Hornet.
Settings – Adjust movement and turn speeds.
set climb velocity – Sets the default climbing speed.
set move velocity – Sets the default movement speed.
set turn velocity – Sets the default turning speed.
Altitude – Track and modify the Hornet’s maximum altitude.
altitude – Returns the Hornet’s altitude.
set maximum altitude - Sets the maximum altitude.
Position – Track and modify the Hornet’s position.
position – Returns the Hornet’s current x, y, or z coordinate.
set drone position – Manually sets the Hornet’s x, y, and z position.
Values – Check movement status.
safe mode? - Returns the Hornet’s propeller lock state.
climb active? - Returns whether the Hornet is currently climbing.
move active? – Returns whether the Hornet is currently moving.
turn active? – Returns whether the Hornet is currently turning.
hovering? - Returns whether the Hornet is currently hovering.
taking off? - Returns whether the Hornet is currently taking off.
landing? - Returns whether the Hornet is currently landing.
Actions#
take off#
The take off block lifts the Hornet into the air.
take off to [500] mm ▶
Parameters |
Description |
---|---|
distance |
The distance the Hornet will fly to in millimeters. |
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Example
Example coming soon!
land#
The land block lands the Hornet.
land ▶
Parameters |
Description |
---|---|
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Example
Example coming soon!
hover#
The hover block makes the Hornet hover in the air.
hover
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
climb#
The climb block moves the Hornet in a specified vertical direction.
climb [up v]
Parameters |
Description |
---|---|
direction |
The direction in which the Hornet will fly:
|
Example
Example coming soon!
climb for#
The climb for block moves the Hornet in a specified vertical direction for a specific distance.
climb [up v] for (500) [mm v] ▶
Parameters |
Description |
---|---|
direction |
The direction in which the Hornet will fly:
|
distance |
The distance the Hornet will fly for. |
units |
The unit of measurement, which can be one of the following:
|
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Example
Example coming soon!
climb to altitude#
The climb to altitude block moves the Hornet to a specific altitude.
climb to altitude [500] [mm v] ▶
Parameters |
Description |
---|---|
altitude |
The altitude, as an integer or decimal, the Hornet will climb to. |
units |
The unit of measurement, which can be one of the following:
|
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Example
Example coming soon!
move#
The move block moves the Hornet in four specific directions using the current move velocity.
move [forward v]
Parameters |
Description |
---|---|
direction |
Move the Hornet in one of the following directions:
|
Example
Example coming soon!
move at angle#
The move at angle block moves the Hornet at a specified angle using the current move velocity.
move at (90) degrees ▶
Parameters |
Description |
---|---|
angle |
The angle, as an integer or decimal, at which the Hornet moves, ranging from 0 to 360 degrees. |
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Examples
Example coming soon!
move for#
The move for block moves the Hornet in four specific directions for a specific distance using the current move velocity.
move [forward v] for (200) [mm v] ▶
Parameters |
Description |
---|---|
direction |
Move the Hornet in one of the following directions:
|
distance |
The distance, as an integer or decimal, that the Hornet will move. |
unit |
The unit of measurement, which can be one of the following:
|
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Example
Example coming soon!
move at angle for#
The move at angle for block moves the Hornet at a specific angle for a specified distance using the current move velocity.
move at (45) degrees for (200) [mm v] ▶
Parameters |
Description |
---|---|
angle |
The angle, as an integer or decimal, at which the Hornet moves, ranging from 0 to 360 degrees. |
distance |
The distance, as an integer or decimal, that the Hornet will move. |
unit |
The unit of measurement, which can be one of the following:
|
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Examples
Example coming soon!
turn#
The turn block turns the Hornet in a specific direction using the current turn velocity.
turn [right v]
Parameters |
Description |
---|---|
direction |
The direction in which the Hornet turns:
|
Example
Example coming soon!
turn for#
The turn for block turns the Hornet in a specified direction for a set distance relative to its current facing direction using the current turn velocity.
turn [right v] for (90) degrees ▶
Parameters |
Description |
---|---|
direction |
The direction in which the Hornet turns:
|
angle |
The angle, as an integer or decimal, at which the Hornet moves, ranging from 0 to 360 degrees. |
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Examples
Example coming soon!
turn to heading#
The turn to heading block turns the Hornet to face a specific heading using the current turn velocity.
turn to heading (270) degrees ▶
Parameters |
Description |
---|---|
heading |
The heading that the Hornet will turn to face from 0 to 360 degrees. |
expanding arrow |
By default, this is a waiting block, so the Hornet will finish moving before running the next block. To make the Hornet start moving and immediately run the next block right away, expand the block to say and don’t wait. |
Examples
Example coming soon!
move with controller#
The move with controller block lets you drive the Hornet using the VEX AIR Controller. To use the controller, you need to put the block inside a loop - such as a “forever” loop. If the loop stops and there are no other blocks telling the Hornet to move, the Hornet will keep going in the last direction you pushed the joystick.
move with controller
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
–>
Flight Control#
set steering POV#
The set steering POV block sets the viewpoint that is used when steering the Hornet.
set steering POV to [pilot v]
Parameters |
Description |
---|---|
style |
Sets the viewpoint that is used to steer the Hornet:
|
Example
Example coming soon!
set movement#
The set movement block sets the Hornet’s movement style.
set movement to [sport v]
Parameters |
Description |
---|---|
style |
Sets the speed that is used to steer the Hornet:
|
Example
Example coming soon!
Settings#
set climb velocity#
The set climb velocity block sets the default climbing speed as a percentage for all subsequent movement blocks in the project.
set climb velocity to [100] %
Parameters |
Description |
---|---|
velocity |
The velocity at which the Hornet will climb as a percent. |
Example
Example coming soon!
set move velocity#
The set move velocity block sets the default movement speed as a percentage for all subsequent movement blocks in the project.
set move velocity to (100)%
Parameters |
Description |
---|---|
velocity |
The velocity at which the Hornet will move as a percent. |
Example
Example coming soon!
set turn velocity#
Documentation Coming Soon
Altitude#
altitude#
The altitude block returns the Hornet’s altitude.
altitude in [mm v]
Parameters |
Description |
---|---|
units |
The unit of measurement, which can be one of the following:
|
Example
Example coming soon!
set maximum altitude#
Documentation Coming Soon
Position#
position#
The position block returns the Hornet’s current x, y, or z-coordinate as an integer.
[x v] position in [mm v]
Parameters |
Description |
---|---|
coordinate |
The coordinate axis, which can be one of the following:
|
unit |
The unit of measurement, which can be one of the following:
|
Example
Example coming soon!
set drone position#
The set drone position block sets the Hornet’s current position to specified values in millimeters (mm).
set drone position x: (0) y: (0) z: (0)
Parameters |
Description |
---|---|
x |
The x-position to set for the Hornet, in mm. |
y |
The y-position to set for the Hornet, in mm. |
z |
The z-position to set for the Hornet, in mm. |
Example
Example coming soon!
Values#
safe mode?#
The safe mode? block returns a Boolean indicating whether the propeller lock is enabled on the Hornet.
True – Propellers are in locked.
False – Propellers are not locked.
<safe mode?>
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
climb active?#
The climb active? block returns a Boolean indicating whether the Hornet is climbing.
True – The Hornet is currently climbing.
False – The Hornet is not climbing.
<climb active?>
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
move active?#
The move active? block returns a Boolean indicating whether the Hornet is moving.
True – The Hornet is currently moving.
False – The Hornet is not moving.
<move active?>
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
turn active?#
The turn active? block returns a Boolean indicating whether the Hornet is turning.
True – The Hornet is currently turning.
False – The Hornet is not turning.
<turn active?>
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
hovering?#
The hovering? block returns a Boolean indicating whether the Hornet is hovering.
True – The Hornet is currently hovering.
False – The Hornet is not hovering.
<hovering?>
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
taking off?#
The taking off? block returns a Boolean indicating whether the Hornet is taking off.
True – The Hornet is currently taking off.
False – The Hornet is not taking off.
<taking off?>
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!
landing?#
The landing? block returns a Boolean indicating whether the Hornet is landing.
True – The Hornet is currently landing.
False – The Hornet is not landing.
<landing?>
Parameters |
Description |
---|---|
This block has no parameters. |
Example
Example coming soon!