Conversation
|
Thank you for the pull request, @eringram! ✅ We can confirm we have a CLA on file for you. |
…ment Update CZML validation document for Path.relativeTo.
|
@lukemckinstry I still need to update the description with some context and add unit tests and some cleanup, but the code changes are ready for review |
|
Looking great so far 🚀 The sandcastle is great for demonstrating the capabilities and main options. I know this is WIP but I'll note that we should add unit test the 2 main new functions in PathVisualizer. Is there a plan for a public facing sandcastle in addition to the dev one? It could be worth it to add an additional dataset - maybe something land based - as well for both learning examples and dev testing. |
Thanks! I addressed the last clean-up/TODO I had left, and unit tests are almost done.
I agree that a public-facing one would be helpful, I'll make the current one public and add another dataset which is land-based. |
lukemckinstry
left a comment
There was a problem hiding this comment.
Thanks for the additional tests. Looks good 🚀
Description
This PR adds the ability to visualize entity
PathGraphicsrelative to one another.This is done by adding a new experimental
relativeToproperty to thePathGraphicsclass. This property can have the following values:Position.ReferenceFrame"FIXED": path polyline points are transformed to a fixed frame regardless ofPosition.ReferenceFrame"INERTIAL": path polyline points are transformed to an inertial frame regardless ofPosition.ReferenceFramepositionorientation: path polyline points are transformed to the "body" frame of that entityorientation: path polyline points are transformed to a vehicle velocity, local horizontal (VVLH) frame based on the entity's position and velocity as specified byPosition.ReferenceFrameThis new property will also be reflected in the CZML spec following its support in CesiumJS.
Example
Here are the two entities and their paths from the TwoSats.czml example with their
path.relativeToproperties set toundefined, defaulting to theirPosition.ReferenceFramevalues, which are both"INERTIAL". Observe how the paths appear straight because we are zoomed in, but if you zoom out, they circle the Earth following an Earth-centered inertial frame.Now, here are their paths where satellite 2's
path.relativeTois set to the ID of satellite 1. Observe that satellite 1's path appears the same, but satellite 2's path now shows its orbit relative to satellite 1's positon instead of the Earth.Testing plan
Added a new developer Sandcastle demonstrating this feature. It has the following buttons:
undefinedpath.relativeTopropertyundefinedpath.relativeTo, but zoomed out to view their path around the Earthundefinedpath.relativeToproperty, and satellite 2 with its path relative to a fixed frameundefinedpath.relativeToproperty, and two versions of satellite 2's pathorientationproperty setorientationproperty set to"velocityReference":"#position"There's also a 3rd file
TwoSatsRelativeReferenceEnds.czmlthat isn't included as a UI option. In this file, satellite 1 displays as before, but satellite 2's availability and position data end at an earlier time. This is for testing the case where an entity'spath.relativeToreferences an entity which no longer has position data. In that case, the path graphic does not continue when itsrelativeToentity is gone.For testing the spec itself, the property has been added to
Specs/Data/CZML/ValidationDocument.czmland the testCzmlDataSourceSpec.js.Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my change