Tablet UI

127 views
Skip to first unread message

Bastian Barton

unread,
May 6, 2021, 10:25:56 AM5/6/21
to Stellarium
Hi community

I've been working on a compact UI for use on tablets, especially for planetarium presentations. When you're standing there in the dark, showing and explaining, you will appreciate an interface with a clear, reduced layout, large buttons and proper feedback.
No need to re-invent the wheel, just some files added to the webroot folder.

I'll be happy to share my work as soon as it is finished.  But I need to test in the dome, refine, replace some assets. Your feedback is welcome, let me know what you think about it.
And I'd be very grateful if someone could help me to review and cleanup the code.

features implemented:
- standard stellarium displays
- clear button
- large displays for datetime and location
- preset keys for sunrise, sunset, transit etc
- smooth time and location transitions, adjustable runtime
- map-based constellation selection

features tbd:
- time and location display on output
- planets
- asterisms
- deepsky objects

PS. there are 1 or 2 basic core features that would make me (and other planetarians) very very happy :-)

screenshots:
stellarium-tablet-ui.png

Georg Zotti

unread,
May 6, 2021, 10:46:30 AM5/6/21
to Stellarium
Looks interesting. Is this thought as a replacement of the current RemoteControl HTML interface (webroot/index.html)?

If you wish to contribute, you can add a "pull request" on our github site. I propose a filename of "webroot/tablet.html". New icons can go into the webroot/images subdirectory.

If you urgently need some functionality in the RemoteControl API, you can request that as well. But I think most things are covered well.

It seems you added "season" icons. I hope they adapt to both hemispheres of the globe. ;-)

Kind regards,
Georg

Bastian Barton

unread,
May 6, 2021, 1:09:46 PM5/6/21
to Stellarium
it is not a replacement, it's an alternative for presentation. For dev, I added everything in /mobile/... to preserve the standard UI, but sure we can change the paths
Sorry for being a northern hemisphere chauvinist ;-) I'm working on more panels: southern sky, zodiac, solar system, deepsky... I could also add the lat value to the season auto-detection
With a minimum of HTML knowledge, it's possible to edit maps and objects like:

<div id="skymap-autumn" class="skymap-view">
    <img src="images/skymap-autumn.jpg" />   // Put a Stellarium Screenshot here
    <button class="btn-const" onclick="toggleSkyObject(this)" style="left:50%; top:27%; width:15%; height: 15%;">Peg</button>    // change the button text to something Stellarium knows
    ...
</div>

Talking of features: I don't know what is 'urgent'. I can only say that these operations are widely used at the planetarium:
- deselect single constellations (instead there is the ClearAll button which is ok)
- select/deselect single asterisms (no idea how I could solve this, but showing ALL asterisms is an exotic use-case ;-)
- mark or label certain stars like "Polaris" or ['Deneb', 'Vega', 'Altair']
- smooth time transition (instead created a cosine-shaped ramp for timerate and keep pushing values)
- smooth location transition (pushing 30-60 requests per second is not a good solution and still bucking)

and a couple of questions
- I am using an external JS to calculate local sunset/sunrise times, is it possible to query that from Stellarium?
- Can I display a label fixed to local coordinates (like date & time in the south)?
- Is there a way to add scale ticks to ecliptic and grids which are visible in a fisheye?

It's still a long way... but if we have a nice result in the end, I'm sure there are people who appreciate it

Alexander Wolf

unread,
May 7, 2021, 5:18:27 AM5/7/21
to Stellarium
Hi!

пт, 7 мая 2021 г. в 00:09, 'Bastian Barton' via Stellarium <stell...@googlegroups.com>:
 I could also add the lat value to the season auto-detection

Do you mean the beginning of the season or the middle of the season?
 
With a minimum of HTML knowledge, it's possible to edit maps and objects like:

<div id="skymap-autumn" class="skymap-view">
    <img src="images/skymap-autumn.jpg" />   // Put a Stellarium Screenshot here
    <button class="btn-const" onclick="toggleSkyObject(this)" style="left:50%; top:27%; width:15%; height: 15%;">Peg</button>    // change the button text to something Stellarium knows
    ...
