Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Considerations:

  • Spin up to takeoff speed (Reduce current spikes/easier on ESC & motors)

  • Automated, but can be pilot overridden

  • Transition to hover at set height (3-5m) if no pilot input

  • If comms loss during takeoff transition to hover in place and if timeout passes transition to landing?

  • Uneven takeoff surface

The Plan:

  • First use Passby control to “spin up” motors to 20% throttle before takeoff, this reduces current spikes and increases motor longevity.

  • Next, add a takeoff state to path manager that calls the LandingTakeoffManager to figure out Path/speed targets

  • Pass vertical waypoint targets along at a set known frequency.

  • Reach takeoff end height and transition to either hover or follow next waypoints.

Path Manager Component:

Call the LandingTakeoffManager to calculate the waypoints to follow to get to the takeoff height. Feed that data into the waypoint manager.

Code Prototype:

For calculating waypoint targets after the ground height sensor has been checked to see if the drone has landed.

_PathData LandingTakeoffManager::createLandingWaypoint(const SFOutput_t & input)
{
    // Use current Lat/long if origin not known
    if (landingLat == -1 and landingLong == -1) {
        landingLat = input.latitude;
        landingLong = input.longitude;
    }
    _PathData desiredWaypoint;

    desiredWaypoint.latitude = landingLat;
    desiredWaypoint.longitude = landingLong;
    desiredWaypoint.waypointType = LANDING_WAYPOINT;

    int curAltitude = input.altitude;

    desiredWaypoint.altitude = getAltitudeTarget(curAltitude, groundHeight);

    return desiredWaypoint;
}

double LandingTakeoffManager::getAltitudeTarget(double curAltitude, double targetAltitude)
{
    double waypointTarget;
    double droneHeight = (curAltitude - targetAltitude);
    if (droneHeight < 1.0) {
        // Touchdown speed of 0.1 m/s, set as waypoint targets at PM Freq
        waypointTarget = curAltitude - (0.1 / PM_FREQ);
    } else {
        // Scale descent velocity based on 0.2 * height (Eg. 0.4 m/s at 2m)
        // Use altitude waypoint targets geing calculated at PM Freq
        waypointTarget = droneHeight * (0.2 / PM_FREQ);
    }
    return waypointTarget;
}

Landing Takeoff Manager:

Use waypoints as targets that the drone attempts to meet at a set frequency. As drone approaches target, shorten the distance to the next waypoint to slow down drone ascent.

The profile to be used can be seen below:

https://www.desmos.com/calculator/kbamddthi9

Future Idea (Not happening for 2022 competition)

Ideally calculate ascent speed using Gaussian Profile:

https://www.desmos.com/calculator/5pmkyu7h3t

To ascend to a set height (3-4m)

  • No labels