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

OpenLiveStacker - 4th beta - Android Stability Fixes

  • Please log in to reply
49 replies to this topic

#1 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 20 April 2023 - 01:27 PM

OpenLiveStacker - is an open source application for live stacking for Linux and Android.

 

Background

 

I'm getting into EAA, but the big stopper for me is a cumbersome setup and one of big inconveniences is need to bring a laptop to control the camera and do the live stacking and even more so as Linux user I don't really have viable solution even if I bring a laptop. Since we all have quite powerful computing device smartphone or tablet, if I only could connect an astronomical camera directly to a smartphone or tablet...

 

So I implemented it and released as open source... (my two hobbies open-source software and astronomy connected)

 

229337011-72031279-8de8-4be0-b1a1-61d592

 

 

In the nutshell

 

Beta 4 release Chanegelog

 

  • Android - fixed major issue with stability of background processing of the application.
    • Now a notification that shows that OLS is active is always shown as notification
    • Process does not exits while working in background.
    • fixed exiting from the application
  • Fixed UI issue with camera parameters settings - added button with clear way to submit new value
  • Added support of plate solving for stacked frames in addition to live frames
  • Added information of how much to move in RA/DE & Alt/Az coordinates to make accurate corrections of location after plate solving
  • Added support of discarding stacked result in case we don't want to keep it
  • Some UI code refactoring

 

Help I need

 

It is open source project build and I need your help to test and validate it even if you are ShapCap or ASIAir fan.

 

I need user inputs


Edited by artik, 20 April 2023 - 01:33 PM.

  • lambermo, Coco and CltFlyboy like this

#2 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 20 April 2023 - 04:32 PM

That is very interesting. Using an external camera connected to a Android table or phone will work much better then using the internal phone camera.

 

Which external cameras would be compatible and could be connected to an Android phone?

 

Han



#3 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 20 April 2023 - 11:38 PM

Currently following are supported

- ASI ZWO since there is an official Android sdk
- Cameras that support standard USB video class protocol, for example svbony sv105 or Webcam


I think it would be possible to add some DLSRs. I found some open source libraries that allow access to them

#4 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 21 April 2023 - 03:09 AM

Then it could work with my ASI1600 camera . To connect it, I will  need to connect the ASI1600 USB3.0 type B receptacle/female with my phone. I have ordered an "USB 2.0 female to female" adapter to connect two available cables. Hopefully that will work and communicate. I will know in a few days smile.gif

 

In principle if your phone/tablet has an excellent camera you could use that camera instead. For solving I have noticed that the phone camera has to be of really excellent quality allowing it to be solved. But it would be to at least nice to have a menu option to select an stored image for testing.

 

1) Is the simulated image solvable and if so which parameters are required for solving?

2) At which location is the simulated image stored, so i could replace it? 

3) Is the image processing 8 or 16bit?

 

Han



#5 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 21 April 2023 - 04:43 AM

 

Is the simulated image solvable and if so which parameters are required for solving?

yes it is solvable.

 

it is m44 object. Pixel 3.75um focal length 400mm

 

At which location is the simulated image stored, so i could replace it?

 

It is internal app cache. I'm not sure where exactly. I'll check 

 

 

Is the image processing 8 or 16bit

Stacker itself works with 32bit float data. Final result saved 16bit unstretched tiff and 8bit stretched jpeg



#6 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 21 April 2023 - 04:13 PM

I tried to solve and get this error:

 

Screenshot_20230421-230132_Samsung Internet.jpg

 

 

The path exists. It contains some log files and an ols_astap_input.tiff. The tiff file is the M44 image.


Edited by han.k, 21 April 2023 - 04:14 PM.


#7 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 21 April 2023 - 10:21 PM

I tried to solve and get this error:

 

attachicon.gifScreenshot_20230421-230132_Samsung Internet.jpg

 

 

The path exists. It contains some log files and an ols_astap_input.tiff. The tiff file is the M44 image.

What platform/device are you running the app?

 

I get this message when I try to run it in Android simulator (x86) for simple reason - there is no Android build of ASTAP for x86 or x86_64. only arm64-v8a and I assume for armeabi-v7a (32bit version as published on https://www.hnsky.org/astap.htm )

 

All devices I have are 64bit arm64-v8a. If you are running it on armeabi-v7a device - maybe there is a problem with astap_cli build for this arch (I didn't build it myself I downloaded it).


Edited by artik, 21 April 2023 - 10:38 PM.


#8 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 24 April 2023 - 02:51 AM

Good. It work again.

 

1) Stacking using simulation seems to work.

2) There seems a mix up between .txt and .tiff for the stacking see attached screenshot

directory stacked.png

3) The thelables of the menus are not displayed correctly. See screenshot. Screen is not wide enough

Screenshot_20230424-090741_Samsung Internet.jpg

Screenshot_20230424-091309_Samsung Internet.jpg

 

4) Solving still fails. There is no database at 

    /storage/emulated/0/DCIM/OpenLiveStacker/db

 

Logs, See zip file.

 

Screenshot_20230424-091400_Samsung Internet.jpg

 

 

Han

 

Attached Files



#9 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 24 April 2023 - 03:05 AM

What I don't understand, from my laptop I can't see the screenshots at /DCIM/screenshots. I have first t copy them to Download.

 

This is the message after a solve instruction. It looks like astap_cli is not executed. see screenshot.

 

Probably it would help it to add some temporary checks in a debug version of your program. First to check that the executable is in place. Secondly if the database is in place. Then thirdly what error is generated if astap_cli is executed.

 

 

Screenshot_20230421-230132_Samsung Internet.jpg



#10 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 24 April 2023 - 04:12 AM

2) There seems a mix up between .txt and .tiff for the stacking see attached screenshot

 

 

tiff - unstratched 16 bit tiff if you want to do post processing

jpeg - stretched 8 bit jpeg - stuff you see on the screen

txt - general information about the result 

 

(I need to add gallery of results)

 

This is the message after a solve instruction. It looks like astap_cli is not executed. see screenshot.

 

 

It looks like what is not working is running exe. Linker itself runs (so exe succeeeds)

 

 

/system/bin/linker64 /data/app/dom.domain-9bTGef9SpwsKheSjRHdanQ==/lib/arm64/libastap_cli.so -f /storage/emulated/0/DCIM/OpenLiveStacker/debug/ols_astap_input.tiff -fov 0.559000 -ra 8.672778 -spd 109.677778 -r 5.000000 -o /storage/emulated/0/DCIM/OpenLiveStacker/debug/ols_astap_output -d /storage/emulated/0/DCIM/OpenLiveStacker/db

But fails to run the libastap_cli.so,

 

Probably it would help it to add some temporary checks in a debug version of your program. First to check that the executable is in place.

 

 

the executable is actually present (I added a check) - it is one of stuff I was worried about.

 

Since running (linker) succeed I look for the result file I miss

 

Secondly if the database is in place. Then thirdly what error is generated if astap_cli is executed.

 

I actually do. That is why I don't even check for DB because astap_cli reports me if DB is missing on results file. 

Unfortunatly astap_cli wasn't executed.

 

I'll try one again to run simulation of arm64 to check on Android 8.

 

How hard for your to build x86 or x86_64 version of astap_cli for Android?

 

The problem is I can run different versions of Android under simulator but arm64 simulation is painfully slow and for some reason does not work. My Android 8/arm64-v8a simulator does run for some reason.

 

Another thing I can try is to skip linker and run it directly. Maybe it would run on older Android OS versions?



#11 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 24 April 2023 - 05:19 AM

>>How hard for your to build x86 or x86_64 version of astap_cli for Android?

 

Very easy. I cross compile under Linux. So I just tell the compiler to compile an Android executable and that's all. So currently with one script file it compile all executables for Windows arm, Linux X86, arm, Mac X86 & arm. The Windows versions I compile under Windows but that could be done under Linux as well. Normally I work under Windows. Linux is running  in a virtual machine running under Windows.

 

 

I'm not very familiar with Android. Yesterday as a test I copied an astap_cli to my phone and try to execute it. But I can't execute it on my current phone. Using linker64 didn't work either. The phone is not rooted so maybe that is the reason why. I could root it but that would be not a good test.  Missing is a kind of "sudo" command like in Linux.

 

I will try it again on my old 32 bit phone as an exercise. 

 

 

>>Another thing I can try is to skip linker and run it directly. Maybe it would run on older Android OS versions?

 

This is unclear for me.



#12 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 24 April 2023 - 06:41 AM

After some reading I start getting some ideas

 

Linker is needed because the "interpreter" set incorrectly for some reason

 

readelf --string-dump=.interp  astap_cli gives libdl.so while under android is should be /system/bin/linker64 or /system/bin/linker 

 

This stuff I can edit with patchelf

 

