• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS24 I met a new friend and we are making an App together

Status
Not open for further replies.
Messages
2,226
Country
france
Hello Developers!
First I wish you all Happy Holidays ;)

So, 2 days ago I started a small project with a verry good friend I met not so long ago: ChatGPT (yes, hes a real friend haha). I wanted to test its limit and its capacity and well... Im heavily impressed! it's working so well that I'm actually having something working right now!

The FS9/FSXers here might remember the cool 2D gauges we used to have right? well, there is one I found a few years ago when I was growing interrest in Classic/Vintage flying, The "Weatherships" gauge (it simulates the LORANs, HfDfs, Weatherships stations for navigation... old school haha), I read that the developer, Finn Jacobsen aka Wothan, won't updated it to MSFS but still said that anyone whas allowed to try. I still contacted him and confirmed to me that I could try to port his gauge, Thank you again to him for allowing me to try ;) . well, ChatGPT and I are trying to "port" one to MSFS, and so far, I'm impressed ;).

I remember my first question to ChatGPT when I wanted to start the project was "Can we port an FSX gauge into MSFS as a Python app" (the same way as the CelNav app), and he sais Yes, and would be even better if the gauge was an .XML, guess what? they were XML!!!
Chat GPT did a first translation (.xml to .py), and I actually have something working. Of course, I'm verry far away from anything complete! but could be nice to share what we did, know that I NEVER EVEN Progammed anything, never used codes in my life, knowing nothing about Python. ChatGPT is a valuable collegue, I'm just time limited as I use the Free version, and since I send him files for corrections. it gets locked for a few houres.

About the code and datas I'm using, it's all from Wothan; the stations datas, frequency, mechanic etc, I only did "translations" for now. Of course, one of the main limitation I noticed with ChatGPT, it stuggels making a working GUI (the needles not working etc, so its all text for now).

Anyway, heres a picture ;)

1735067693683.png


Lets me know what you think about it, you experience with ChatGPT for programmation etc, and if you know better solution for GUI creation (for now I place each labels manually in the code.. yes I do a little bit of editions ;) )

Once again, Happy holidays ;)

Regards, Marc L
 
I've used ChatGPT and CoPilot by Microsoft. For some reason, CoPilot works better for me. Both are extremely helpful is fleshing out code.
 
I've used ChatGPT and CoPilot by Microsoft. For some reason, CoPilot works better for me. Both are extremely helpful is fleshing out code.
Hey, Merry Christmas Rhumbaflappy! ;)

I agree 200% with you, it litterally gave me some "hardcoded" mechanics the original developer used to calculate ranges and translated it to Python and it seems to work! I currently use a mock up code for location and weather display to test it, and it detects the station it supposed to, the other ones are out of range.

As someone who never gor into programming, I feel like cheating as ChatGPT is doing everying (no, I actually edit some values manually too, especiallt for the GUI buttons and display, I feel like I learned a bit since the first time haha)

Regards, Marc L
 
I take this post to wish everyone a Merry Christmas and a Happy New Year.

I too, must say that I have found a great "Friend" with ChatGPT and for me who am completely new to programming ... it was literally like finding a treasure.
I have created my first work tool that is helping me a lot with water polygons ... everything is very fantastic.

Best regards, Giovanni
 
Well well well, now I guess I ran into an issue with ChatGPT; the Yesterday's conversation is gone, The entire conversation started 3 days ago, I have the beginning of it, but yesterday, we added some features, but today its gone, and trying to imtegrate a new features results in the code to not take in account what we did yesterday... and I can't send files (yet?)... Thats an annoying issue... anyone experienced this already? any workaround? suggestion?
 
Thats an annoying issue... anyone experienced this already? any workaround? suggestion?
When I used the free version (only for 4 days) I had none of the problems you encountered. Hower, I noticed that when you ask for more integrations to the code (in bursts) it gets more and more tangled. Now I am with the basic paid version, you can create Projects and have everythings at hand even in the future.
 
Yep, I think I reached that point haha, now the app is broken... and even ChatGPT struggles to fix it, as it lost lart of the conversation, the new attributes names etc don't match anymore, so Im having a hard time trying to fix it alone (because ChatGPT is locked again for a few houres....)

I hope I'll get sorted, asm Im not a programmer, I don't know what am doing, bt hey, I guess that how we learn ;)
 