</div>

Hmm... I fear this feature will be very difficult to implement for all types of objects.

 
Talking of features: I don't know what is 'urgent'. I can only say that these operations are widely used at the planetarium:
- deselect single constellations (instead there is the ClearAll button which is ok)

Well, I am the last man who changed the code for selection/deselection of the constellations. The code was changed to support demonstration in the real time mode and scripting (the stories about heavens fairytales), but not for direct management of selection. I think I can add 2 new methods (selectConstellation() and deselectConstellation()) with the name of the constellation as parameters (probably both methods should be available for scripting engine also).
 
- select/deselect single asterisms (no idea how I could solve this, but showing ALL asterisms is an exotic use-case ;-)

When I added support for the asterisms I did not add the selection of isolated asterims due simple reason: one star can be included in the few asterisms. I see only one way to add ability to select/deselect isolated asterisms: 1) do not add the feature in the GUI; 2) add 2 methods - selectAsterism() and delesectAsterism() with names as parameters; 3) make both methods available through scripting engine and Remote Control plugin only.
 
- mark or label certain stars like "Polaris" or ['Deneb', 'Vega', 'Altair']

Available through scripting engine.
 
- smooth time transition (instead created a cosine-shaped ramp for timerate and keep pushing values)

Probably we may add a new method for this feature similar to setObserverLocation() (as in the scripting engine!) method and add the ability to use then in the scripting engine and Remote Control plugin.
 

- smooth location transition (pushing 30-60 requests per second is not a good solution and still bucking)

Available through scripting engine.

If Remote Control plugin can run scripts, who was loaded through WUI (I hope Georg can give more info for this feature), then many "missed" features can be implemented through scripts.
 

and a couple of questions
- I am using an external JS to calculate local sunset/sunrise times, is it possible to query that from Stellarium? 

Maybe. The Remote Control plugin can call actions and we have defined actions to set time of those events for selected objects (see "actionToday_Rising" and "actionToday_Setting" actions). So, if the Sun selected and you called actionToday_Setting action then you will get the time of sunset as current time within Stellarium. Yes, this is 2 steps and all 9 methods were introduced to use them through scripting engine and shortcuts (as a real time demonstration). 
 
- Can I display a label fixed to local coordinates (like date & time in the south)?

Yes for static text and no for dynamic text (see LabelMgr class).
 
- Is there a way to add scale ticks to ecliptic and grids which are visible in a fisheye?

Hmm... I don't see a problem with it, because this was already implemented a few releases ago.

--
With best regards, Alexander

Georg Zotti

unread,
May 7, 2021, 5:58:53 AM5/7/21
to stell...@googlegroups.com
Am 07.05.2021 11:18, schrieb Alexander Wolf:
> [...]
>> Talking of features: I don't know what is 'urgent'. I can only say
>> that these operations are widely used at the planetarium:
>>
>> - deselect single constellations (instead there is the ClearAll
>> button which is ok)
>
> Well, I am the last man who changed the code for selection/deselection
> of the constellations. The code was changed to support demonstration
> in the real time mode and scripting (the stories about heavens
> fairytales), but not for direct management of selection. I think I can
> add 2 new methods (selectConstellation() and deselectConstellation())
> with the name of the constellation as parameters (probably both
> methods should be available for scripting engine also).

This would be very good. It's actually one of my aims for future
Skyculture functionality. Imagine a GUI panel which lists buttons for
all constellations of the selected skyculture, and you can select
one-by-one or customizable groups. Future topic, though, don't hold your
breath!
A scripting command can be embedded as 1-line script into a button
definition for a RemoteControl web GUI. Just make sure to run it with
the right skyculture!
If "constellation not found", do nothing but give a qDebug() to the
logfile.

>> - select/deselect single asterisms (no idea how I could solve this,
>> but showing ALL asterisms is an exotic use-case ;-)
>
> When I added support for the asterisms I did not add the selection of
> isolated asterims due simple reason: one star can be included in the
> few asterisms. I see only one way to add ability to select/deselect
> isolated asterisms: 1) do not add the feature in the GUI; 2) add 2
> methods - selectAsterism() and delesectAsterism() with names as
> parameters; 3) make both methods available through scripting engine
> and Remote Control plugin only.

For now, these functions should be scriptable and thus would be
available to a web GUI. However, as above, Skycultures 2.0 should make
that possible. Somewhere, around 2025...
The large number of asterisms with partial overlaps should allow
selection of one's favourites. (No need for parallel Winter-G and
Winter-Hexagon, for example)


>> - mark or label certain stars like "Polaris" or ['Deneb', 'Vega',
>> 'Altair']
>
> Available through scripting engine.
>
>> - smooth time transition (instead created a cosine-shaped ramp for
>> timerate and keep pushing values)
>
> Probably we may add a new method for this feature similar to
> setObserverLocation() (as in the scripting engine!) method and add the
> ability to use then in the scripting engine and Remote Control plugin.

Some extended setJD() with a smooth animation would be nice indeed.

>> - smooth location transition (pushing 30-60 requests per second is
>> not a good solution and still bucking)
>
> Available through scripting engine.
>
> If Remote Control plugin can run scripts, who was loaded through WUI
> (I hope Georg can give more info for this feature), then many "missed"
> features can be implemented through scripts.

Yes, you can assign scripts to RemoteControl buttons. There are a few
examples in the existing interface pages. (They are in need of updating
to some new functions/properties, though.)


>> and a couple of questions
>>
>> - I am using an external JS to calculate local sunset/sunrise times,
>> is it possible to query that from Stellarium?
>
> Maybe. The Remote Control plugin can call actions and we have defined
> actions to set time of those events for selected objects (see
> "actionToday_Rising" and "actionToday_Setting" actions). So, if the
> Sun selected and you called actionToday_Setting action then you will
> get the time of sunset as current time within Stellarium. Yes, this is
> 2 steps and all 9 methods were introduced to use them through
> scripting engine and shortcuts (as a real time demonstration).

:-)

>> - Can I display a label fixed to local coordinates (like date & time
>> in the south)?
>
> Yes for static text and no for dynamic text (see LabelMgr class).
>
>> - Is there a way to add scale ticks to ecliptic and grids which are
>> visible in a fisheye?
>
> Hmm... I don't see a problem with it, because this was already
> implemented a few releases ago.

Yes, did that last year or so. See the Gridlines UI in the main
application. These are not yet defined in the RemoteControl HTML
interface, but the properties are there, so that may be done rather
quickly.


Bastian Barton

unread,
May 7, 2021, 8:08:13 PM5/7/21
to Stellarium
Thanks guys, and nice to meet you.

I'm sorry if I overlooked features which are already implemented. Sometimes it's a little hard to find. The quick way is to observe the requests of the remote interface. If it's not implemented here, I look at the API docs, and sometimes I can find smart solutions in the scripts. But sometimes it seems to me some features are just not in the docs...? ;-) Btw, is there a complete list of actionIDs somewhere?

Asterisms
yes, pleeeease give me these 2 methods, scripting is absolutely sufficient for now  ;-)

Star labels
give me a hint - I found something for a marker: core.selectObjectByName("HIP 11767", pointer = true);
but how to get the label?

Transitions
Yeah, triggering local scripts is far better than pushing requests. Should have thought of that. I guess it's possible to do some math?
When you're implementing things like that, consider ease-in and -out. I can tell you on a 180° screen it will make a difference.
0.5 (sin((t-0.5)pi)+1) [0..1] is a quick solution I found, but of course it can also be done with splines or else
To cut a long story short: how is a transition done by script?

Sunrise/Sunset
no worries about that. For my case, it's not crucial to get an exact value. I would add or subtract an hour anyway, it's just for a quick scene setup