This is probably the reason need to start exe via linker and not directly (also I've seen it there)

 

Now 2nd question if there is a need of libdl.so and it exists on Android 8. Can you check via termux (if you have one) if there is /system/lib64/libdl.so or /system/lib/libdl.so?


Edited by artik, 24 April 2023 - 06:46 AM.


#13 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 24 April 2023 - 06:49 AM

I noted it is very difficult to execute files in modern Android. 

https://stackoverflo...-data-local-tmp

 

 

This file exist:

 

/system/lib64/libdl.so



#14 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 24 April 2023 - 07:10 AM

I noted it is very difficult to execute files in modern Android. 

https://stackoverflo...-data-local-tmp

 

 

This file exist:

 

/system/lib64/libdl.so

You tell me lol.gif

 

I followed this link before: and these options turned on and astap_cli was renamed to libastap_cli.so and this is how I managed to run. It probably has something to do with older Android 8.

 

It runs via linker under Android 10 and Android 11 without issue.

 

IIRC managed to reproduce the issue of astap not running once under Android 8/arm64-v8a - but since than something broken and I fail to start arm64 simulator.


Edited by artik, 24 April 2023 - 07:12 AM.


#15 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 24 April 2023 - 04:09 PM

Ok I reporduced it on simulator for Android 7 and armeabi-v7a (the only one that didn't crash and had working browser in image)

 

Once I changed interpreter in ELF to correct one

patchelf --set-interpreter /system/bin/linker ./app/src/main/jniLibs/armeabi-v7a/libastap_cli.so

Instead of libdl.so and removed exec via linker all started working.

 

I'll write a full fix and check on latest android on arm64 to see if it works and update APK...

 

BTW I tried to cross compile astap_cli myself but I couldn't find proper cross compiler for android. I though of exporting some symbols and making shared object for loading.

But I think exe is better solution at this point.


Edited by artik, 24 April 2023 - 04:09 PM.


#16 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 24 April 2023 - 05:06 PM

Good, reads like your making good progress. 

 

 

Compiling astap_cli. From Lazarus (at least in Linux) you can compile to any system if an compiler is installed for that system.  Easiest is to use fpcupdeluxe which you can use to install Lazarus and all compiler you want including Android:

 

https://github.com/L...ses/tag/v2.2.0r

 

 

Once installed including cross compiler for Android, you just have to load the file below in Lazarus and compile:

astap_command_line_android_arm64.lpi

 

or use the command line compiler. Something like this:

/home/h/fpcupdeluxe/lazarus/lazbuild   astap_command_line_android_arm64.lpi

 

 

I'm not sure if it is possible to make a share object. 


  • artik likes this

#17 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 25 April 2023 - 10:40 AM

Today the OTG cable arrived. Finally the stream works for my ASI1600:

 

Screenshot_20230425-171335_Samsung_Internet1.jpg

 

 

Saving settings values like camera gain and exposure time would be very beneficial.

 

You could add to the tiff some information to make it Astro-TIFF like celestial position, exposure time.

 

The pixels in the stack file have all value zero, so that doesn't work for me yet

 

Probably it is better to move the discussion to GitHub or to a personal message discussion.


Edited by han.k, 25 April 2023 - 03:21 PM.


#18 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 25 April 2023 - 02:53 PM

1st of all good news..

2nd I released fix for ASTAP on android 7-8 and notification bug fix as well

 

https://github.com/a...eases/tag/beta5

 

Can you please check that ASTAP works as expected/

 

Now from what I understand it is Mono camera. Since I hadn't had a chance to test it on mono (I own only SVBony sv105 and ASI ZWO 224mc) - there are likely bugs so I'll continue discussion over github

 

3rd... The UI is horrible what browser are you using? Something clearly wrong with positioning.


Edited by artik, 25 April 2023 - 02:54 PM.


#19 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 25 April 2023 - 03:32 PM

Samsung browser

 

Solver is now executed laugh.gif , but database is not found.

 

Will continue here:

 

https://github.com/a...eStacker/issues



#20 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 25 April 2023 - 05:24 PM

Here a screenshot of the stacking but still some problems:

 

Screenshot_20230425-234912_Samsung Internet2.jpg

 

 

 



#21 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 25 April 2023 - 09:06 PM

Samsung browser

 

Solver is now executed laugh.gif , but database is not found.

 

Will continue here:

 

https://github.com/a...eStacker/issues

Actually this one is simple: https://github.com/a...olver-on-andoid

 

Just download and unpack



#22 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 25 April 2023 - 09:07 PM

Here a screenshot of the stacking but still some problems:

 

attachicon.gifScreenshot_20230425-234912_Samsung Internet2.jpg

How it looks like in landscape mode?

 

Generally in landscape orientation I expect it to work better



#23 han.k

han.k

    ASTAP Software

  • *****
  • Vendors
  • Posts: 1,168
  • Joined: 09 Mar 2015
  • Loc: the Netherlands

Posted 26 April 2023 - 02:00 AM

How it looks like in landscape mode?

 

Generally in landscape orientation I expect it to work better

In landscape it looks similar. Vertical it is worse. See attached

 

Screenshot_20230426-085535_Samsung Internet.jpg

 

If the .ini is not found it would be helpful to have an app warning with the instruction to unpack the database at that location. The current message looks like an app failure and not like an installation problem.


Edited by han.k, 26 April 2023 - 02:00 AM.


#24 daw316

daw316

    Mariner 2

  • -----
  • Posts: 241
  • Joined: 10 May 2012

Posted 26 April 2023 - 06:59 AM

Please keep discussion (or a copy) here.

Thanks!


  • UB_Astro likes this

#25 artik

artik

    Viking 1

  • *****
  • Freeware Developers
  • topic starter
  • Posts: 897
  • Joined: 14 Mar 2021
  • Loc: Israel

Posted 26 April 2023 - 08:04 AM

Please keep discussion (or a copy) here.

Thanks!

Summary: https://github.com/a...eStacker/issues

 

  1. Improve settings - save pixel size/FL, handle presets.
  2. Full frame ASI 1600 can be harsh on handheld device live stacking (in terms of workload) but likely going to be ok for 2x2 binning.
  3. Some ideas on improving plate-solving navigation directions

Bottom line there is a work to do (as always)

 

And I desperately need somebody with real UI/UX web-frontend development experience to help. (I'm math, algorithms, C++, high performance computing and and web-backend guy - less of frontend/ui)




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






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics