package com.multictrl.modules.business.q20.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * Q20返航指令DTO
 *
 * @author 938693313@qq.com
 * @since 1.0.0 2026/5/20
 */
@Data
@Schema(name = "Q20返航参数")
public class Q20GoHomeDTO {

    @Schema(description = "返航模式: 1=安全高度返回, 2=直线飞行, 3=原路返回")
    private int mode;

    @Schema(description = "安全返航高度(m), mode=1时有效, JSON key: safe_altitude")
    private Float safeAltitude;

    @Schema(description = "返航速度(m/s), mode=1时有效")
    private Float speed;

    @Schema(description = "是否指定返回点: 1=是, 0=否, JSON key: specific_home")
    private Integer specificHome;

    @Schema(description = "指定返回点坐标, specific_home=1时有效, JSON key: home_point")
    private HomePoint homePoint;

    @Data
    @Schema(name = "返航目标点")
    public static class HomePoint {

        @Schema(description = "经度(7位小数)")
        private float longitude;

        @Schema(description = "纬度(7位小数)")
        private float latitude;

        @Schema(description = "椭球高度EGM96(m)")
        private float altitude;

        @Schema(description = "航向角(deg)")
        private float heading;
    }
}
