Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Userland App: Running a platesolver on Android

astrometry
  • Please log in to reply
3 replies to this topic

#1 hcf

hcf

    Viking 1

  • -----
  • topic starter
  • Posts: 562
  • Joined: 01 Dec 2017

Posted 25 September 2020 - 01:50 AM

Phones/Tablets have been getting more powerful over the last few years, yet astro software running on them is limited compared to Windows/Linux machines/SBCs. The Userland app on Android, creates a linux distro on Android, letting you run a certain kind of Linux apps. Rooting the Android device is not required. It does have some limitations, which might prevent some key apps being run on it for now. I have been looking for something like this and recently came across it, so I tried it out for one of my astro applications.

 

Although I recently discovered this app, it has been around since 2018. Here is my astro application that fits well with Userland on Android.

 

I have a linux based application, called PSWAI, which is a simple python script which connects a piggybacked IP Action Cam (Xiaomi Yi), a platesolver (astrometry.net) running locally, and a planetarium app (Sky Safari Pro). It can take a picture on the Action Cam which is aligned to the scope, platesolve it to find the RA/DEC of the center of the image and show on Sky Safari where the scope is pointed to at any time. Detailed description here:

 

https://www.cloudyni...sual-astronomy/

 

Initially I ran this on a raspberry pi 3B, then moved on to a Android TV box running Armbian to improve the platesolving speed. I have also been able to run it on a Chromebook running Linux using Crouton, which lets you run both the platesolver and Sky Safari on the same device.

 

I recently installed Userland on my 5 year old cheap 2GB RAM BayTrail based Android Tablet (OS version 5.0). I use this tablet mainly for Sky Safari, and it has some storage space available. Userland offers a choice to install a bunch of different Linux distros.

 

  • I chose the Ubuntu and the install went fine. I logged in using a ssh shell client to it.
  • I then installed astrometry.net using "apt install astrometry.net" and downloaded the wide angle index files I normally use into /usr/share/astrometry
  • I next installed some utils (git, vim etc ) and python libraries I need, using "apt install"
  • Then I cloned my pswai github repo and I was set.

 

The Sky Safari on the Android side, can communicate with the PSWAI using the localhost IP address of 127.0.0.1, The IP cam has a hotspot which I connected the tablet to. This lets the PSWAI script connect to the camera, take and download pictures. The Userland does run in the background as a Service, so it does not get killed when Sky Safari is in the foreground. You can also connect to Userland using ssh from Linux, putty from Windows.

 

Performance

 

Performance was about 25-30 seconds for the whole, take a picture, platesolve, and update Sky Safari. My Armbian box (4GB RAM) does it in 10-15 seconds. This is a blind platesolve of a 5x7 degree image. The tablet has only 2GB RAM, and is running Sky Safari at the same time. So the performance is not the  fastest but still usable. I have not yet tried to tweak the script to try to speed it up. I tried this over two nights, and never had any failures attributed to the Userland setup. This is excellent news for people who want to use platesolving for visual. You can use your phone/tablet and im my case all done over wifi (no wires).

 

Now the limitations:

I am new to using this app, and I might be wrong, but I cannot use the USB port on the tablet. From what I read this has to do with Android Permissions and not possible for now. This is a huge limitation if you want to use guiding, mount control under Userland. However, it can do networked connections like the PSWAI uses.

No way to use the device peripherals like the camera either. They might have sound working somewhat from what I read. And while it can read Android files using /host-rootfs/sdcard/  I am not sure if it can read the extra sd card slot, which maybe a good place to put pictures etc.

 

One way to get around these limitations for app developers would be to split an app functionality between an Userland linux app, and a regular Android app and communicate between the two using networking (TCP/IP) or files.

 

Anyway, it is very nice to be able to run some non trivial linux astro apps on a phone/tablet and get it working without any code changes. The Userland app storage for me is about 3GB, but a lot of it (1GB) is for LXDE which I later realized I don't need.


Edited by hcf, 25 September 2020 - 01:54 PM.

  • halx likes this

#2 MikiSJ

MikiSJ

    Apollo

  • *****
  • Posts: 1,181
  • Joined: 24 Feb 2006
  • Loc: San Jose, CA

Posted 25 September 2020 - 01:54 AM

Ambitious and I wish you luck with your endeavor.


  • hcf likes this

#3 halx

halx

    Vendor (DSO Planner)

  • ****-
  • Vendors
  • Posts: 2,578
  • Joined: 28 Sep 2010
  • Loc: Albany, California, USA

Posted 28 September 2020 - 12:19 PM

Great find and thank you for the quick guide! To amend most of the above issues, including the solving time, one should look into the native app development, port astronomy.net or better solver, and WiFi / BT peripherals using simple IoT modules like ESP32 for older serial protocol mounts integration. In addition, you can incorporate a crude accelerometer chip on the latter to make the PS less blind, thus cutting the PS time effectively.


  • hcf likes this

#4 hcf

hcf

    Viking 1

  • -----
  • topic starter
  • Posts: 562
  • Joined: 01 Dec 2017

Posted 28 September 2020 - 12:53 PM

 In addition, you can incorporate a crude accelerometer chip on the latter to make the PS less blind, thus cutting the PS time effectively.

For the wide angle index files, I don't think initial position makes a lot of difference for astrometry.net. The index files in that range are quite small. I have tried adding that in the PSWAI before, without much gain.

 

Looking at the astrometry.net solve-field outputs scrolling by, it seems like source extraction is taking the most time.

 

However, the best part of this setup is, it will continue to improve in speed as the phones/tablets get faster and with more RAM.

 

The Userland concept has potential. For example, if there is a live stacker on linux, Userland might be a good platform to try it on. Camera control and capture can be kept on the Android side to avoid the USB problems in Userland.


Edited by hcf, 28 September 2020 - 02:07 PM.



CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics





Also tagged with one or more of these keywords: astrometry



Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics