Git Product home page Git Product logo

sajmons / collimationcircles Goto Github PK

View Code? Open in Web Editor NEW
35.0 2.0 2.0 9.19 MB

Collimation Circles is application for precise telescope collimation

Home Page: https://saimons-astronomy.webador.com/software/collimation-circles

License: GNU Lesser General Public License v3.0

C# 92.59% PowerShell 7.41%
astronomy astrophotography bahtinov-mask camera-preview collimation collimator focuser telescope sharp-focus

collimationcircles's Introduction

Collimation Circles

This program was inspired by Mire De Collimation program written by Gilbert Grillot and Al's Collimation Aid. I combined best features of both and addes some of my own. Purpose of this program is not to reinvent the wheel, but rather to learn new technologies, become better at colimating my telescope and to learn something new.

Main purpose of this program is to help you with aligning optical elements of your telescope such as secondary mirror, primary mirror, focuser, etc.

Collimation Circles is developed with .NET 7 and AvaloniaUI Framework using MVVM architecture patern. Program was tested on Windows 10 and 11, Ununtu Linux 22.04.1 LTS (Wayland), Raspberry PI OS Bullseye and Bookworm. I'm not able to test it on macOS (only in virtual machine), but it should work.

Feel free to report any issues. Suggestions and contributions are welcome!

Home page

https://saimons-astronomy.webador.com/software/collimation-circles

Features

  • support multiple helper shapes (circle, spider, screw, clip, bahtimov mask)
  • user interface for managing list of shapes
  • scaling up or down of whole setup
  • rotation of whole setup
  • transparent background
  • fully customizable shapes: radius, thickness, color, spacing, rotation, label, inclination
  • support for profile saving and loading (JSON files)
  • precise position control with keyboard
  • multiple platform support (Windows, Linux, macOS)
  • multilanguage (English, Slovenian, German)
  • always on top option
  • up to date online help available
  • 3.x and newer camera video stream support to display video from your telescope in background

Dependancies

Colimation circles depends on some external software for handling video streams.

  • VLC for playing video streams.
sudo apt-get install -y libvlc-dev
  • v4l-utils for detecting UVC cameras and their capabilities.
sudo apt-get install -y v4l-utils

Prebuild binaries

Here are prebuild binary files avaliable for you to download (win-x64, linux-x64, linux-arm64 and macos-x64). https://github.com/sajmons/CollimationCircles/releases/

Download latest release as ZIP file, extract it and run executable.

How to use

Read my articles here:

Known issues

Window transparency issues on Raspberry PI OS Bullseye

