[Newbie alert: both to Cesium and to satellite terminology and various time/space reference frames. Feel free to point me at other resources if this query is to rudimentary for the group.]
I’ve translated an SGP4 implementation from MATLAB to JavaScript, and can calculate positions of satellites from TLE lines. The coordinates are given in Earth Centered Inertial TEME reference frame; I’d like to be able to render the locations as satellite icon billboards over the WGS84 ellipsoid.
I don’t know how to transform the ECI TEME coordinates into Cesium.Cartesian3 coordinates. It looks like Cesium.Transforms.computeTemeToPseudoFixedMatrix() would help but I’m out of my league here and I haven’t found anything in the docs that are high-level enough for me, vs. API reference pages. I’m able to tweak the Sandbox example to render billboards mapping Cesium.Cartographic.fromDegrees() and billboard.add(), but don’t know how to get ECI TEME into the right reference frame. I’m clueless about Cartographic vs. Cartesian references, all new to me, sorry.
You’re on the right track. Cesium’s native coordinate system is Earth Centered Fixed, or ECF, so you need to rotate the positions from your SGP4 propagator from the TEME axes to the Fixed axes. computeTemeToPseudoFixedMatrix is only an approximation of that rotation, but it’s the best one we have in Cesium so far. At each animation time, call that function to determine the rotation matrix at that time and assign it to the BillboardCollection’s modelMatrix property.
As you may know, I and most of the current Cesium contributors work for a company called Analytical Graphics, and we have for many years built products that (among many other things) propagate TLEs and do accurate transformations between frames. At the risk of sounding like I just transferred to the marketing department, you may want to check some of them out:
Just to followup, the matrix returned by computeTemeToPseudoFixedMatrix is a 3x3 rotation matrix, but the matrix expected by the modelMatrix property is a 4x4 matrix (which allows the transformation to include translation), so you’ll need to construct a 4x4 matrix from the 3x3. For example:
You’re on the right track. Cesium’s native coordinate system is Earth Centered Fixed, or ECF, so you need to rotate the positions from your SGP4 propagator from the TEME axes to the Fixed axes. computeTemeToPseudoFixedMatrix is only an approximation of that rotation, but it’s the best one we have in Cesium so far. At each animation time, call that function to determine the rotation matrix at that time and assign it to the BillboardCollection’s modelMatrix property.
Thanks for this, and Patrick’s clarification.
As you may know, I and most of the current Cesium contributors work for a company called Analytical Graphics, and we have for many years built products that (among many other things) propagate TLEs and do accurate transformations between frames. At the risk of sounding like I just transferred to the marketing department, you may want to check some of them out:
I’m very impressed with AGI’s work, sounds like you have lots of smart dudes there.
My project is an education/outreach for a NASA science division I support and am hoping to do all the work in the browser, rather than relying on server-side computations feeding CZML. Part of this approach is driven by politics and part by tech.
My project is an education/outreach for a NASA science division I support and am hoping to do all the work in the browser, rather than relying on server-side computations feeding CZML. Part of this approach is driven by politics and part by tech.
Sounds interesting. We’d love to have a glimpse of what you’re working on when you’re ready to share.
Sounds interesting. We’d love to have a glimpse of what you’re working on when you’re ready to share.
Will do!
BTW, I enjoyed reading your contributors’ guide, coding standards, and testing docs – great to have consistency. Now I need to get smart on RequireJS and AMD…
Sorry to jump in on an old conversation, but I was wondering if you knew if the STK Components currently has the ability to export CZML or if its still planned? I can always ask a salesman at AGI but thought I’d go to the source. We’re evaluating cesium and would like to build up a small scenario to demonstrate its abilities to our customer. My thought is that its easy to use the STK products to build that scenario and then we can export that with STK components. Most of the examples I see out there seem to be generated.
We have two things that may help you, but both are in pre-release form. The first is a CZML generation library for STK Components, as you’ve mentioned. The second, which may actually be closer to what you need, is a CZML exporter for desktop STK, which aims to create a CZML representation of your STK scenario. Neither is completely ready for prime-time, but will be useful for demo purposes. Your best bet is to talk to your salesperson if you want to get your hands on either one before they’re released.
Also, just in case you’re not aware, there’s a low-level, open-source CZML writer available as well:
Mike, just to reiterate what Kevin said, we have definitely given our these new pre-release tools to customers interested in Cesium on a case-by-case basis. They are still in heavy development but very useful for demos. Keep me CCed on any emails to your sales guy and I’ll make sure we hook you up. For security purposes we have to make sure everything goes through the proper channels.