https://github.com/grumpypixel/msfs2020-simconnect-go
Golang interface for Microsoft Flight Simulator 2020 (MSFS2020 ) using SimConnect
https://github.com/grumpypixel/msfs2020-simconnect-go
api flight flight-simulator fs2020 golang microsoft-flight-simulator-2020 msfs2020 simconnect simulator
Last synced: 4 months ago
JSON representation
Golang interface for Microsoft Flight Simulator 2020 (MSFS2020 ) using SimConnect
- Host: GitHub
- URL: https://github.com/grumpypixel/msfs2020-simconnect-go
- Owner: grumpypixel
- License: mit
- Created: 2021-02-01T09:07:19.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-27T20:43:18.000Z (over 4 years ago)
- Last Synced: 2024-11-13T13:54:37.715Z (over 1 year ago)
- Topics: api, flight, flight-simulator, fs2020, golang, microsoft-flight-simulator-2020, msfs2020, simconnect, simulator
- Language: Go
- Homepage:
- Size: 107 KB
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# msfs2020-simconnect-go
This is a Golang interface for Microsoft Flight Simulator 2020 (MSFS2020 ) using SimConnect.
## Installation
`$ go get github.com/grumpypixel/msfs2020-simconnect-go`
## Does it work?
Yes, it does. This package was created to power the [msfs2020-gopilot](https://github.com/grumpypixel/msfs2020-gopilot).
Please note that this interface is not complete, but a lot of the SimConnect functionality has been implemented.
## Where's the Documentation?
Check out the official [SimConnect API Reference](https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimConnect%2FSimConnect_API_Reference.htm).
Apart from that, there's no other documenation at the moment. Since this is still *work in progress* the code is your friend.
So go ahead and have a look at the file [defs.go](https://github.com/grumpypixel/msfs2020-simconnect-go/blob/main/simconnect/defs.go) which is, more or less, the transfused code from SimConnect.h.
## Any Examples?
At the time of writing, there are two simple [examples](https://github.com/grumpypixel/msfs2020-simconnect-go/tree/main/examples) available.
[Example #1](https://github.com/grumpypixel/msfs2020-simconnect-go/blob/main/examples/01_simconnect/main.go) shows the basic [SimConnect](https://github.com/grumpypixel/msfs2020-simconnect-go/blob/main/simconnect/simconnect.go) interface. With this approach, you will need to manage all *simulation variables*, *requests* etc. yourself. This is most likely what you want.
[Example #2](https://github.com/grumpypixel/msfs2020-simconnect-go/blob/main/examples/02_simmate/main.go) shows how to use the [SimMate](https://github.com/grumpypixel/msfs2020-simconnect-go/blob/main/simconnect/simmate.go), a convenience class where the [management](https://github.com/grumpypixel/msfs2020-simconnect-go/blob/main/simconnect/simvar_manager.go) of [SimVars](https://github.com/grumpypixel/msfs2020-simconnect-go/blob/main/simconnect/simvar.go) is handled for you. This encapsulation works for the [GoPilot](https://github.com/grumpypixel/msfs2020-gopilot) above mentioned, but it may not work for you. Just build your own - which is awesome because this package might get inspired by your creation and improvements.
## SimMate? Seriously?
Because I didn't want to call it *Something* *Something* *Manager*, that's why.
## Do you suffer from naming paralysis from time to time?
Yes. Way too often. But names do matter. And sometimes a stupid name is better than no name at all.
Nonetheless.
Cheers and Happy coding!