jtac.DATA = {}


jtac.DATA.AFTER_MISSION_TIME = 120


jtac.DATA.JTAC_TEMPLATE =  {
    ["COALITION"] = country.id.CJTF_BLUE,
    ["CATEGORY"] = Group.Category.AIRPLANE,

    -- attributes to set:
    -- + route.points[1].alt
    -- + route.points[1].x
    -- + route.points[1].y
    -- + route.points[1].task.params.tasks[1].params.frequency
    -- + route.points[1].task.params.tasks[4].params.altitude
    -- + units[1].alt
    -- + units[1].x
    -- + units[1].y
    -- + units[1].name
    -- + units[1].callsign (set to available)
    -- + name
    ["GROUP"] = {
        ["lateActivation"] = true,
        ["radioSet"] = false,
        ["task"] = "AFAC",
        ["uncontrolled"] = false,
        ["taskSelected"] = true,
        ["route"] = {
            ["points"] = {
                [1] = {
                    ["alt"] = nil,
                    ["action"] = "Turning Point",
                    ["speed"] = 90,
                    ["task"] = {
                        ["id"] = "ComboTask",
                        ["params"] = {
                            ["tasks"] = {
                                [1] = {
                                    ["number"] = 1,
                                    ["auto"] = true,
                                    ["id"] = "FAC",
                                    ["enabled"] = true,
                                    ["params"] = {
                                        ["number"] = 1,
                                        ["designation"] = "Auto",
                                        ["modulation"] = 0,
                                        ["callname"] = 1,
                                        ["datalink"] = true,
                                        ["frequency"] = nil,
                                    },
                                },
                                [2] = {
                                    ["number"] = 2,
                                    ["auto"] = true,
                                    ["id"] = "WrappedAction",
                                    ["enabled"] = true,
                                    ["params"] = {
                                        ["action"] = {
                                            ["id"] = "EPLRS",
                                            ["params"] = {
                                                ["value"] = true,
                                                ["groupId"] = 1,
                                            },
                                        },
                                    },
                                },
                                [3] = {
                                    ["enabled"] = true,
                                    ["auto"] = false,
                                    ["id"] = "WrappedAction",
                                    ["number"] = 3,
                                    ["params"] = {
                                        ["action"] = {
                                            ["id"] = "SetInvisible",
                                            ["params"] = {
                                                ["value"] = true,
                                            },
                                        },
                                    },
                                },
                                [4] = {
                                    ["enabled"] = true,
                                    ["auto"] = false,
                                    ["id"] = "Orbit",
                                    ["number"] = 4,
                                    ["params"] = {
                                        ["altitude"] = nil,
                                        ["pattern"] = "Circle",
                                        ["speed"] = 60,
                                    },
                                },
                            },
                        },
                    },
                    ["type"] = "Turning Point",
                    ["ETA"] = 0,
                    ["ETA_locked"] = false,
                    ["y"] = nil,
                    ["x"] = nil,
                    ["speed_locked"] = true,
                },
            },
        },
        ["hidden"] = false,
        ["units"] = {
            [1] = {
                ["alt"] = nil,
                ["payload"] = {
                    ["pylons"] = {},
                    ["fuel"] = 5029,
                    ["flare"] = 0,
                    ["chaff"] = 0,
                    ["gun"] = 100,
                }, -- NEEDED otherwise the UAV will crash into the ground :(
                ["skill"] = "Excellent",
                ["speed"] = 82,
                ["type"] = "MQ-9 Reaper",
                ["y"] = nil,
                ["x"] = nil,
                ["name"] = nil,
                ["heading"] = 0,
            },
        },
        ["name"] = nil,
        ["communication"] = true,
    },
}

jtac.DATA.AZ_DIST = { MIN = 2e3, MAX = 5e3}
jtac.DATA.AZ_RALT = { MIN = 3e3, MAX = 3e3}