Skip to content

Conversation

@Ryanf55
Copy link
Collaborator

@Ryanf55 Ryanf55 commented Nov 17, 2024

Demo

image

fence-items.txt

Example Inclusion Triangle

Here's some sample MAVlink data for an inclusion triangle.

{
    "0": {
        "mavpackettype": "MISSION_ITEM",
        "target_system": 255,
        "target_component": 230,
        "frame": 0,
        "command": 5001,
        "current": 0,
        "autocontinue": 0,
        "param1": 3,
        "param2": 0,
        "param3": 0,
        "param4": 0,
        "x": -35.3617457,
        "y": 149.15790859999998,
        "z": 0,
        "mission_type": 1
    },
    "1": {
        "mavpackettype": "MISSION_ITEM",
        "target_system": 255,
        "target_component": 230,
        "frame": 0,
        "command": 5001,
        "current": 0,
        "autocontinue": 0,
        "param1": 3,
        "param2": 0,
        "param3": 0,
        "param4": 0,
        "x": -35.3594547,
        "y": 149.160323,
        "z": 0,
        "mission_type": 1
    },
    "2": {
        "mavpackettype": "MISSION_ITEM",
        "target_system": 255,
        "target_component": 230,
        "frame": 0,
        "command": 5001,
        "current": 0,
        "autocontinue": 0,
        "param1": 3,
        "param2": 0,
        "param3": 0,
        "param4": 0,
        "x": -35.3617457,
        "y": 149.1617503,
        "z": 0,
        "mission_type": 1
    }
}

https://sandcastle.cesium.com/#c=bZHfT8IwEMf/lcueRjI7cEx+DaIB30w0aHxxPpTtgMauJdcOMgz/u2WDaJC2ae/az/fucs20Mha2AndIMAaFO5iiEWXB3us7P/Wy2p9qZblQSKnXGqUqVVmtJMxftKxWWjl1E4ahssIKNIznuf+dKgDFCxxC6s0xh80Jd8uUtOQZpl5whE4PQ6glAGuBxClbV8NzSVNO1llcRWxJupjhihDNAxGv/I9GBHA+O90B69x1enE7CuAmilnknG7cCy6IdnR7BuJBN+5eAnFv0O7Hg3r0r0b6bAWNUXCLJLj8LVhLTWz+OKuBg9sPTfOaeerXXuviTfsX3WuNwAu8xNhK4uRc0b0oNposlCR9xkKLxUa6pCZclNkXWpYZc0xwRJPwrzTJxRZEPr7ynZBJbox7WZZSvoq9+49JEjr+n1Rqngu1et4iSV4dsXVn8tRcMsaS0LnXlVZrueB0EfkH

Details

Add parsers for inclusion and exclusion fences. These aren't super robust to dropped data yet, but they work in the happy path.
Fence clear still works.

A parser builds up an array of MISSION_ITEM objects that are for the fence, then once the expected count is reached, it calls the respective draw function.

Lots of code duplication which I can refactor later.

Signed-off-by: Ryan Friedman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant