Morris

by Morris

The Morris Golf Simulator API

How to connect a launch monitor to the simulator. It speaks Open Connect v1 and Morris Shot JSON v1, Morris's open standard for describing a golf shot in JSON. Both travel over the same connection.

Your program sends

{
  "format": "morris-shot",
  "version": "1.0",
  "club": "7i",
  "ball_speed": 52.3,
  "launch": 16.2,
  "launch_dir": -1.4,
  "spin": 6800,
  "spin_axis": 2.1
}

The simulator replies

{"Code":200,"Message":"Shot received successfully"}

The connection

The simulator is a TCP server on the computer the game runs on. The launch monitor's program connects as a client and sends one JSON object per shot.

Transport
TCP. The launch monitor's program is the client; the simulator is the server.
Address
127.0.0.1. The simulator listens on its own computer only, because the protocol has no authentication.
Port
921. On a Mac, 49921: macOS does not let an ordinary user open a port below 1024 on the computer alone.
Messages
One UTF-8 JSON object per message, with no separator. Anything between two objects, such as a line break, is ignored.
Size
Up to 65,536 characters per message.
Format
Morris Shot JSON v1 when the message carries "format": "morris-shot"; Open Connect v1 otherwise.

Connect a launch monitor

  1. Open the simulator. Its launch monitor panel shows the port it listens on.

  2. Point the launch monitor's program at 127.0.0.1 and that port. If you write your own program, open a TCP connection to that address.

  3. Once the simulator shows the launch monitor as connected, every shot you send is played on the course.

The simulator plays a shot when it is waiting for one, with the player at the ball, and flies it with its own physics in the direction the player aims. A shot that arrives at any other moment, with the ball in the air, between holes or in the menu, is acknowledged with 200 and not played.

Simulator responses

They are the same for both formats. Each response is a JSON object with Code and Message, also with no separator.

200

Shot received. Also when it is not played: a repeated shot number or a shot out of turn.

{"Code":200,"Message":"Shot received successfully"}

201

Who is hitting and with which club. It goes to every connected program when the player addresses the ball and each time they change club.

{"Code":201,"Message":"…","Player":{"Handed":"RH","Club":"I7"}}

501

Message rejected. Message says why, and the connection stays open.

{"Code":501,"Message":"Missing ball data"}

Player.Handed is the player's hand (RH, right-handed) and Player.Club the club, with these codes. Message carries a fixed text of the protocol.

Player.Club codes

  • DR
  • W3
  • W5
  • H4
  • I4
  • I5
  • I6
  • I7
  • I8
  • I9
  • PW
  • GW
  • SW
  • LW
  • PT
The 501 messages
Malformed JSONThe text is not valid JSON.
Message too largeThe message is longer than 65,536 characters and is dropped.
Unsupported morris-shot versionA Morris Shot JSON message with no version, or with a version that is not 1.x.
Missing ball dataBall speed, one of the two launch angles or the spin is missing.
Implausible ball dataA launch value is outside the limits below.

Heartbeats and Open Connect messages that carry no shot get no response.

Limits of a shot

Outside these limits there is no shot a launch monitor can measure: the simulator answers 501 and does not play it. They apply to both formats, with the speed already in m/s.

Ball speed
0 < ball_speed < 100 m/s (223.7 mph)
Launch angle
−90 ≤ launch ≤ 90 °
Launch direction
−90 ≤ launch_dir ≤ 90 °
Total spin
0 ≤ spin < 20,000 rpm
Spin axis
−90 ≤ spin_axis ≤ 90 °

Open Connect v1

The API v1 that launch monitor programs already speak. If your launch monitor's program speaks it, point it at the simulator's address and port and you are done.

