Jump to content

Recommended Posts

Posted (edited)

I'm passing a path to a unit and goRoute returns true, but the group doesn't do what it's told.
 

    local ok = mist.goRoute(grpinfo["name"], path)
    env.info("Group: " .. mist.utils.serialize("string", grpinfo) .. " set route: " .. tostring(ok) ..  " path: " .. mist.utils.serialize("string", path))

The output of the env.info is as follows, but i can't find anything wrong with it, besides it just doesn't work. The aircraft just head to the next airport to land there.

 set route: true path: string = 
{
    [1] = 
    {
        ["alt"] = 11000,
        ["x"] = -184478.33407856,
        ["action"] = "Turning Point",
        ["alt_type"] = "BARO",
        ["speed"] = 200,
        ["type"] = "Turning Point",
        ["y"] = 356992.43725087,
    }, -- end of [1]
    [2] = 
    {
        ["alt"] = 11000,
        ["x"] = -182069.92084432,
        ["action"] = "Turning Point",
        ["alt_type"] = "BARO",
        ["speed"] = 200,
        ["type"] = "Turning Point",
        ["task"] = 
        {
            ["id"] = "ComboTask",
            ["params"] = 
            {
                ["tasks"] = 
                {
                    [1] = 
                    {
                        ["enabled"] = true,
                        ["auto"] = false,
                        ["id"] = "Orbit",
                        ["number"] = 1,
                        ["params"] = 
                        {
                            ["speedEdited"] = true,
                            ["pattern"] = "Race-Track",
                            ["altitudeEdited"] = true,
                        }, -- end of ["params"]
                    }, -- end of [1]
                }, -- end of ["tasks"]
            }, -- end of ["params"]
        }, -- end of ["task"]
        ["y"] = 303282.32189971,
    }, -- end of [2]
    [3] = 
    {
        ["alt"] = 6000,
        ["x"] = -268851.68806047,
        ["action"] = "Turning Point",
        ["alt_type"] = "BARO",
        ["speed"] = 150,
        ["type"] = "Turning Point",
        ["y"] = 421561.33728146,
    }, -- end of [3]
    [4] = 
    {
        ["alt"] = 11000,
        ["x"] = 348969.94807213,
        ["action"] = "Turning Point",
        ["alt_type"] = "BARO",
        ["speed"] = 200,
        ["type"] = "Turning Point",
        ["y"] = 1093523.3106468,
    }, -- end of [4]
} -- end of string

Edited by Buzzer1977

AMD Ryzen 9 5950x, MSI MEG x570 Unify, G.Skill 128GB DDR4-3200, MSI RTX3090 Ventus 3x 24GB, Samsung PCIe 4.0 M.2 1TB 980 Pro, Seagate PCIe 4.0 M.2 2TB FireCuda 520, Quest 3

Posted
1 hour ago, Buzzer1977 said:

I'm passing a path to a unit and goRoute returns true, but the group doesn't do what it's told...The aircraft just head to the next airport to land there...

Hard to tell, be sure that the AI is doing something when "goroute" is passed to it, like rejoining a wpt (if it is already RTB when command is used, it's over).

  • Thanks 1
Posted

Thanks ! I'll give it a try.

AMD Ryzen 9 5950x, MSI MEG x570 Unify, G.Skill 128GB DDR4-3200, MSI RTX3090 Ventus 3x 24GB, Samsung PCIe 4.0 M.2 1TB 980 Pro, Seagate PCIe 4.0 M.2 2TB FireCuda 520, Quest 3

Posted

Solved!
Problem was, that the two initial waypoints on creation of the unit, were too close, so RTB was triggered immediately after creation.

AMD Ryzen 9 5950x, MSI MEG x570 Unify, G.Skill 128GB DDR4-3200, MSI RTX3090 Ventus 3x 24GB, Samsung PCIe 4.0 M.2 1TB 980 Pro, Seagate PCIe 4.0 M.2 2TB FireCuda 520, Quest 3

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...