Which of the following is NOT a core component of the ArduPilot architecture?
Think about which component is responsible for mission planning versus core system architecture.
AP_Mission is not a core component in ArduPilot's architecture; mission planning is handled externally by ground control software, not inside ArduPilot itself.
What will be the output of this simplified ArduPilot scheduler loop code snippet?
int count = 0; while (count < 3) { printf("Loop iteration %d\n", count); count++; } printf("Scheduler stopped\n");
Count starts at zero and increments until it reaches 3, printing each iteration.
The loop runs while count is less than 3, so it prints for 0, 1, and 2, then stops and prints the final message.
What error will this ArduPilot sensor data handling code produce?
float sensor_values[3] = {1.0, 2.0, 3.0}; for (int i = 0; i < 3; i++) { printf("Sensor %d value: %f\n", i, sensor_values[i]); }
Check the loop condition and array size carefully.
The loop runs from i=0 to i=3 inclusive, but sensor_values has only 3 elements (indices 0 to 2). Accessing index 3 causes a runtime error.
Which option shows the correct syntax to declare a parameter in ArduPilot's parameter system?
Look for correct use of assignment and braces in C++ struct initialization.
Option A uses correct C++ aggregate initialization syntax for a struct. Others have syntax errors or misuse parentheses.
Given the following simplified task registration code snippet in ArduPilot, how many tasks will the scheduler run?
void register_tasks() {
scheduler.add_task(task1);
scheduler.add_task(task2);
scheduler.add_task(task3);
scheduler.add_task(task2);
}
int main() {
register_tasks();
return scheduler.task_count();
}Consider if the scheduler allows duplicate tasks or not.
The scheduler adds four tasks including task2 twice. Unless it prevents duplicates, it counts all four.
