Introduction
Imagine you want a drone to fly from where it is to a specific spot in the sky. You need a simple way to tell it exactly where to go. The goto() command solves this by giving clear instructions to the drone to move to a chosen location.
Jump into concepts and practice - no test required
Imagine you are giving a friend directions to meet you at a certain bench in a park. You tell them the exact spot by describing landmarks or coordinates. Your friend then walks straight to that bench without wandering around.
┌───────────────┐
│ Current Drone │
│ Position │
└──────┬────────┘
│ goto() command with coordinates
↓
┌───────────────┐
│ Target Point │
│ (Lat, Long, │
│ Altitude) │
└───────────────┘goto(x, y, z, speed) command do in drone programming?goto()goto() command is designed to move the drone to a specific location using coordinates.x, y, z represent the position in space, and speed controls how fast the drone moves there.goto() moves drone = A [OK]goto()?goto() command takes parameters in order: x, y, z, speed.goto(10, 20, 5, 3).goto(5, 5, 10, 2) goto(10, 10, 5, 4)
goto(10, 20, speed=5, 3)
speed=5 before the last positional argument.3 is positional after a named argument, causing a syntax error.goto() to do this?goto() call must have four parameters: x, y, z, and speed.