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

velocityReference is not supported within an interval. #5738

Closed
shunter opened this issue Aug 10, 2017 · 0 comments
Closed

velocityReference is not supported within an interval. #5738

shunter opened this issue Aug 10, 2017 · 0 comments

Comments

@shunter
Copy link
Contributor

shunter commented Aug 10, 2017

Attempting to define an alignedAxis as a velocityReference does not work within an interval, producing the error:

RuntimeError: {"interval":"2016-06-17T12:00:30Z/2016-06-17T12:01:00Z","velocityReference":"#position"} is not a valid CZML interval.

In CzmlDataSource, velocityReference is handled directly in processAlignedAxis, which precludes its use anywhere other than as a constant alignedAxis value.

unwrapCartesianInterval may be a better place to put the handling. This would merit some careful consideration though, as that would allow using velocityReference in any context that needs a Cartesian. For example you could use the velocity direction of an object as another object's position, which would not really make sense. Perhaps we should separate the concepts of a position vector (where magnitude is meaningful) from a direction vector (generally a unit vector). Currently we jumble it all together and assume everything's fine. (which is conventional in Cesium where Cartesian3 represents both kinds of vectors)

CZML:

[
    {
        "id": "document",
        "version": "1.0",
        "clock": {
            "interval": "2016-06-17T12:00:00Z/2016-06-17T12:01:00Z",
            "currentTime": "2016-06-17T12:00:00Z"
        }
    },
    {
        "position": {
            "epoch": "2016-06-17T12:00:00Z",
            "cartesian": [
                0,
                1216361.4096947117,
                -4736253.175342511,
                4081267.4865667094,
                60,
                1716361.4096947117,
                -4736253.175342511,
                4081267.4865667094
            ]
        },
        "billboard": {
            "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACvSURBVDhPrZDRDcMgDAU9GqN0lIzijw6SUbJJygUeNQgSqepJTyHG91LVVpwDdfxM3T9TSl1EXZvDwii471fivK73cBFFQNTT/d2KoGpfGOpSIkhUpgUMxq9DFEsWv4IXhlyCnhBFnZcFEEuYqbiUlNwWgMTdrZ3JbQFoEVG53rd8ztG9aPJMnBUQf/VFraBJeWnLS0RfjbKyLJA8FkT5seDYS1Qwyv8t0B/5C2ZmH2/eTGNNBgMmAAAAAElFTkSuQmCC",
            "alignedAxis": [
                {
                    "interval": "2016-06-17T12:00:00Z/2016-06-17T12:00:30Z",
                    "unitCartesian": [
                        0,
                        1,
                        0
                    ]
                },
                {
                    "interval": "2016-06-17T12:00:30Z/2016-06-17T12:01:00Z",
                    "velocityReference": "#position"
                }
            ]
        }
    }
]
shunter added a commit that referenced this issue Sep 1, 2017
* Improve handling of existing alignedAxis velocity support.  We now distinguish properties which must produce a unit cartesian (currently only alignedAxis).  For those properties, we always normalize on the client to avoid later errors.
* Fix velocityReference use from within an interval.  Fixes #5738
* Fix promise handling in CzmlDataSourceSpec.  Many tests were calling .load without using the resulting promise.  This meant that any exceptions during CZML load would be silently ignored.
shunter added a commit that referenced this issue Sep 5, 2017
* Improve handling of existing alignedAxis velocity support.  We now distinguish properties which must produce a unit cartesian (currently only alignedAxis).  For those properties, we always normalize on the client to avoid later errors.
* Fix velocityReference use from within an interval.  Fixes #5738
* Fix promise handling in CzmlDataSourceSpec.  Many tests were calling .load without using the resulting promise.  This meant that any exceptions during CZML load would be silently ignored.
shunter added a commit that referenced this issue Sep 11, 2017
* Improve handling of existing alignedAxis velocity support.  We now distinguish properties which must produce a unit cartesian (currently only alignedAxis).  For those properties, we always normalize on the client to avoid later errors.
* Fix velocityReference use from within an interval.  Fixes #5738
* Fix promise handling in CzmlDataSourceSpec.  Many tests were calling .load without using the resulting promise.  This meant that any exceptions during CZML load would be silently ignored.
shunter added a commit that referenced this issue Sep 11, 2017
* Improve handling of existing alignedAxis velocity support.  We now distinguish properties which must produce a unit cartesian (currently only alignedAxis).  For those properties, we always normalize on the client to avoid later errors.
* Fix velocityReference use from within an interval.  Fixes #5738
* Fix promise handling in CzmlDataSourceSpec.  Many tests were calling .load without using the resulting promise.  This meant that any exceptions during CZML load would be silently ignored.
shunter added a commit that referenced this issue Sep 26, 2017
* Improve handling of existing alignedAxis velocity support.  We now distinguish properties which must produce a unit cartesian (currently only alignedAxis).  For those properties, we always normalize on the client to avoid later errors.
* Fix velocityReference use from within an interval.  Fixes #5738
* Fix promise handling in CzmlDataSourceSpec.  Many tests were calling .load without using the resulting promise.  This meant that any exceptions during CZML load would be silently ignored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants