package com.uavps.system.udp.vo;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @Author MBQ
 * @Date: 2025/1/15
 * @Description:
 * @Version: 1.0
 **/
public class PlatformAircraft {

    // 经度
    private double longitude;

    // 纬度
    private double latitude;

    // 高度
    private double altitude;

    private double coordinateX;
    private double coordinateY;
    private double coordinateZ;

    // 方位角
    private double azimuthAngle;
    // 仰视角
    private double pitchAngle;
    //横滚角
    private double rollAngle;
    //向东速度
    private double eastSpeed;

    // 向北速度
    private double northSpeed;

    // 向天速度
    private double skySpeed;

    // 航迹角
    private short trackAngle;

    private String utcTime;

    private String targetAircraftNumber = "1";
//    private String targetAircraftNumber;
//
//    private List<FlightPath> flightpath;


    public double getLongitude() {
        BigDecimal bd = new BigDecimal(Double.toString(longitude));
        bd = bd.setScale(7, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getLatitude() {
        BigDecimal bd = new BigDecimal(Double.toString(latitude));
        bd = bd.setScale(7, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getAltitude() {
        BigDecimal bd = new BigDecimal(Double.toString(altitude));
        bd = bd.setScale(7, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setAltitude(double altitude) {
        this.altitude = altitude;
    }

    public double getEastSpeed() {
        BigDecimal bd = new BigDecimal(Double.toString(eastSpeed));
        bd = bd.setScale(1, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setEastSpeed(double eastSpeed) {
        this.eastSpeed = eastSpeed;
    }

    public double getNorthSpeed() {
        BigDecimal bd = new BigDecimal(Double.toString(northSpeed));
        bd = bd.setScale(1, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setNorthSpeed(double northSpeed) {
        this.northSpeed = northSpeed;
    }

    public double getSkySpeed() {
        BigDecimal bd = new BigDecimal(Double.toString(skySpeed));
        bd = bd.setScale(1, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setSkySpeed(double skySpeed) {
        this.skySpeed = skySpeed;
    }

    public short getTrackAngle() {
        return trackAngle;
    }

    public void setTrackAngle(short trackAngle) {
        this.trackAngle = trackAngle;
    }

    public String getUtcTime() {
        return utcTime;
    }

    public void setUtcTime(String utcTime) {
        this.utcTime = utcTime;
    }

    public double getAzimuthAngle() {
        return azimuthAngle;
    }

    public void setAzimuthAngle(double azimuthAngle) {
        this.azimuthAngle = azimuthAngle;
    }

    public double getPitchAngle() {
        return pitchAngle;
    }

    public void setPitchAngle(double pitchAngle) {
        this.pitchAngle = pitchAngle;
    }

    public double getRollAngle() {
        return rollAngle;
    }

    public void setRollAngle(double rollAngle) {
        this.rollAngle = rollAngle;
    }

    public double getCoordinateX() {
        BigDecimal bd = new BigDecimal(Double.toString(coordinateX));
        bd = bd.setScale(4, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setCoordinateX(double coordinateX) {
        this.coordinateX = coordinateX;
    }

    public double getCoordinateY() {
        BigDecimal bd = new BigDecimal(Double.toString(coordinateY));
        bd = bd.setScale(4, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setCoordinateY(double coordinateY) {
        this.coordinateY = coordinateY;
    }

    public double getCoordinateZ() {
        BigDecimal bd = new BigDecimal(Double.toString(coordinateZ));
        bd = bd.setScale(4, RoundingMode.HALF_UP);
        return bd.doubleValue();
    }

    public void setCoordinateZ(double coordinateZ) {
        this.coordinateZ = coordinateZ;
    }

    public String getTargetAircraftNumber() {
        return targetAircraftNumber;
    }

    public void setTargetAircraftNumber(String targetAircraftNumber) {
        this.targetAircraftNumber = targetAircraftNumber;
    }

    @Override
    public String toString() {
        return "PlatformAircraft{" +
                "longitude=" + longitude +
                ", latitude=" + latitude +
                ", altitude=" + altitude +
                ", coordinateX=" + coordinateX +
                ", coordinateY=" + coordinateY +
                ", coordinateZ=" + coordinateZ +
                ", azimuthAngle=" + azimuthAngle +
                ", pitchAngle=" + pitchAngle +
                ", rollAngle=" + rollAngle +
                ", eastSpeed=" + eastSpeed +
                ", northSpeed=" + northSpeed +
                ", skySpeed=" + skySpeed +
                ", trackAngle=" + trackAngle +
                ", utcTime='" + utcTime + '\'' +
                '}';
    }
}
