# Great circle distance

**URL:** <https://community.cesium.com/t/great-circle-distance/30377>\
**Category:** Cesium for Unreal\
**Created:** [March 7, 2024, 2:52pm UTC](https://community.cesium.com/t/great-circle-distance/30377 "2024-03-07T14:52:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BDelacroix](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/bdelacroix/32/14000_2.png) [@BDelacroix](https://community.cesium.com/u/BDelacroix)\
**Post date:** [March 7, 2024, 2:52pm UTC](https://community.cesium.com/t/great-circle-distance/30377/1 "2024-03-07T14:52:53Z")

</div>

Sorry if this is a basic question but does the cesium plugin for unreal have a function to compute great circle distances?

---

<div class="post-metadata">

**Author:** ![Brian\_Langevin](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/brian_langevin/32/14490_2.png) [@Brian\_Langevin](https://community.cesium.com/u/Brian_Langevin)\
**Post date:** [March 11, 2024, 11:01pm UTC](https://community.cesium.com/t/great-circle-distance/30377/2 "2024-03-11T23:01:41Z")

</div>

I’m not aware of any functionality like this exposed through cesium-unreal blueprints (or in C++).

If you were looking to write this yourself in C++, you may be able to reference the code in `CesiumGeospatial::SimplePlanarEllipsoidCurve`. You’d still have to do a bit of work, as it doesn’t calculate any distances for you, but it is the class that the cesium-unreal `FlyToComponent` is built on.

---

<div class="post-metadata">

**Author:** ![azrogers](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/azrogers/32/21672_2.png) [@azrogers](https://community.cesium.com/u/azrogers)\
**Post date:** [March 12, 2024, 3:44pm UTC](https://community.cesium.com/t/great-circle-distance/30377/3 "2024-03-12T15:44:03Z")

</div>

It’s important to note that `SimplePlanarEllipsoidCurve` is an approximation of a great circle/geodesic. It should be good enough for most purposes, but if you’re looking for precise answers you’d need something like CesiumJS’s `EllipsoidGeodesic` class, which is implemented with a much more complicated (and computationally taxing) iterative solver: [cesium/packages/engine/Source/Core/EllipsoidGeodesic.js at 1.115 · CesiumGS/cesium · GitHub](https://github.com/CesiumGS/cesium/blob/1.115/packages/engine/Source/Core/EllipsoidGeodesic.js). There’s no equivalent to it currently in Unreal, but it could definitely be added. Particularly, you’d want to port over the implementation of Vincenty’s inverse formula, which will give you the results you need: [cesium/packages/engine/Source/Core/EllipsoidGeodesic.js at 1.115 · CesiumGS/cesium · GitHub](https://github.com/CesiumGS/cesium/blob/1.115/packages/engine/Source/Core/EllipsoidGeodesic.js#L111C10-L111C32)

---

<div class="post-metadata">

**Author:** ![BDelacroix](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/bdelacroix/32/14000_2.png) [@BDelacroix](https://community.cesium.com/u/BDelacroix)\
**Post date:** [March 14, 2024, 12:12pm UTC](https://community.cesium.com/t/great-circle-distance/30377/4 "2024-03-14T12:12:51Z")

</div>

Thank you all for the suggestions.

I’ll leave this feature for a future addition if it is asked for but I know now it isn’t trivial.
