Train Stats

API Endpoint: getTrains

JSON/JSON Group: Info: Data Type: Input/Output:

Name

Name of the train

String

Output

ClassName

UE Class Name

String

Output

location/x

X Location of Train

Float

Output

location/y

Y Location of Train

Float

Output

location/z

Z Location of Train

Float

Output

location/Rotation

Compass Heading of Train

Float

Output

ForwardSpeed

Speed in km/h

Float

Output

TotalMass

Total mass of Train

Float

Output

PayloadMass

Payload Mass for Train

Float

Output

MaxPayloadMass

Maximium Payload Mass for Train

Float

Output

TrainLength

Number of FGRailroadVehicles in train

Integar

Output

TrainConsist/Name

Name of the FGRailroadVehicle

String

Output

TrainConsist/ClassName

UE Class Name

String

Output

TrainConsist/TotalMass

Total mass of FGRailroadVehicle

Float

Output

TrainConsist/PayloadMass

Payload Mass for FGRailroadVehicle

Float

Output

TrainConsist/MaxPayloadMass

Maximium Payload Mass for FGRailroadVehicle

Float

Output

PowerConsumed

Power used by train

Float

Output

TrainStation

Current or Next Stop for Train

String

Output

ThrottlePercent

Train’s Throttle Setting

Float

Output

Derailed

Is Derailed

Boolean

Output

PendingDerail

Has Pending Collision (Name taken from the Object in Unreal)

Boolean

Output

Status

Status of Train

String

Output

TimeTable/StationName

Name of Stations in Train’s Timetable

String

Output

features/properties/name

Type of name being marked (Player, Train Track(WIP), Notable Building, etc)

String

Output

features/properties/type

Type of item being marked (Player, Train Track(WIP), Notable Building, etc)

String

Output

features/geometry/name

GeoJSON name of map marking (Point, Line, Circle, etc)

String

Output

features/geometry/coordinates

X,Y,Z for map marking

[Float, Float, Float]

Output

features/geometry/type

GeoJSON type of map marking (Point, Line, Circle, etc)

String

Output

Example:

[
 [
	{
		"Name": "Caterium Choo",
		"location":
		{
			"x": -40870.9765625,
			"y": -134480.453125,
			"z": 8189.84228515625,
			"rotation": 280
		},
		"ForwardSpeed": 14.194183349609375,
		"TotalMass": 300000,
		"PayloadMass": 0,
		"PowerConsumed": 25,
		"TrainStation": "Quickwire Central",
		"ThrottlePercent": 0,
		"Derailed": false,
		"PendingDerail": false,
		"Status": "Self-Driving",
		"TimeTable": [
			{
				"StationName": "Caterium Ore"
			},
			{
				"StationName": "Quickwire Central"
			}
		],
		"features":
		{
			"properties":
			{
				"name": "Caterium Choo",
				"type": "Train"
			},
			"geometry":
			{
				"coordinates":
				{
					"X": -40870.9765625,
					"Y": -134480.453125,
					"Z": 8189.84228515625
				},
				"type": "Point"
			}
		}
	}
]