INPE's satellite simulator UI is now powered by Tachikoma.jl, and it is amazing!

Hi!

Some of you know that one of our biggest accomplishments here at the Brazilian National Institute for Space Research (INPE) was to build a validated satellite simulator that is being used in all phases of the attitude and orbit control subsystem (AOCS) development. I always knew that one day I will need a proper TUI to allow me to debug the algorithms more easily than wait for execution and analyze the results.

Hence, 7 (SEVEN!) years ago, I started to code TextUserInterfaces.jl, which is a NCurses wrap with a TUI framework on top. However, due to a lack of time, poor decisions, and technical limitations of the NCurses library, I could never really have something good.

Then, @kahliburke released Tachikoma.jl, which is a terminal framework to build TUIs comparable to Bubbletea and Ratatui. I tested a little bit, and it was amazing. The number of features available there is mind-blowing. Thus, I decided to migrate my old UI project from TextUserInterfaces.jl to Tachikoma.jl. The result is just amazing:

The world map is rendered using GLMakie. The OpenGL frame buffer is copied directly to the Tachikoma.jl widget and shown using the Kitty graphics protocol. The rendering is happening almost in real-time, meaning that I have no noticeable slowdown in the simulation speed given the TUI rendering steps. The ability to show images like this made me abandon the UI project I had using Genie.jl. Genie.jl is amazing, but it is significantly slower to show this kind of information.

Another very good point is how everything in Julia is integrated. I need three packages only to show this world map: GeoMakie.jl, GLMakie.jl, SatelliteAnalysis.jl. Hence, if I want to see the simulation without the waiting time for loading everything, I can just use Tachikoma.jl and the Julia extensions take care of everything.

I think this is a very nice use case of how the Julia ecosystem can be integrated to achieve amazing results. I also want to thank @kahliburke for the amazing work in Tachikoma.jl!

85 Likes

The integration with PrettyTables.jl was so easy :slight_smile:

19 Likes

10 posts were split to a new topic: Asides about gen AI usage in INPE’s satellite simulator

Being able to use Kitty graphics in the terminal with almost no slowdown as we have in Tachikoma.jl is a huge win! I can already imagine so many cool things we could do with this kind of feature.

15 Likes

That looks awesome.
What were the main reasons for you to implement the UI as TUI instead of a GUI or a Web based solution?

2 Likes

Thanks!

I tried a few different approaches. Here’s what I learned:

  1. The first idea was to use QML.jl. However, it turns out that QtGraphs is licensed as GPL. Hence, the entire simulation would need to comply with GPL when shipping it, which is a no-go.
  2. Then, I switched to Genie.jl. It was easy to build the UI and to integrate CairoMakie.jl to show the plots. However, it was really slow to update all the values in some views. Maybe it is related to exchanging the value between the frameworks?

Finally, I tried Tachikoma.jl, and since it is entirely built in Julia and does everything in the terminal, displaying data and creating new features in the UI is really easy. This was the first approach in which I see the simulator almost without performance degradation.

1 Like

and how do you plot? is it possible to use Makie in Tachikoma?