Locally aligned labels
is there maybe another solution or a workaround to have date and location included in the image?

Grid ticks
Once more, please give me a hint - I start up my fisheye view like this, so the labels are not visible
core.setDiskViewport(true);
core.setProjectionMode("ProjectionFisheye");
StelMovementMgr.zoomTo(180,1);
StelMovementMgr.lookZenith();
core.setFlagGravityLabels(true);

@Georg, I've added a switch for the hemisphere. Furthermore I put the clickable sky maps to separate files to have a kind of edit mode.
I'm sorry I won't be able to do all the sky cultures, but it's easy for people to create any map they like ;-)
Southern sky however is definitely a task.

I'm going to post some files soon, I think it's the easiest way for you to see what I like to achieve.

Thanks & Cheers
Bastian

Alexander Wolf

unread,
May 8, 2021, 4:07:39 AM5/8/21
to Stellarium
Hi!

сб, 8 мая 2021 г. в 07:08, 'Bastian Barton' via Stellarium <stell...@googlegroups.com>:
I'm sorry if I overlooked features which are already implemented. Sometimes it's a little hard to find. The quick way is to observe the requests of the remote interface. If it's not implemented here, I look at the API docs, and sometimes I can find smart solutions in the scripts. But sometimes it seems to me some features are just not in the docs...? ;-)

It's possible :(
 
Btw, is there a complete list of actionIDs somewhere?

Probably the fastest way will be to open settings of Remote Sync plugin and see all properties, who is beginning from the "action" string :)
 
Asterisms
yes, pleeeease give me these 2 methods, scripting is absolutely sufficient for now  ;-)

Done in master :)
 
Star labels
give me a hint - I found something for a marker: core.selectObjectByName("HIP 11767", pointer = true);
but how to get the label?

See chapter 16 in Stellarium User Guide for a full example, but a small hint: see scriptable methods in the LabelMgr class ;)
 
Transitions
Yeah, triggering local scripts is far better than pushing requests. Should have thought of that. I guess it's possible to do some math?
When you're implementing things like that, consider ease-in and -out. I can tell you on a 180° screen it will make a difference.
0.5 (sin((t-0.5)pi)+1) [0..1] is a quick solution I found, but of course it can also be done with splines or else
To cut a long story short: how is a transition done by script?

See buttons with class "stelssc" in the index.html file of Remote Control plugin ;)
 
Locally aligned labels
is there maybe another solution or a workaround to have date and location included in the image?

I don't see a quick solution for dynamic text right now. :-/
 
Grid ticks
Once more, please give me a hint - I start up my fisheye view like this, so the labels are not visible

See methods of GridLinesMgr class ;)

Georg Zotti

unread,
May 8, 2021, 4:22:08 AM5/8/21
to stell...@googlegroups.com
Am 08.05.2021 10:07, schrieb Alexander Wolf:
> Hi!
>
>> Btw, is there a complete list of actionIDs somewhere?
>
> Probably the fastest way will be to open settings of Remote Sync
> plugin and see all properties, who is beginning from the "action"
> string :)
>

See also User Guide, 12.5.3, how to get the complete list. The list will
change (grow) from version to version. In rare cases, properties may
still be renamed, which may break compatibility with earlier versions.

Alexander Wolf

unread,
May 8, 2021, 8:58:55 AM5/8/21
to Stellarium
Hi!

Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

And updated API docs of course: https://stellarium.org/doc/head/scripting.html
 

Russell Hippert

unread,
Jul 24, 2022, 5:53:45 PM7/24/22
to Stellarium

I know it's been a year, but has there been any progress on this? If progress has stopped, what other options are there for Windows based tablets? 

Georg Zotti

unread,
Oct 22, 2022, 7:04:20 AM10/22/22
to Stellarium
Tablet users have been able to contact and operate a running instance of Stellarium via RemoteControl plugin since about 2016.  See User Guide section 13.5. Some other developers also seem to provide alternative interfaces. They never report to us or even provide their code, though.
Reply all
Reply to author
Forward
0 new messages