Automatic Landing in ArduPilot: Approach and Flare

I am researching about ATOL for UAV and Ardupilot is a open source that has this part.
https://ardupilot.org/plane/_images/autolanding.jpg
The UAV is fixed wing and runway automatic take off and landing. In Ardupilot, guidance and control in approach (glideslope) is presented in libraries > AP_Landing > AP_Landing_Slope.cpp. My problems are relative to functions AP_Landing::type_slope_verify_land and AP_Landing::type_slope_setup_landing_slope. I think the Glideslope don not pass land_point, because Glideslope is a linear segment and Flare is a curve. Therefore, I have 2 questions as follows:

  1. What are definitions of prev_WP_loc and next_WP_loc?
  2. These waypoints are updated or fixed, or equivalently, the Glideslope segment are fixed or varying based on current UAV’s location.

In my first thought, I think prev_WP_loc is the stated point of Glideslope (fixed) and next_WP_loc is the intersection of Glideslope and Runway. However, I also see, in funcion AP_Landing::type_slope_setup_landing_slope, when entering Flare phase, Ardupilot send GCS the dist to land point by calculating distance between current location and next_WP_loc.

if ((on_approach_stage && below_flare_alt) ||
    (on_approach_stage && below_flare_sec && (wp_proportion > 0.5)) ||
    (!rangefinder_state_in_range && wp_proportion >= 1) ||
    probably_crashed) {

    if (type_slope_stage != SlopeStage::FINAL) {
        type_slope_flags.post_stats = true;
        if (is_flying && (AP_HAL::millis()-last_flying_ms) > 3000) {
            GCS_SEND_TEXT(MAV_SEVERITY_CRITICAL, "Flare crash detected: speed=%.1f", (double)gps.ground_speed());
        } else {
            GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Flare %.1fm sink=%.2f speed=%.1f dist=%.1f",
                              (double)height, (double)sink_rate,
                              (double)gps.ground_speed(),
                              (double)current_loc.get_distance(next_WP_loc));
        }
        
        type_slope_stage = SlopeStage::FINAL;

Thank you.