Board index FlightGear Development Add-ons

JSB sim curve editing tool

FlightGear has support for add-ons, to further extend the simulator's core functionality.

JSB sim curve editing tool

Postby Flying toaster » Wed Sep 15, 2021 7:59 am

Hello gentlemen,

One of the real pains in the neck working with JSBsim curves was that the workflow forced me to take the the data from the XML, put it in my favorite spreadsheet app (Libreoffice calc for me) build the curves, edit data and move it back to the XML when I was done.

I kind of got tired of that and developed an electron javascript application that allows me to modify graphically the curves in an XML file and save back to the file all in one (you can also modify values or select units for display).

Image

I licensed the application GPLv3 and I want to make it available on some development platform to get first user feedback and fix some bugs along the way.

I think it holds potential to become a full fledged editor to create models from scratch, without meddling with XML, but some time in the future.

As I never put my source code on public repositories out there, do any of you have a recommendation on why to choose one service vs. another (github vs. sourceforge vs. you_name_it) how to distribute binaries, and pointer to good tutorials on how to set up the whole thing for electron projects?

Thank you in advance

Cheers

Enrique
Flying toaster
 
Posts: 390
Joined: Wed Nov 29, 2006 7:25 am
Location: Toulouse France

Re: JSB sim curve editing tool

Postby merspieler » Wed Sep 15, 2021 8:33 am

I'd recommend going to gitlab cause it is open source (incontrast to github or sourceforge) so you could self host it, if you want to.
Gitlab has good documentation, package repositories and CI integration... so in theory, it can build your apps for you and release them automatically... tho for the begin I wouldn't bother with that.

Another option is gitea which is as well open source.
It's less complex than gitlab but doesn't have good CI and release binaries would have to be uploaded manually for the releases.

As for setting things up:
Install git, if you haven't already.

Then do the following:
In the main directory run `git init`
Then create a .gitignore file, listing temporary files, which shouldn't go into the repo (like a build directory or .swp swap files)
You can always check, which files could be added by running `git status`.
Once you've got that in place, run `git add *`, check you're added files with `git status` and if everything you want is added, run `git commit "initial commit"`.

Both, gitea and gitlab will show you, how to push to their service, when you create an empty repo.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2296
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: JSB sim curve editing tool

Postby portreekid » Wed Sep 15, 2021 11:04 am

Flightgear Airports is also an Electron app I developed. I use GitHub to host the code and Travis to build it. I can help to get it building with TravisCI.

https://github.com/Portree-Kid/flightgear-airports

https://app.travis-ci.com/github/Portre ... r-airports

Travis now doesn't advertise free FOSS builds so not sure about that.

Keith
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: JSB sim curve editing tool

Postby merspieler » Wed Sep 15, 2021 11:26 am

I would strongly recommend to NOT use Travis anymore... they're not treating security issues well and just recently leaked customers secrets (link)
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2296
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: JSB sim curve editing tool

Postby portreekid » Wed Sep 15, 2021 12:06 pm

Autsch. That was the only free OS CI known to me.
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: JSB sim curve editing tool

Postby merspieler » Wed Sep 15, 2021 12:13 pm

gitlab offers some free CI stuff, never used it my self tho.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2296
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: JSB sim curve editing tool

Postby S&J » Wed Sep 15, 2021 1:25 pm

If you want anyone to have a go using it and provide feedback for possible alterations. Maybe move it towards sectionalised wings, I'd be very interested.
"Stay away from negative people.They have a problem for every solution." - Albert Einstein
S&J
 
Posts: 797
Joined: Wed Aug 26, 2020 7:31 pm

Re: JSB sim curve editing tool

Postby Johan G » Wed Sep 15, 2021 1:45 pm

Flying toaster wrote in Wed Sep 15, 2021 7:59 am:I [...] developed an electron javascript application that allows me to modify graphically the curves in an XML file and save back to the file all in one (you can also modify values or select units for display).

Impressive. :)

merspieler wrote in Wed Sep 15, 2021 11:26 am:I would strongly recommend to NOT use Travis anymore... they're not treating security issues well and just recently leaked customers secrets (link)
portreekid wrote in Wed Sep 15, 2021 12:06 pm:Autsch. That was the only free OS CI known to me.

Sh*t happens. Should be patched by now. See the Travis security bulletin. :wink:

With "cycling your secrets" I assume they mean changing the secret SSH key?
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: JSB sim curve editing tool

Postby merspieler » Wed Sep 15, 2021 1:54 pm

Sh*t happens. Should be patched by now.


But they didn't really react quickly nor transparently... they will never learn their lesson, if there are so consequences.