A shot in Open Connect v1
{
  "DeviceID": "Bay 1",
  "Units": "Yards",
  "ShotNumber": 12,
  "BallData": {
    "Speed": 117,
    "SpinAxis": 2.1,
    "TotalSpin": 6800,
    "HLA": -1.4,
    "VLA": 16.2
  },
  "ClubData": {
    "Speed": 86.1
  },
  "ShotDataOptions": {
    "ContainsBallData": true,
    "ContainsClubData": true,
    "LaunchMonitorIsReady": true
  }
}
A heartbeat
{
  "DeviceID": "Bay 1",
  "ShotDataOptions": {
    "ContainsBallData": false,
    "ContainsClubData": false,
    "IsHeartBeat": true,
    "LaunchMonitorIsReady": true
  }
}
Fields the simulator reads
FieldUnitWhat it is
DeviceIDstringName of the launch monitor or the program.
ShotNumberintegerThe shot's number. When it repeats the previous shot's number on the same connection, the shot is acknowledged with 200 and not played.
UnitsstringWhen it starts with "m" (Metres), speeds are in m/s. Without it, or with any other value, they are in mph.
ShotDataOptions.ContainsBallDatatrue or falsetrue in a shot. Without it, the message is not a shot.
ShotDataOptions.ContainsClubDatatrue or falsetrue for ClubData to be read.
ShotDataOptions.IsHeartBeattrue or falsetrue in a heartbeat: it carries no shot and gets no response.
ShotDataOptions.LaunchMonitorIsReadytrue or falseWhether the launch monitor is ready. Read in any message, heartbeats included.
BallData.SpeedrequiredmphBall speed. Required.
BallData.VLArequired°Launch angle, above the horizontal. Required.
BallData.HLArequired°Launch direction from the target line, positive to the right. Required.
BallData.TotalSpinrpmTotal spin. Required unless BackSpin and SideSpin are sent.
BallData.SpinAxis°Tilt of the spin axis, positive to the right: the ball curves right. 0 when absent.
BallData.BackSpinrpmBack spin. With SideSpin, used only when TotalSpin is missing.
BallData.SideSpinrpmSide spin, positive to the right. With BackSpin, the simulator works out total spin and its axis.
ClubData.SpeedmphClub head speed.

The simulator reads no other field of the message.

Morris Shot JSON v1

Morris's standard for describing a golf shot in JSON: plain names, SI units and a JSON Schema to validate it. It travels over the same connection as Open Connect.

  • SI units: metres, m/s, degrees, rpm and seconds.
  • Everything sideways is positive to the right of the target line: direction, spin axis, side spin, club path, face and offline distance.
  • Fields the standard does not know are ignored, so it can grow without breaking anyone.
  • Values the launch monitor measures are accepted and validated, but Morris's physics always computes the flight from the launch data: the measured values do not change it.
The message
FieldUnitWhat it is
formatrequiredstringAlways "morris-shot": this is how the simulator reads it as this standard.
versionrequiredstring"1.0". Any 1.x version is read the same way.
devicestringName of the launch monitor or the program that sends the shot. Up to 200 characters.
shot_numberintegerThe shot's number. When it repeats the previous shot's number on the same connection, the shot is acknowledged with 200 and not played.
timestringWhen the shot was hit: ISO 8601 date and time with its time zone, such as 2026-12-03T12:00:00Z.
handedstringThe player's hand: "RH", right-handed, or "LH", left-handed. Accepted as data: the simulator sends the round's hand in its 201 response.
clubstringThe club: "DR", "3W", "5W", "3H", "4i" to "9i", "PW", "GW", "SW", "LW" or "PT". Accepted as data: the simulator sends the round's club in its 201 response.
Ball launch
FieldUnitWhat it is
ball_speedrequiredm/sBall speed as it leaves the club.
launchrequired°Launch angle, above the horizontal.
launch_dirrequired°Launch direction from the target line, positive to the right.
spinrpmTotal spin.
spin_axis°Tilt of the spin axis, positive to the right: the ball curves right. 0 when absent.
back_spinrpmBack spin.
side_spinrpmSide spin, positive to the right.

Spin is required, in one of two forms: spin, with spin_axis if you have it, or back_spin and side_spin. When both arrive, spin wins.

