...
Should still PM generate waypoints for landing/takeoff?Do we want to drone to respond to changes like wind during take off/landing?
Ideas supposing we adapted the current code:
We likely will not need getRangeConstant which is used to define the targetSpeed of a VTOL. However, the target of a fixed wing craft is more so based on stage of take off or landing which is dependent mainly on stall speed, takeoff speed, landing speed and minimum climb speed.
For getTakeoffAltitudeTarget, we likely could exit take off or landing states by completing the final waypoints during takeoff and landing.
We need a horizontal component which would allow our drone to travel in oblique vectors
Code Block |
---|
desiredWaypoint.dist_forward = 0 |
If our drone is ever flying into cross wind, we may need to correct lateral movement to reach specified waypoints.
Code Block |
---|
desiredWaypoint.dist_right = 0; |
The current getSpeedTarget function is a exponential decay calculated using altitude function which is suitable to VTOL.
Code Block |
---|
speedTarget = MAX_SPEED * exp(-1.0 * (pow((currentAltitude - groundHeight - (TAKEOFF_TARGET / 2)), 2) / rangeConstant)); |
However, the speed of a fixed wing craft is largely independent of altitude. There is also different behaviors required at each stage in take off or landing. The big concern of a fixed wing craft is the stall speed and minimum climb speed. It may be better to have two separate getSpeedTarget functions for a take off and landing of a fixed wing craft. For takeoff, we could try for some high takeoff speed to minimize runway length.
Example speed logic in a getTakeoffTargetSpeed function
Code Block |
---|
double takeoffSpeed= stallSpeed * 1.2;
return takeoffSpeed; |
Since we need to change behaviors during takeoff, we could pass a queue of waypoint into the getTakeoffTargetSpeed function to determine what speed is optimal for what stage. Maybe switch statements based on stage? There could be better options but this is just a makeshift solution for now.
Useful Documents to look over:
https://link-springer-com.proxy.lib.uwaterloo.ca/article/10.1007/s10846-017-0512-y
https://liu.diva-portal.org/smash/get/diva2:1055556/FULLTEXT01.pdf
View file | ||
---|---|---|
|
...
https://www.sciencedirect.com/science/article/pii/S2405896316315026
...