Imo, the leak wasn't the problem... it was just a symptom of a bad working system (as in management priorsations...) rather than a real technical problem.
Nia (you&, she/her)

Please use gender neutral terms when referring to a group of people!

Be the change you wish to see in the world, be an ally to all!

Join the official matrix space
merspieler
 
Posts: 2296
Joined: Thu Oct 26, 2017 11:43 am
Location: Wish to be in YBCS
Pronouns: you&, she/her
Callsign: you&, she/her
IRC name: merspieler
Version: next
OS: NixOS

Re: JSB sim curve editing tool

Postby Johan G » Thu Sep 16, 2021 6:37 pm

merspieler wrote in Wed Sep 15, 2021 1:54 pm:But they didn't really react quickly nor transparently...

Ouch. :(
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: JSB sim curve editing tool

Postby Flying toaster » Thu Sep 16, 2021 9:32 pm

I have one question that springs to my mind. I have seen on Github's license page that GPLv3 offers right of patent to its contributor.
Do I understand correctly that if somebody contributes patented code, they retain ownership of the patent (which is fine for me as long as the patented code is not in the main branch, because, royalties) or that somebody can patent the body of code that they did not produce (which I am not OK with).

Sorry to bring that legal issue here, but I just want to be sure (we Europeans are still a bit paranoid about software patents).

Another question. Anybody knows how to setup a build system on Github. There is a Node.JS continuous integration action, but CI is overkill for what I want to do. Or do I build the packages on my PC and put them as packages (electron spews 100mb+ so the quota will be reached soon). Also since I do not have access to a Mac it may be a bit painful for Mac users.

Of course I can let build instructions in the readme, and as long as you know how to install Node.JS (npm) it should work. But that is a bit more CLI use that I would care people to have to fight with.

Cheers

Enrique
Flying toaster
 
Posts: 390
Joined: Wed Nov 29, 2006 7:25 am
Location: Toulouse France

Re: JSB sim curve editing tool

Postby Johan G » Fri Sep 17, 2021 7:34 am

Flying toaster wrote in Thu Sep 16, 2021 9:32 pm:I have one question that springs to my mind. I have seen on Github's license page that GPLv3 offers right of patent to its contributor.
Do I understand correctly that if somebody contributes patented code, they retain ownership of the patent (which is fine for me as long as the patented code is not in the main branch, because, royalties) or that somebody can patent the body of code that they did not produce (which I am not OK with).

The last paragraph of the preamble to the GNU General Public License, version 3 (GPLv3) explains the reasoning relatively well:
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

Skimming through section 11 Patents, it seems the point is to prevent a patent holder from contributing to a piece of software licensed under GPLv3 and then sue for patent infringement.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6634
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: JSB sim curve editing tool

Postby portreekid » Sat Sep 18, 2021 12:52 pm

Flying toaster wrote in Thu Sep 16, 2021 9:32 pm:Another question. Anybody knows how to setup a build system on Github. There is a Node.JS continuous integration action, but CI is overkill for what I want to do. Or do I build the packages on my PC and put them as packages (electron spews 100mb+ so the quota will be reached soon). Also since I do not have access to a Mac it may be a bit painful for Mac users.


The Mac was the reason I went to travis CI. Crossplattform builds are a pain.

Keith
portreekid
 
Posts: 651
Joined: Tue Jan 14, 2014 4:36 pm
Location: Leipzig
Callsign: PORTREE
Version: 2020.2.1
OS: Windows 10

Re: JSB sim curve editing tool

Postby Flying toaster » Sun Sep 19, 2021 11:30 am

I have placed the repository in public view on GitHub

Link on Github

Still have to have a working release action (electron-forge/github-publisher is broken with that project for reasons I have spent too much time fighting with).

I have put a zip with the binary for windows in the 0.1 release. Careful it is a whopping 80-something megabytes (the downside of electron)
I may upload a linux version some time in the future (when I fire up my Suse partition).
Other than that, feel free to give feedback, and if somebody has an idea on how to fix that dreaded electron-forge mess don´t hesitate

Cheers

Enrique
Flying toaster
 
Posts: 390
Joined: Wed Nov 29, 2006 7:25 am
Location: Toulouse France

Re: JSB sim curve editing tool

Postby Flying toaster » Mon Sep 20, 2021 12:26 pm

Added some documentation (I do not guarantee it is accurate) :
Flying toaster
 
Posts: 390
Joined: Wed Nov 29, 2006 7:25 am
Location: Toulouse France

Next

Return to Add-ons

Who is online

Users browsing this forum: No registered users and 1 guest