SITL: Added comment to clarify IMU acceleration value
[ardupilot.git] / libraries / AP_Mission / AP_Mission_ChangeDetector.h
blob580f5c4956b9328861b900a1a1ccbd7a467ba69c
1 /// @file AP_Mission_ChangeDetector.h
2 /// @brief Detects changes in the next few nav commands in the mission
4 /*
5 * The AP_Mission_ChangeDetector library:
6 * - records the index of the active nav command
7 * - maintains a copy of the next few navigation commands
8 * - checks for changes in either the active command or the next few nav commands
10 * Detecting changes in the next few nav commands is critical for SCurves and splines
11 * which plan the path through the corners
13 #pragma once
15 #include "AP_Mission.h"
17 #if AP_MISSION_ENABLED
19 /// @class AP_Mission_ChangeDetector
20 /// @brief Mission command change detector
21 class AP_Mission_ChangeDetector
24 public:
26 // check for changes to mission. returns true if mission has been changed since last check
27 bool check_for_mission_change() WARN_IF_UNUSED;
29 private:
31 // number of upcoming commands to monitor for changes
32 static const uint8_t mis_change_detect_cmd_max = 3;
33 struct {
34 uint32_t last_change_time_ms; // local copy of last time mission was changed
35 uint16_t curr_cmd_index; // local copy of AP_Mission's current command index
36 uint8_t cmd_count; // number of commands in the cmd array
37 AP_Mission::Mission_Command cmd[mis_change_detect_cmd_max]; // local copy of the next few mission commands
38 } mis_change_detect;
41 #endif // AP_MISSION_ENABLED