The club
FieldUnitWhat it is
club_speedm/sClub head speed just before impact.
attack°Angle of attack, negative when the club moves down into the ball.
club_path°Club path from the target line, positive to the right.
face°Face angle at impact from the target line, positive to the right.
dynamic_loft°Dynamic loft at impact.
Measured by the launch monitor
FieldUnitWhat it is
carrymCarry distance.
totalmTotal distance, with the roll.
sidemOffline distance where the ball lands, positive to the right.
total_sidemOffline distance where the ball stops, positive to the right.
apexmHighest point of the flight.
landing°Landing angle.
hangsTime in the air.

The JSON Schema (draft 2020-12) validates a shot in your own code. Its address is also its $id:

Examples

A 7-iron with every field, a driver with its spin as back_spin and side_spin, and a putt with just what it needs.

7-iron
{
  "format": "morris-shot",
  "version": "1.0",
  "device": "Bay 1",
  "shot_number": 12,
  "time": "2026-12-03T12:00:00Z",
  "handed": "RH",
  "club": "7i",
  "ball_speed": 52.3,
  "launch": 16.2,
  "launch_dir": -1.4,
  "spin": 6800,
  "spin_axis": 2.1,
  "club_speed": 38.5,
  "attack": -3.1,
  "club_path": 1.2,
  "face": 0.4,
  "dynamic_loft": 21,
  "carry": 148.2,
  "total": 156,
  "side": -3.4,
  "apex": 27.5,
  "landing": 46,
  "hang": 6.1
}
Driver
{
  "format": "morris-shot",
  "version": "1.0",
  "device": "Bay 1",
  "shot_number": 13,
  "handed": "RH",
  "club": "DR",
  "ball_speed": 70,
  "launch": 11.8,
  "launch_dir": 1,
  "back_spin": 2550,
  "side_spin": -250,
  "club_speed": 47.2,
  "attack": 2.5,
  "club_path": 3,
  "face": 0.8,
  "dynamic_loft": 14.5,
  "carry": 233,
  "total": 252,
  "side": -2,
  "total_side": -4.1
}
Putt
{
  "format": "morris-shot",
  "version": "1.0",
  "device": "Bay 1",
  "shot_number": 14,
  "club": "PT",
  "ball_speed": 2.1,
  "launch": 1.5,
  "launch_dir": 0.3,
  "spin": 30
}

From Open Connect to Morris Shot JSON

The same data with plain names and in SI. This is how a shot moves from one format to the other.

Open Connect v1Morris Shot JSON v1Conversion
BallData.Speedball_speedmph × 0.44704 = m/s. With Units in metres, the same value.
BallData.VLAlaunchThe same value.
BallData.HLAlaunch_dirThe same value.
BallData.TotalSpinspinThe same value.
BallData.SpinAxisspin_axisThe same value.
BallData.BackSpinback_spinThe same value.
BallData.SideSpinside_spinThe same value.
ClubData.Speedclub_speedmph × 0.44704 = m/s. With Units in metres, the same value.
DeviceIDdeviceThe same value.
ShotNumbershot_numberThe same value.
UnitsNo equivalentMorris Shot JSON is always in SI.
ShotDataOptionsNo equivalentA Morris Shot JSON message is always a shot.

Only in Morris Shot JSON:

  • time
  • handed
  • club
  • attack
  • club_path
  • face
  • dynamic_loft
  • carry
  • total
  • side
  • total_side
  • apex
  • landing
  • hang

Validate a shot

Paste a message in Morris Shot JSON and check that it meets the JSON Schema of version 1.

Load an example:

It is validated in your browser: nothing is sent.

Here you will see whether the shot meets the standard and how the simulator reads it.

License

The Morris Shot JSON v1 specification and its JSON Schema are published under the CC BY 4.0 license: anyone can implement them in a launch monitor, a program or a simulator, crediting Morris.

creativecommons.org/licenses/by/4.0

1.x versions only add optional fields: a 1.0 shot stays valid.

Morris Shot JSON v1, by Morris.