Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fences don't show up #7

Open
Ryanf55 opened this issue Nov 12, 2024 · 1 comment
Open

Fences don't show up #7

Ryanf55 opened this issue Nov 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 12, 2024

If you enable a fence on mavproxy map, it should mirror in mavcesium. It's not - the fence protocol has changed to mission items and we're probably looking for the wrong data in mavcesium.

@Ryanf55 Ryanf55 added the bug Something isn't working label Nov 12, 2024
@Ryanf55
Copy link
Collaborator Author

Ryanf55 commented Nov 15, 2024

Made some progress decoding fences. Due to the changes in fences in MAVProxy, there's now inclusion/exclusion vertex and circles. These aren't handled. We can support any number of them.

Polygon Inclusion

  • param1 is equal to the number of polygon points(4)

image

image

The existing feature to set up the fence walls with a certain height does not appear to work, I filed a question upstream here:
https://community.cesium.com/t/how-to-sample-single-point-terrain-value-with-sampleterrainmostdetailed/36616

It seems mavlink expects mavcesium to close the polygons (on a 4-sided fence, the mavlink mission has 3 fence items).

I don't know how to tell two adjacent fence objects apart yet. Maybe the param1 value?

Circle Inclusion

Because param1 is the radius, this is easy, that can be treated on its own and renderd as a GroundPrimitive CircleGeometry

Geometry and ID

I think it's best to treat the geofence as an immutable geometry object. Maybe geometry can be combined?
https://cesium.com/learn/cesiumjs/ref-doc/CircleGeometry.html#.createGeometry

Let's color inclusions and exclusions differently. Also, if they are enabled or disabled, could be nice to see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant