Monday, April 1, 2024

Learning to use SimConnect: Part Three - System Events

In my first post about SimConnect, I showed how to create a simple C# console app that connected to the SimConnect server running within Microsoft Flight Simulator 2020, using the managed SimConnect library. In the second post, I showed how to receive messages from the simulator using events defined by the SimConnect object, namely OnRecvOpen and OnRecvQuit.

In this post, we'll get into another way of getting information from the simulator, system events. In later posts, I'll hopefully be able to dive into two-way communication, using client events and simulator variables.

Friday, March 1, 2024

Learning to use SimConnect: Part Two - SimConnect Messages

 In my first post about SimConnect, I showed how to create a simple C# console app that connected to the SimConnect server running within Microsoft Flight Simulator 2020, using the managed SimConnect library. Now let's talk about how to actually interact with the simulator in a (somewhat) useful fashion.

I have a GitHub repository with all the code from this series in it, tagged at each stage. If you want to start out with the code as it was at the end of the first post, use the tag "03-add-a-pause".

SimConnect client/server communication is primarily through a set of defined data structures called messages. Clients receive these messages periodically from the server and either ignore the message, or take action, based on the kind of message received. In this model, the simulation engine itself is a client of the SimConnect server, so in order to control the simulation, we send messages from our client to the server, which the simulation engine then receives as a client. To start with, let's look at how we can receive messages from SimConnect.

Saturday, February 17, 2024

Learning to use SimConnect

Over the past year or so, I've really gotten into playing Microsoft Flight Simulator 2020. I'm an MS Flight Sim fan from way back; I still have version 4 - on a single floppy! - from 1991 out in my garage. I've been a plane nut even longer than that, ever since my dad got his private certificate back in the 70s. I hadn't used MSFS since the 98 version, but I got a small bonus at work and decided to give it a try again. I've since spent probably too much money buying a bunch of the Logitech flight sim controls to go with it. 

More recently, I've been working with an Arduino kit to see about making my own controls - the Logitech multi-panel's trim control is not that great, so I'm trying to see if I can come up with something better. In order to do that, I need to use the SimConnect SDK to communicate with MSFS 2020. I haven't gotten very far with it, but I'm going to share some of the stuff that I have learned so far, since one of the obstacles has been having to piece together how to do things from the documentation, plus various forum posts I've found through Google. Maybe having all this stuff in one place will be helpful to someone else.

Tuesday, June 21, 2016

"If you find yourself in a fair fight..."

"...your tactics suck!"

I remember reading that once on a bumper sticker for a Krav Maga school in Raleigh and being intrigued by the cheekiness of it.

My son has been taking taekwondo lessons for about 6 years now, and the other day I thought to myself, "What the hell, I'll try their Krav class."

My first class was tonight.

After the first 30 seconds or so, this is all I could think.

(this used to be an "I've made a terrible mistake" GIF)

That was the most intense exercising I've done since ever. I might have worked out harder that one time I showed up for PT in ROTC in college, but I was also 19 years old then.

I need this, though. Every time I go to the gym, I tell myself I'll up the intensity, or the duration, on the treadmill, but I rarely do. And that's when I actually manage to drag myself to the gym. I need to work out with other people, so that at the very least I'll push myself out of a sense of embarrassment. And the instructors and the other students are great. At the end one of them told me I should be proud just for making it all the way through my first class - he had not. They all made me feel welcome and overlooked my pathetic attempts at punching and kicking.

I may not ever be a badass IDF trooper, but hopefully I'll at least be a smaller target...

Friday, August 14, 2015

Checking in

Soooooo.

Do I write another "yes, I haven't posted in a while" post? Acknowledging that I forget about this blog until I get the notice from my registrar that the domain is about to expire?

I guess I am doing that.

Sigh.

Monday, November 3, 2014

Goodbye, Tom

I read on my Twitter feed this afternoon that Tom Magliozzi of Car Talk had died. He was 77. Not only did I not know he was that old, but I have always assumed he was younger than his brother Ray, for some reason.

I was never a rabid fan of the show, but I did enjoy listening to it on the weekends when it would come on as I was driving around. I did have the occasional "driveway moment" with that show, and I still remember my kids looking at me like I was crazy when I cracked up at the scene the brothers voiced in the first Cars movie.

I think the reason Tom's death really hit me today is that I lost my father last Christmas Eve, and when I did listen to the show, I would often share any gems I heard with my dad the next time we spoke. I miss my dad, especially whenever I hear or read something and think, boy, dad will get a kick out of that for a split second, before I remember that I won't be able to tell him about it. So hearing the news made me feel sad about Tom and my dad at the same time, I guess.

My heart goes out to Ray and the rest of the Magliozzi family on this terrible loss. I heard on NPR today that Ray would like for them to continue airing reruns of the show, as a tribute to Tom. Let's hope they do.

Friday, April 4, 2014

And a catchphrase is born

My family went out to eat tonight. Soon after we ordered, our server came back with a platter full of food. The only thing that was ours was a salad, but the event prompted this exchange with my son.

Him: Wow, if that had been our food, that would have been fast.

Me: Yeah, scary fast.

Him: Yeah, salmonella fast.

Me: That's going in my blog.

On another note, yes, it has been a while, hasn't it?