getRotationSeverity method
- double orientation
Gets the severity of the rover's orientation for both pitch and roll.
Implementation
Severity? getRotationSeverity(double orientation) {
final abs = orientation.abs();
if (abs >= 30) {
return Severity.critical;
} else if (abs >= 15) {
return Severity.warning;
} else if (abs >= 10) {
return Severity.info;
} else {
return null;
}
}