×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Living amongst the trees

  • Posts: 81
  • Thank you received: 3
Yes, I think that import/export buttons would be a good first project for me although I would want to take it further but one must learn to walk first.

I programmed in C++ from 1989 through 2004 then I switched over to more weakly-typed languages. I am completely unfamiliar with cross-platform development and tools. Is KStars "all C++ all the time"? or does it use a SpiderMonkey-like core where I can use C++ for CPU-intensive operations and JavaScript for user-interface programming?

Thanks.
6 years 11 months ago #16203

Please Log in or Create an account to join the conversation.

It's completely C++, though we are using more of QML (similar to Javascript). But for now mostly C++.
6 years 11 months ago #16205

Please Log in or Create an account to join the conversation.

  • Posts: 81
  • Thank you received: 3
Sorry for sending you this reply on the INDI forum. Yesterday, I signed up to join kstars-devel but I have not received the email confirmation yet. (I just finished sending an email to the webmaster to see if he/she could expedite.)

Have you heard of pluralsight.com ? It is an invaluable resource for learning new technologies. I found a 4.3 hour course called "Introduction to Qt: A C++ Cross Platform Application Framework" presented by Tod Gentille. Does that name ring a bell? It was released 29-May-2014; that is almost 3 years ago. Can you think of any major changes since then that I should be aware of?

Thanks.
6 years 11 months ago #16207

Please Log in or Create an account to join the conversation.

Well, Qt is a huge world, but most of the principles are the same more or less. Found another one here www.udemy.com/qt-c-gui-tutorial-for-beginners/ for $10
The following user(s) said Thank You: Brian Morgan
6 years 11 months ago #16208

Please Log in or Create an account to join the conversation.

  • Posts: 81
  • Thank you received: 3
I never received a reply from kstars-devel webmaster -- sad but true.

I've watched 3 online courses on Qt. It is very cool.

I am wondering though -- is it possible to write a Qt app in which C++ calls a JS function but the JS code is undefined at application build time? In other words I would like the user of the Qt app to choose a file from a dropdown list that contains the JS code. Once it is selected then the C++ code in the Qt app can call that JS function.

If that is not possible in Qt/QML, is it possible with D-Bus?
6 years 11 months ago #16270

Please Log in or Create an account to join the conversation.

I don't think that's possible, but you can use D-Bus to call existing functions in KStars. kstars-devel is automatic reply, check your spam box.
6 years 11 months ago #16273

Please Log in or Create an account to join the conversation.

  • Posts: 2247
  • Thank you received: 223

I would be interested to know exactly how you've achieved this please, as I would need something similar.
thanks


edit:
I think I got it figured it out, going to draw multiple regions to block off the part of the sky I cannot reach with the telescope.
Last edit: 6 years 9 months ago by Gonzothegreat.
6 years 9 months ago #17112

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31

Replied by Khalid on topic Living amongst the trees

Somewhat related to the topic of this post ...

Both Cartes du Ciels and Stellarium use the same format for horizon info. It is a simple azimuth/altitude pairs in a text file.

I was able to convert my Cartes du Ciel file into Kstars using a SQLite script.

The details are here: converting horizon files from Stellarium or Cartes du Ciel to KStars .

Obviously, an automated import/export would be better, but as Jasem said, it requires Qt development knowledge.
6 years 8 months ago #18138

Please Log in or Create an account to join the conversation.

  • Posts: 81
  • Thank you received: 3
I have the Qt development experience, and I would be happy to develop the import/export feature. At this very moment, however, I am in the final stages of enabling my 50-year old mount to take unguided exposures in the ~5 minute range. It has been the result of weeks of dedicated hacking. Once I get over this hump then I can enjoy a new level of astrophotographic enjoyment. That will then free me up to do KStars development.
6 years 8 months ago #18139

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 30
Thank you for these instructions.

I gave it a shot and managed to get the database setup but the horizon did not appear in Kstars (running latest for github).

Here is a dump of the table:
sqlite> select * from horizon_1;
0.0|0.0
0.0|10.0
15.0|20.0
19.0|33.0
24.0|31.0
30.0|41.0
33.0|45.0
35.0|52.0
39.0|54.0
43.0|57.0
48.0|58.0
52.0|61.0
58.0|64.0
62.0|64.0
70.0|69.0
77.0|66.0
81.0|66.0
85.0|65.0
sqlite> select * from horizon_2;
94.0|63.0
102.0|62.0
105.0|58.0
114.0|60.0
121.0|35.0
125.0|45.0
126.0|36.0
131.0|36.0
133.0|37.0
144.0|35.0
146.0|33.0
149.0|33.0
153.0|30.0
161.0|30.0
164.0|26.0
170.0|23.0
175.0|26.0
179.0|40.0
sqlite> select * from horizon_3;
185.0|25.0
211.0|32.0
214.0|37.0
221.0|20.0
224.0|35.0
226.0|40.0
236.0|33.0
255.0|30.0
265.0|35.0
sqlite> select * from horizon_4;
281.0|35.0
294.0|40.0
303.0|37.0
311.0|33.0
316.0|14.0
321.0|33.0
341.0|25.0
350.0|33.0
355.0|15.0
359.0|0.0
6 years 8 months ago #18141

Please Log in or Create an account to join the conversation.

  • Posts: 322
  • Thank you received: 31

Replied by Khalid on topic Living amongst the trees

There was a missing step in my article.

Execute the following SQL.
INSERT INTO "horizons" VALUES (1, 'horizon_1', 'Region 1',1);
INSERT INTO "horizons" VALUES (2, 'horizon_2', 'Region 2',1);
INSERT INTO "horizons" VALUES (3, 'horizon_3', 'Region 3',1);
INSERT INTO "horizons" VALUES (4, 'horizon_4', 'Region 4',1);
The following user(s) said Thank You: Michael Fulbright
6 years 8 months ago #18142

Please Log in or Create an account to join the conversation.

  • Posts: 105
  • Thank you received: 30
That seems to have worked.

I do see another problem - it seems Kstars doesn't draw the bottom of the horizon accurately as you rotate the sky view around. It looks fine if you look due West, for example, but as you shift your view towards the Zenith the base of the horizon (at alt=0) tears away from the horizon everywhere except where you've defined it as alt=0 in the database. I defined mine at az=0 and az==89, etc, for 4 regions like your example. I guess for now I can define lots of smaller regions (all starting and ending at alt=0) and it will look OK.
6 years 7 months ago #18285

Please Log in or Create an account to join the conversation.

Time to create page: 0.613 seconds