DashboardItemVelocity

Inherits DashboardItem

This DashboardItem shows the velocity of the camera, that is how fast the camera has moved since the last frame in the amount of time it took to render that frame. The Simplification and RequestedUnit can be used to control which unit is used to display the speed. By default, Simplification is enabled, which means that the most natural unit, that is, the one that gives the least number of printed digits, is used.

Members

Name

Documentation

Type

Description

Optional

FontName

This value is the name of the font that is used. It can either refer to an internal name registered previously, or it can refer to a path that is used.

String

Value of type ‘String’

Yes

FontSize

This value determines the size of the font that is used to render the distance.

Double

Value of type ‘Double’

Yes

RequestedUnit

If the simplification is disabled, this distance unit is used for the velocity display.

String

In list { Nanometer, Micrometer, Millimeter, Centimeter, Decimeter, Meter, Kilometer, AU, Lighthour, Lightday, Lightmonth, Lightyear, Parsec, Kiloparsec, Megaparsec, Gigaparsec, Gigalightyear, Thou, Inch, Foot, Yard, Chain, Furlong, Mile, League, Nautical Mile }

Yes

Simplification

If this value is enabled, the velocity is displayed in nuanced units, such as m/s, AU/s, light years / s etc. If this value is disabled, the unit can be explicitly requested.

Boolean

Value of type ‘Boolean’

Yes

Inherited members from DashboardItem

Name

Documentation

Type

Description

Optional

Identifier

The unique identifier for this DashboardItem.

Identifier

An identifier string. May not contain ‘.’, spaces, newlines, or tabs

No

Type

Determines the type of the DashbordItem that should be created.

String

Value of type ‘String’

No

Enabled

If this value is set to ‘true’ this dashboard item is shown in the dashboard. Otherwise it will be hidden.

Boolean

Value of type ‘Boolean’

Yes

GuiName

The name for the DashboardItem that is used when showing it in the user interface.

String

Value of type ‘String’

Yes

Asset Examples

Basic

This example adds a dashboard item that shows the speed of the camera.

 1local Item = {
 2  Identifier = "DashboardItemVelocity_Example",
 3  Type = "DashboardItemVelocity"
 4}
 5
 6asset.onInitialize(function()
 7  openspace.dashboard.addDashboardItem(Item)
 8end)
 9
10asset.onDeinitialize(function()
11  openspace.dashboard.removeDashboardItem(Item)
12end)
Nautical Miles

This example adds a dashboard item that shows the speed of the camera, but always displayed in nautical miles per second (or knots).

 1local Item = {
 2  Identifier = "DashboardItemVelocity_Example_NauticalMiles",
 3  Type = "DashboardItemVelocity",
 4  RequestedUnit = "Nautical Mile"
 5}
 6
 7asset.onInitialize(function()
 8  openspace.dashboard.addDashboardItem(Item)
 9end)
10
11asset.onDeinitialize(function()
12  openspace.dashboard.removeDashboardItem(Item)
13end)