0
0
Drone Programmingprogramming~20 mins

Surveying and mapping with photogrammetry in Drone Programming - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Photogrammetry Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
Calculate Ground Sampling Distance (GSD)

What is the output of this code that calculates the Ground Sampling Distance (GSD) in centimeters?

Drone Programming
def calculate_gsd(sensor_width_mm, image_width_px, flight_height_m, focal_length_mm):
    # GSD formula: (sensor_width * flight_height * 100) / (focal_length * image_width)
    return (sensor_width_mm * flight_height_m * 100) / (focal_length_mm * image_width_px)

sensor_width = 36  # mm
image_width = 6000  # pixels
flight_height = 120  # meters
focal_length = 50  # mm

gsd = calculate_gsd(sensor_width, image_width, flight_height, focal_length)
print(round(gsd, 2))
A14.4
B1.44
C0.144
D144.0
Attempts:
2 left
💡 Hint

Remember to convert flight height to centimeters by multiplying by 100.

🧠 Conceptual
intermediate
1:30remaining
Understanding Overlap in Photogrammetry Flights

Which option correctly describes the purpose of frontlap and sidelap in drone photogrammetry flights?

AThey ensure images overlap enough to create 3D models and avoid gaps in data.
BThey reduce the flight time by minimizing the number of images taken.
CThey control the drone's altitude to maintain a constant speed.
DThey adjust the camera's focus to improve image sharpness.
Attempts:
2 left
💡 Hint

Think about why multiple images need to cover the same ground area.

🔧 Debug
advanced
2:00remaining
Fix the Flight Path Calculation Bug

What error does this code raise when calculating the number of flight lines needed for a survey?

Drone Programming
def calculate_flight_lines(area_width_m, swath_width_m):
    # Calculate number of flight lines needed
    lines = area_width_m / swath_width_m
    return int(lines)

area_width = 250
swath_width = 60

print(calculate_flight_lines(area_width, swath_width))
ARaises a TypeError
BRaises a ZeroDivisionError
CReturns 5 correctly
DReturns 4, but should be 5 to cover entire area
Attempts:
2 left
💡 Hint

Check how integer division truncates decimals.

📝 Syntax
advanced
1:30remaining
Identify the Syntax Error in Image Geotagging Code

Which option contains the syntax error in this snippet that assigns GPS coordinates to images?

Drone Programming
images = ['img1.jpg', 'img2.jpg', 'img3.jpg']
gps_coords = [(40.7128, -74.0060), (40.7130, -74.0055), (40.7132, -74.0050)]

for i in range(len(images)):
    print(f"Assigning {gps_coords[i]} to {images[i]}")
AMissing colon after for loop declaration
BIncorrect variable name gps_coords misspelled as gps_coord
CUsing parentheses instead of square brackets for list indexing
DMissing quotation marks around image filenames
Attempts:
2 left
💡 Hint

Check the syntax of the for loop line.

🚀 Application
expert
3:00remaining
Determine the Number of Images for Full Coverage

A drone camera has a sensor width of 24 mm and takes images 4000 pixels wide. The flight height is 100 meters, and the focal length is 35 mm. The survey area is 500 meters wide. The swath width is calculated using the formula: swath_width = (sensor_width * flight_height) / focal_length. If the sidelap is 70%, how many images are needed along the width to cover the area fully?

Choose the correct number of images.

A20
B30
C25
D35
Attempts:
2 left
💡 Hint

Calculate swath width first, then adjust for sidelap, then divide area width by effective swath width and round up.