We are looking to research if Gordon’s vector implementation would still be valid, or should we come up with completely new code for Path Manager zp 3.5, Assuming that the input comes from FreeRTOS queue, and show our approach.
We will be assuming that the inputs will be FreeRTOS queues.
Previous research we could refer, and possibly extend from:
Existing Information:
Landing Procedure
Takeoff Procedure
Functions
double getTakeoffAltitudeTarget(double currentAltitude);
When first called set the current height as ground, then return the takeoff altitude target (ground height + TAKEOFF_TARGET).
double getLandingAltitudeTarget(double currentAltitude);
This function returns the ground height set during takeoff and uses it as the target landing altitude.
AM::AttitudeManagerInput createLandingWaypoint(const LOS::LosSFData & input);
Calculates the waypoints that the drone should follow during landing. Missing horizontal components as of now.
AM::AttitudeManagerInput createTakeoffWaypoint(const LOS::LosSFData & input);
Returns the waypoints that should be followed for takeoff.
double getSpeedTarget(double currentAltitude, double rangeConstant);
Return desired climb speed for both landing and takeoff.
double getRangeConstant(double midpointAltitude);
Returns range constant to calculate velocity.
Question : Does PM output speed to AM? Or does AM computes the speed
Should still PM generate waypoints for landing/takeoff?
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
desiredWaypoint.dist_forward = 0
If our drone is ever flying into cross wind, we may need to correct lateral movement to reach specified waypoints.
desiredWaypoint.dist_right = 0;
The current getSpeedTarget function is a exponential decay calculated using altitude function which is suitable to VTOL.
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
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
https://www.sciencedirect.com/science/article/pii/S2405896316315026
0 Comments