Editor: Map Widget
Map Widget
The map UI widget can display the location of spacecraft relative to the surface of the Earth (or other planets) using a geodetic conversion. The widget can display multiple spacecraft and perform simple predictions of the flight paths of spacecraft. An example is shown in the Orbits/Demo_Constellation
level.
Adding the Map Widget
The map widget is added to the Nom UI
object. Ensure that Nom UI has been added to the level blueprint on the Begin Play
event. This is typically done as the last step, along with all UI configurations. From the UI call the Add Widget | Map
node and put a spacecraft variable into the spacecraft parameter. The Show Grid
parameter will display geodetic grid lines every 15 degrees of latitude and longitude. The Show Labels
parameter will display the name of the spacecraft and ground station on the map. Disabling this parameter will only show the icon of the locations instead.
Adding Objects
The Spacecraft
parameter in the map widget above is optional. Spacecraft are not required to be drawn to the map. Additional spacecraft can be added using the Update Map Widget | Add Spacecraft
function. This allows for a spacecraft to be added along with some parameters. The colour of the spacecraft (both the orbit and the icon) and the history flag can be set. If Draw History
is enabled, the spacecraft’s historical locations will be tracked over the map. This will be tracked for the total number of orbits as defined in the parameter.
In the same way that spacecraft can be added to the widget, ground stations can also be added to the location. These are picked up automatically by the system and do not need to be added manually. All ground stations that have been added to the level in the Begin Play
event will be added to the UI widget.
Orbit Prediction
The map widget can predict the orbit of a spacecraft in the future for a specified amount of time. This is a crude approximation using a simple Keplerian orbit propagation system and does not make use of an RK4 integrator. As such, the propagation can be useful for determining the location of the spacecraft in the next orbit to the nearest degree of latitude and longitude but will be more inaccurate the further the time is away from the current time. The propagation time of the orbit can be configured using the Update Map Widget | Set Propagation Time
function. The default value is 4hr which is what is set on the system if the user does not specify a time.
To start showing the propagation of a spacecraft, the spacecraft must be spotlighted. This can be done using the Update Map Widget | Set Spotlight Spacecraft
. This can be done at any point in the event graph and can be done during the level when playing. Spotlighted prediction paths are shown in the larger colour band with the colour of the spacecraft that is selected.
Note
Only one spacecraft can have its orbit predicted at any one time. This is to ensure that the simulation does not run slow. Orbit propagation is an expensive process and can slow down the simulation.
The spotlight can be disabled using the function on the UI widget to show all spacecraft: Update Map Widget | Show All Spacecraft
. This will display all spacecraft around the current planet that is displayed in the UI map.
Multiple Planets
The map widget will show the spacecraft on a particular planet or body. In the constellation demo level, spacecraft are orbiting the Earth, Moon and Mars. To switch between the views to see the spacecraft orbiting the other bodies, the Update Map Widget | Set Planet
function can be called, which will display all of the spacecraft around another planet.