A simulated GSPro launch monitor interface and test sockets server is now complete. The server simulates an actual GSPro Connect system in order for me to be able to do end-to-end testing. This LM interface send results data to the GSPro socket whenever a ball is hit. I don’t actually have a real GSPro system yet - still need to rummage around for a sufficiently modern graphics card and build a machine to run that.
An example JSON object that was sent from the launch monitor to the simulated GSPro server (and the simulated response) is shown below. Hopefully I can validate on a real system soon. The only thing I can see wrong at this point is that the spin angle is somehow being truncated to 0. Probably a dopey radians/degree mistake on my part.
[2024-03-23 16:18:46.440414] (0x0000007fb2794040) [trace] Received the following message from the Launch Monitor:
{
"DeviceID": "PTrac LM 0.1",
"Units": "Yards",
"ShotNumber": 1,
"APIversion": "1",
"BallData": {
"Speed": 31.0,
"SpinAxis": 0.0,
"TotalSpin": 0.0,
"BackSpin": 3743.0,
"SideSpin": "-358.0",
"HLA": 13.3,
"VLA": "-7.9"
},
"ClubData": {
"Speed": 0.0,
"AngleOfAttack": 0.0,
"FaceToTarget": 0.0,
"Lie": 0.0,
"Loft": 0.0,
"Path": 0.0,
"SpeedAtImpact": 0.0,
"VerticalFaceImpact": 0.0,
"HorizontalFaceImpact": 0.0,
"ClosureRate": 0.0
},
"ShotDataOptions": {
"ContainsBallData": true,
"ContainsClubData": false,
"LaunchMonitorIsReady": true,
"LaunchMonitorBallDetected": true,
"IsHeartBeat": false
}
}
[2024-03-23 16:18:46.441129] (0x0000007fb2794040) [trace] Sending the following message from the GSPro simulated server:
{
"Code": 201,
"Message" : "GSPro Player Information",
"Player" : {
"Handed": "RH",
"Club" : "DR"
} }
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.