Unfortunately on some Linux distros main window is not transparent :(. I have succesfully tested it on Ubuntu that's using Wayland window manager. On Raspberry Pi OS Bullseye window transparency doesn't work out of the box. But luckily there is workaround for that.

Open terminal and type this:

raspi-config

go to advanced settings and enable Compositor. Then run this command:

xcompmgr

and then run the CollimationCircles program again. Main Window should now be transparent!

Latest version of Raspberry PI OS Bookworm uses newer Wayland window manager and transparency works as it should.

Running from GitHub source code (works on all platforms)

After installing .NET Framework you type following terminal commands:

sudo apt-get install git
git clone https://github.com/sajmons/CollimationCircles.git
cd CollimationCircles/CollimationCircles
dotnet run

Building and publishing

Prerequisites for building

To use this application, you must first install .NET Framework on your computer.

.NET Framework Instalation

Windows 10 and above

https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net70

winget install Microsoft.DotNet.SDK.7

Ubuntu 22.04 and above

https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2204

sudo apt-get update && sudo apt-get install -y dotnet-sdk-7.0

Raspbian OS Bullseye x64

https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian

wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update && sudo apt-get install -y dotnet-sdk-7.0

Raspbian OS Bullseye ARM

https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian

wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
sudo chmod +x ./dotnet-install.sh
sudo ./dotnet-install.sh --channel 7.0 --install-dir /opt/dotnet/
echo 'export DOTNET_ROOT=/opt/dotnet/' >> ~/.bashrc
echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.bashrc
sudo reboot
dotnet --info

macOS

https://learn.microsoft.com/en-us/dotnet/core/install/macos

Build and publish on Windows

On windows I'm using these commands to make prebuild binaries.

dotnet restore .\CollimationCircles.sln -r win-x64
dotnet publish -c Release -f net7.0 -r win-x64 -o D:\Projects\Publish\CC\win-64 --self-contained true /p:PublishSingleFile=true /p:PublishReadyToRun=true

For more on building see https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish.

collimationcircles's People

Contributors

alex-kozachenko avatar sajmons avatar simonsander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gmke osvaldlaszlo

collimationcircles's Issues

packaging for OS

Hi @sajmons

I had a go with the app and I can compile on Linux and it works (still to try on arm but I do not expect any issue)

What I would like to achieve tho is a ready to be installed app for ArchLInux (x64 and aarch64) and here I would need some guidance because I am a .NET dumb (never done in my life).

I would need a step by step guide to reach a point where a given folder containing the needed bits can be unpacked on the disk to the right place in order to work.

Specifically:

  • I see there are two libraries that are shipped with the zip packages, are you bundling them by yourself when packaging? Could you add them (in all fashions) to the repo so it will be easier to bundle them?
  • I see an appstate..json is also bundled within the zip archive, where that file should live given, that the executable will be under /usr/bin?
  • the archive contains also a CollimationCircles.pdb, same question as above ^

Thanks!

Mattia

window movement (and transparency)

More of a general feedback.
Just downloaded the latest binary release (1.0.3) and installed the dotnet-runtime on my system (openSUSE Tumbleweed; MS only has a repo for Leap, but it works fine).

I use KDE as DE, running on top of X11. There, transparency only works if compositing is enabled (can be toggled with Alt-Shift-F12)

What does not work for me is the positioning of the window with cursor keys. Instead of moving one pixel in the direction intended, it only jumps a full height of the window top bar down (regardless which direction key I pressed). It is probably is coming from KDE/plasma itself, I've seen that with other applications like the XV image viewer.

Apart from that it seems like a really flexible and easy tool with a clean interface. Great work.
Can't test it for real collimation, as I'm away from my telescopes until April...

[LINUX] strip breaks the binary

Hi @sajmons

I found a weird issue which I am not sure where it originates from since I am a .NET sheep.

So, everything works correctly if I run the commands you gave me and the app starts, but when packaging for Arch the package got broken.

The error:

❯ /usr/bin/CollimationCircles
Failure processing application bundle; possible file corruption.
Arithmetic overflow while reading bundle.
A fatal error occurred while processing application bundle

After some investigations I found out that stripping symbols completely breaks the executable.

strip is generally used to remove unneeded symbols from libs/bins and it helps making also the program smaller (122MB not stripped VS 21MB stripped)

do you know if there is a way to strip safely an executable generated with the .NET sdk?

in the meanwhile I will skip stripping for the ArchLinux package

to replicate:

  • compile the program
  • run strip CollimationCircles
  • run CollimationCircles an error will appear

version 2.1.0 lost transparency on KDE

hi @sajmons I compiled the 2.1.0 but I noticed that it lost its transparency when running the app.

I have the compositor enabled and it indeed stays on the top of other windows always, but the BG is black.

I thought it was the new flags for removing the debug symbols, but I compiled 2 versions (with and without) and the effect is the same

App doesn't run on ArchLinux

hi @sajmons

I know the readme says it works with .NET7, I got .NET8 and I looked here and I gave it a try

I am able to compile it but when I run it it fails with the following:

Unhandled exception. System.Exception: Application requirements are not met. Try to set 'minLevel' to 'Trace' for 'logconsole' in NLog.config, for more information.
   at CollimationCircles.Program.Main(String[] args)
[1]    58494 IOT instruction (core dumped)  CollimationCircles

important notes:

my scripts were used to copy libHarfBuzzSharp.so and libSkiaSharp.so but I see those are not dynamically linked anymore and I am not copying them over under /usr/lib

❯ ldd build/CollimationCircles
	linux-vdso.so.1 (0x00007ffce357d000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x000072c7bcf84000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x000072c7bcf7f000)
	libz.so.1 => /usr/lib/libz.so.1 (0x000072c7bcf65000)
	libm.so.6 => /usr/lib/libm.so.6 (0x000072c7bce79000)
	librt.so.1 => /usr/lib/librt.so.1 (0x000072c7bce74000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000072c7bce4d000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x000072c7bca00000)
	libc.so.6 => /usr/lib/libc.so.6 (0x000072c7bc81e000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000072c7bdaa0000)

the command I use to compile is still dotnet publish -c Release -f net8.0 -r $_flag -o build --self-contained true /p:PublishSingleFile=true /p:PublishReadyToRun=true

do you have any idea what I did wrong?

Stay on top setting not woring

I did try the "Window always stays on top" setting but without success on my setup. I'm running KStars on Raspbian OS (Debian) on a Raspberry Pi 4 on the scope. I guess there are lots of potential conflicts in the fight for "who's on top" in the stack in this case - Qt framework, .NET Core/Mono, compositor, etc.

No camera under Ubuntu 22.04

Hi!
First, many thanks for the excellent app, and that you made it also for Linux users available!
I am using Ubuntu 22.04 with multiple cameras: Lenovo Notebook builtin, old Logitech Quickcam Pro for notebook using UVC and Sony A6500 over gphoto2.
I downloaded the current binary version (3.2.0.0. beta3) of the software and started it. Now the software starts without problems, but the list of available cameras is empty. I tried to use the remote field, and I defined there /dev/video0 .. video4, but it didn't react.
Is it a bug, or am I doing something false? Other applications like zoom, vlc, guvcview can use the camera stream.
However, it is not a show stopper in my case, as I can open the camera stream in an other app and I just overlay the transparent CollimationCircles window on them, but it would be more elegant/simple to use the camera stream directly from the app.

Thanks!
Zoltan

Correction of camera chip offset?

Hi,
thanks for the next version of the collimator! I have published the new version in a German astro-forum.
There is a user question about the comparison to the OCAL commercial collimator product.
The OCAL gives the possibility to adjust a cameras offset if the chip is not installed in the center of its housing.

Does CollimationCircles have or will have such a feature? Don´t ask me how it is done, it`s just a question... ;-)

Cheers
Hartmut

Collimation Circle V3 Crash

Sorry to bother you, I don't know if the problem is on my side or if it comes from the CC version 3?
Here is what happens, I launch CC, on the previous version I had created a Setup file in .json.
When I load it everything goes well, if I make a change in my setup and want to save the setup in a .json CC file crash!
I attached a video as well as my file.
Maybe it's my machine that doesn't answer very well?
Thanks for your help.
Sincerely,
Best Regards.
Vincent.
VV_Setup.json

CC-Crash.mp4

Error selecting JSON files

Slight error when opening json files, you have to select . and select your scope from your created files.

cannot run

hi! i have tried installing dotnet however i don't know if i did it right. here's my latest error:

~/CollimationCircles/CollimationCircles$ dotnet run
/usr/lib/dotnet/sdk/6.0.111/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [/home/agwising/CollimationCircles/CollimationCircles/CollimationCircles.csproj]

The build failed. Fix the build errors and run again.

then i tried to build it then i got this error:

~/CollimationCircles/CollimationCircles$ dotnet publish --runtime linux-arm64 /p:PublishSingleFile=true --output ~/Home/CollimationCircles
Microsoft (R) Build Engine version 17.0.1+b177f8fa7 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
/usr/lib/dotnet/sdk/6.0.111/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [/home/a******/CollimationCircles/CollimationCircles/CollimationCircles.csproj]

please help thank you!

Can’t work on MacOS

Hi, I’m trying to run on a fresh virtual machine with MacOS 14.4 on Apple Silicon (arm) processor.
I have “Unhandled exception. System. NullReferenceException: Object reference not set to an instance of an object.” errors.
Screenshot 2023-06-16 alle 16 07 22

There is a little typo in readme file:
cd ColiminationCircles/ColiminationCircles
should be
cd ColliminationCircles/ColliminationCircles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.