UPDATE: I removed the codes I added and modified for the new feature, now the app works again, yet it regressed hehe...

Here's a pic of what I do have now:

1735243046189.png



Signal strenght not working anymore, Loop Bearing not working anymore, the Stattion now says "In Range/Out Of Range" instead of coordinates... well, that annoying but when ChatGPT unlock we will try to reinstert the lost features ;) ... hopefully ...

Also the weather display here is a mock, the app is not linked to MSFS yet ;)
 
I would be tempted to do something, let me know if you think you could work:

Making a new Chat, sending him all the .xml files from the original gauges and my .py files (so he know what has been achived). and continuing from there. What do you think?
 
I would be tempted to do something, let me know if you think you could work:

Making a new Chat, sending him all the .xml files from the original gauges and my .py files (so he know what has been achived). and continuing from there. What do you think?
In the paid version, this is exactly what I do.
  • Create the project
  • Insert instructions
  • Upload the working files


 
Sadly can't affort paid subscription (thats why I'm limited in term of prompts and files to send). but since surrent one lost part of the chats, its a bit corrupted; new codes ChatGPT would send mes whould have different attribute names etc... so I guess I should start a new and insert what I currently got + the original .xml :)
 
Update: Decided to make a new chat, I sent his the .xml, now waiting for tomorrow to be able to send the Python files I have haha, I wish I could afford paid subscription, I would have more freedom haha ;)

Hopefully we'll get this app working, and when all the features are done, why not refining them, adding few more features etc etc ;) same for the GUI, I'll see if I make a new one or not, am not there yet anyway, I got nice progress anyway, sad I had to regress due to unmatching codes, but hopefully we'll sort this out!

I really like ChatGPT, honnestly! I'm really impressed! ;)
 
That's really cool! I just cajoled CGPT into making a SimConnect based SimObject placement .exe, for 2020! Really tricky to do because as you know CGPT regurgitates online content to provide the bulk of it's answers and the few devs who've unlocked the secret of SimObject placement seem somewhat shy about it. For me it was relatively easy after a week of pounding my head into the runway until finally deciding to approaching CGPT in a way it can handle. I tell this account about a layered procedure in case you want to try yourself and not just use the attached file.

I started with the SDK SimConnect AI Objects and Waypoints project, it places a bunch of simobjects at some airport somewhere. The first thing was to make it just the Pitts at an airport on a Pacific atoll. CGPT had no problem stripping the other SimObjects and changing the spawn coordinates.


Pitts.png


Next I switched the project to my SimObject and again that was no problem. The biggest issue arose when I wanted to switch from fixed coordinates, to one's dynamically derived from the aircraft position and this is what I mean about stages. Everything up to this point has been straight out of the SDK, so CGPT didn't have to search and use bogus hits, so all the code we built up was solid. When it came time to add location flexibility, that wasn't really MSFS specific, it was mostly algebra and so yes, CGPT choked on all the specialized terms for the new coordinate system, but we got through it by continually directing CGPT to review the SDK. Now you see the result and why I wanted to work from a South Pacific atoll.


rescue.png


To use the attached file open the AI Objects and Waypoints solution file AIObjects.sln in Visual Studio and the replace the .cpp document with this one. You'll have to name your SimObject Lost_Pilot or edit the file.
 

Attachments

