Skip to content

"import_qgroundcontrol_mission_from_string" function not parsing the altitude correctly #688

Open
@jhadevansh0809

Description

@jhadevansh0809

Steps to Reproduce:

  1. Use the provided mission JSON string.
{
    "fileType": "Plan",
    "geoFence": {
        "circles": [
        ],
        "polygons": [
        ],
        "version": 2
    },
    "groundStation": "QGroundControl",
    "mission": {
        "cruiseSpeed": 15,
        "firmwareType": 12,
        "globalPlanAltitudeMode": 3,
        "hoverSpeed": 30,
        "items": [
            {
                "AMSLAltAboveTerrain": null,
                "Altitude": 16,
                "AltitudeMode": 1,
                "autoContinue": true,
                "command": 22,
                "doJumpId": 1,
                "frame": 3,
                "params": [
                    0,
                    0,
                    0,
                    null,
                    47.3977507,
                    8.5456074,
                    16
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": 499,
                "Altitude": 16,
                "AltitudeMode": 3,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 2,
                "frame": 0,
                "params": [
                    0,
                    0,
                    0,
                    null,
                    47.39919907,
                    8.54621452,
                    499
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": 506,
                "Altitude": 16,
                "AltitudeMode": 3,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 3,
                "frame": 0,
                "params": [
                    0,
                    0,
                    0,
                    null,
                    47.39886457,
                    8.54962802,
                    506
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": 520,
                "Altitude": 16,
                "AltitudeMode": 3,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 4,
                "frame": 0,
                "params": [
                    0,
                    0,
                    0,
                    null,
                    47.39631855,
                    8.54939923,
                    520
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": 512,
                "Altitude": 16,
                "AltitudeMode": 3,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 5,
                "frame": 0,
                "params": [
                    0,
                    0,
                    0,
                    null,
                    47.39524064,
                    8.54611386,
                    512
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": 501,
                "Altitude": 16,
                "AltitudeMode": 3,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 6,
                "frame": 0,
                "params": [
                    0,
                    0,
                    0,
                    null,
                    47.39696281,
                    8.54248073,
                    501
                ],
                "type": "SimpleItem"
            },
            {
                "AMSLAltAboveTerrain": 493,
                "Altitude": 16,
                "AltitudeMode": 3,
                "autoContinue": true,
                "command": 16,
                "doJumpId": 7,
                "frame": 0,
                "params": [
                    0,
                    0,
                    0,
                    null,
                    47.39861678,
                    8.54218788,
                    493
                ],
                "type": "SimpleItem"
            },
            {
                "autoContinue": true,
                "command": 20,
                "doJumpId": 8,
                "frame": 2,
                "params": [
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0
                ],
                "type": "SimpleItem"
            }
        ],
        "plannedHomePosition": [
            47.3977507,
            8.5456074,
            491
        ],
        "vehicleType": 2,
        "version": 2
    },
    "rallyPoints": {
        "points": [
        ],
        "version": 2
    },
    "version": 1
}
  1. Upload the mission JSON string to the system.
  2. Observe the altitude mode selected for waypoints with non-null AMSLAltAboveTerrain values.

Expected Behavior:

The system should recognize waypoints with non-null AMSLAltAboveTerrain values and set the altitude mode as "Calculated above Terrain".

Actual Behavior:

The altitude mode for waypoints with non-null AMSLAltAboveTerrain values is being set as RTL altitude mode instead of "Calculated above Terrain".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions