File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,12 @@ namespace Monitors
80
80
.description (" Ignore start maneuver for DistTotal calculations." )
81
81
.defaultValue (" true" );
82
82
83
+ setEntityState (IMC::EntityState::ESTA_NORMAL, Status::CODE_ACTIVE);
84
+
83
85
bind<IMC::DesiredPath>(this );
84
86
bind<IMC::GpsFix>(this );
85
87
bind<IMC::VehicleMedium>(this );
88
+ bind<IMC::VehicleState>(this );
86
89
}
87
90
88
91
// ! Reserve entity identifiers.
@@ -108,6 +111,13 @@ namespace Monitors
108
111
m_last_medium = *msg;
109
112
}
110
113
114
+ void
115
+ consume (const IMC::VehicleState* msg)
116
+ {
117
+ if (msg->op_mode == IMC::VehicleState::VS_CALIBRATION)
118
+ m_distTotal.value = 0 ;
119
+ }
120
+
111
121
void
112
122
consume (const IMC::DesiredPath* msg)
113
123
{
@@ -164,7 +174,7 @@ namespace Monitors
164
174
// Check if we have valid Horizontal Accuracy index.
165
175
if (msg->validity & IMC::GpsFix::GFV_VALID_HACC && msg->hacc > 20 )
166
176
return ;
167
- else if (msg->hdop > 4 )
177
+ else if (msg->hdop > 2.5 )
168
178
return ;
169
179
170
180
if (m_init)
You can’t perform that action at this time.
0 commit comments