-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isflying added #743
base: master
Are you sure you want to change the base?
isflying added #743
Conversation
Terminology problem here. None of the checks you've added here have anything to do with flying. A vehicle could pass all of those checks and be an AntennaTracker :-) Determining whether a vehicle is in the air under its own steam is actually really quite hard. You really need to ask it what the probability of it being actively flying itself currently is. ArduPilot currently has such a concept for both Plane, and something related in Copter. What were you hoping this particular check would represent about the vehicle? |
You are correct 👍 .... It is a hard problem. isFlying is a variable already exists in Dronekit for Android here |
@peterbarker Is there access to the test via a mavlink message? If so, that could be the check, and the rest could be some sort of fallback for other platforms.
Dronekit isn't supposed to work like that. If you want to have ambiguous magic behaviour then ideally you'd define a superclass for that vehicle. Minimally you'd want to check the vehicle and make sure an error of some kind is returned for vehicles that don't fly. |
@hamishwillee Do you suggest limiting it to plane and copter as follows:
|
@HefnySco I'd really defer to @peterbarker , since he is far more involved with this than me. This is the sort of thing I was thinking. A good alternative might be to have a more generic method - e.g. "isLaunched" or "isMoving" rather than isFlying, and have test conditions that also make sense for ground vehicles and subs. I don't know the right tests to have in place to show something is flying/moving though. |
Alternative idea... it may be not exactly what OP needs, but I had success with it on my drones, and it could give valuable information to users. In DroneKit, we could monitor the In PX4, Clearly, it's important to document that such an attribute gives only access to the land detector state, and it may not represent the actual drone status (e.g. if the engines are "twitching", the land detector may fail to detect ground contact). |
implement test criteria to know if a vehicle is flying or not.