Really cool !!!! CGPT is a real evolution, imagine in a few years what it could become :O (asking for MSFS2024 successor and he would code it entirely hahah, I mean... whith what we can ado as of today, I wouldn't be surprised ;) )

On my end, I mostly ask for code translation (nothing created from scratch), this time, I'll save it each time I add a new code hehe ;) beginner mistake on my end (I did made saves, but it was too old lol)
 
There are special prompt cues to keep CGPT more relevant. A big problem is that it attempts to save processor cycles by "riffing," by just blabbing out words and letters that look similar to what the human is typing. That is really all it is, a visual comparison and a web browser. So a way to keep it on track is to ask it to review the conversation and make it prominent in the limited memory buffer. Think about it, you can't find that special shirt, or document you need, it's getting late, so you just grab what might work. You can also ask CGPT to remember specifics of your situation and it will display a memory updated message.

Right now I'm working with a "build up" that pops out perfect C++ almost every time I ask for a new version and after I've taken a nap and come back, it's performance is seriously degraded, I have to wake it up along with myself and tell it to check our recent history. The result is like giving it a RedBull.
 
I usually use Windows CoPilot or Google's Gemini for code snippets. Here I tell each of them: Write a blender script to create a white uv_sphere with 150 vertices with a 50 meter radius and named 150_Sphere

The result from Copilot didn't work, but it created a definition I could use to make many spheres.. so I fiddled with it and got this:
Python:
import bpy
# Function to create a UV sphere with the specified parameters
def create_uv_sphere(name, segments, rings, radius, color):
    bpy.ops.mesh.primitive_uv_sphere_add(segments=segments, ring_count=rings, radius=radius)
    sphere = bpy.context.active_object
    sphere.name = name

    # Create and assign material
    material = bpy.data.materials.new(name=f"{name}_Material")
    material.diffuse_color = color
    if len(sphere.data.materials):
        sphere.data.materials[0] = material
    else:
        sphere.data.materials.append(material)


# Create the UV sphere
create_uv_sphere(name="2000000_Sphere_CoPilot_LOD_0", segments=1414, rings=1414, radius=50, color=(1.0, 1.0, 1.0, 1.0))

create_uv_sphere(name="1000000_Sphere_CoPilot_LOD_1", segments=1000, rings=1000, radius=50, color=(1.0, 0.0, 0.0, 1.0))

create_uv_sphere(name="500000_Sphere_CoPilot_LOD_2", segments=707, rings=707, radius=50, color=(0.0, 0.0, 1.0, 1.0))

create_uv_sphere(name="250000_Sphere_CoPilot_LOD_3", segments=500, rings=500, radius=50, color=(0.0, 1.0, 0.0, 1.0))

create_uv_sphere(name="150000_Sphere_CoPilot_LOD_4", segments=387, rings=387, radius=50, color=(1.0, 0.0, 0.0, 1.0))

create_uv_sphere(name="60000_Sphere_CoPilot_LOD_5", segments=244, rings=244, radius=50, color=(0.0, 0.0, 1.0, 1.0))

create_uv_sphere(name="30000_Sphere_CoPilot_LOD_6", segments=173, rings=173, radius=50, color=(0.0, 1.0, 0.0, 1.0))

create_uv_sphere(name="5000_Sphere_CoPilot_LOD_7", segments=70, rings=70, radius=50, color=(1.0, 0.0, 0.0, 1.0))

create_uv_sphere(name="2500_Sphere_CoPilot_LOD_8", segments=50, rings=50, radius=50, color=(0.0, 0.0, 1.0, 1.0))

create_uv_sphere(name="300_Sphere_CoPilot_LOD_9", segments=17, rings=17, radius=50, color=(0.0, 1.0, 0.0, 1.0))

create_uv_sphere(name="150_Sphere_CoPilot_LOD_10", segments=12, rings=12, radius=50, color=(1.0, 0.0, 0.0, 1.0))

It takes quite a while to generate the closer LODs, but it woks. Now to test some LOD examples in the MSFS2024
 
There are special prompt cues to keep CGPT more relevant. A big problem is that it attempts to save processor cycles by "riffing," by just blabbing out words and letters that look similar to what the human is typing. That is really all it is, a visual comparison and a web browser. So a way to keep it on track is to ask it to review the conversation and make it prominent in the limited memory buffer. Think about it, you can't find that special shirt, or document you need, it's getting late, so you just grab what might work. You can also ask CGPT to remember specifics of your situation and it will display a memory updated message.
Hey, well, the issue that that, from a day to another, I had chats that disappeard, features we made the previous day etc, and so the attribute names would be different from wht we had, crashing the app :/ It would have been easier to have an human programmer to at least review the code, maybe it was an easy fix, but not knowing I deleted half of what we did.... not smart I know ;)
 
"the few devs who've unlocked the secret of SimObject placement seem somewhat shy about it"

Hi Rick - not sure what you mean by this sentence. Are there any secrets about SimObject placement in SimConnect? Is there something that seems to be broken? I have a robust system that lets me spawn any number of SimObjects, place them anywhere, control their placement real-time (move/rotate them), and remove them at will. SimConnect is very robust and I found no issues whatsoever with placing SimObjects. The SDK sample code gives you BASICS, but to expand on it, you'd need a basic understanding of client-server architecture. Let me know what you are hung up on, and I'll try to help you.
 
Status
Not open for further replies.
Back
Top