Magyar menüt kérek. Show menu in Hungarian

Tag: programming

Some of my projects

(I write in English for convenience)

  • OpenBabel.Erdély, a Romanian-Hungarian Dictionary, useful for Hungarians living in Romania. It incorporates general usage words, institution names and expressions specific to public life, locality names and toponyms in general. I recommend the web gui Details on this page. OBE is also available as integrated into an editor, the obe-wordpad.I consider maintaining this dictionary a duty towards my community.

  • DSO browser - has a database of more than 200k deep sky objects, able to show their realtime apparent position on the sky from the location of the observer, and estimates imageability based on altitude, overall brightness, surface brightness, distance from the Sun and from the Moon etc. uses the obe frontend, so it can be invoked from it using the :dso search argument, like NGC 7000 :dso, but the night mode /dso is the interface I recommend. I use the DSO integrated into csillagtura's wordpress to aid me with writing articles. It also has an object marking utility, which I will expose later.

  • Aladin to Photo Planner - it builds on the Aladin Lite API and visualization and on DSO to help plan astrophotos, including mosaics.

  • Polaris - for polar alignment
    In amateur astronomy a short but very important task is to correctly polar align the telescope's mount. My Polaris "app" is a visual aid to do just that.

  • StarHeal - in astrophotography
    A program to handle dense star fields on astrophotographs, sometimes I call it starheal but doesn't really have a name.

  • the putzolo
    A userscript to tweek facebook's interface.

  • my personal web browser: around a WebView, I built the subset of a web browser I need for a less annoying experience on my phone: it has both java-level and javascript-level adblocking built in, and gets rid, at least on the pages I visit, of the annoying gdpr and other popups.

  • the Soapbox project - guiding my telescope
    I put together a little piece of hardware, based on an Arduino, to give commands to the mount, through the ST4 port it exposes - even if no such port is exposed, like in the case of my old EQ3 mount. The whole device resides in a soapbox, hence the name. It receives commands from the desktop, which runs another piece of the puzzle, an app that tracks stuff on the live view displayed in the recording software. As an extra, the soapbox also drives the motorized focuser, be that through buttons, a joystick or an encoder, of which the last one is my favorite so far. The encoder itself has its own Arduino, can be used as a standalone device, or as an extension to the Soapbox, hooked up in a daisy chain, to receive serial commands from the PC.

  • the filterwheel automation -- related to the soapbox project above, I motorized an otherwise manual filter wheel.

See my github -- though I don't really update it.

Estimating the length of planetary videos

There’s a legend among amateur astronomers that, without derotation, Jupiter supports only 90 seconds of raw video. Anything above it: derotate.

It always felt fishy to me, even before I started doing planetary photography. Due to other reasons, like capturing the moons’ movement, and the interplay of shadows, I always tried to keep the videos short.

However, the subject is evergreen wherever there are newcomers. So, now I made the math, and since we are people, not mathboys, here’s a handy little table one can play with or scroll below, the same calculator loads into this article.



My Filterwheel Automation

Quite some time has passed since I automated my manual filter wheel, so now I write the article. I built this one mainly for fun, I could afford the (overpriced) automated version.

The specifications behind the whole idea

  • automate the manual filterwheel — without modifying the wheel itself, revert the changes should I get bored or if anything goes south
  • make it fail gracefully: the DC motor can be driven by anything outputting around 5V, a manual H-bridge and a couple of AAA batteries for example. Experience: the first version with the encoder failed due to the intense sunlight — hence duct tape and a paper cover of the window were added. Failing gracefully meant disconnecting the logic and connecting the manual H-bridge. No observation wasted.
  • make it compatible with my existing gear (the soapbox and the noszogtató)



My encoder based focuser

So after I built a focuser controlled by a joystick, and considered it a usability failure, I built one based on an encoder, and modified the soapbox accordingly, maintaining backward compatibility. This encoder based hand controller has its own arduino, and connects to the soapbox, and through it to the PC to receive commands from the desktop app — but this connection is optional, it is fully functional as a standalone device. Below is the block diagram, explaining how it optionally fits into the soapbox daisy chain. Most variables are hand tuned for the DC motor + reductor gear box in use, as the source code reveals.



Photoplanner: Close Neighbors

So I’ve been thinking about this: what if I want target proposals for objects that have a nearby neighbor. Like the Double Cluster, or  M81 and M82, or M35 and NGC 2158. So I came up with a generic filter in the photo planner that narrows the search results based on whether a particular result has a neighbor. The search switch is conjunction, and the unit is degrees, defaulting to 1 degree. Some searches (like an unpolite naked :conjunction) may still result in a server error (low memory), so the switch works on already specific queries.


Galaxies that have an obvious nearby friend:

type:galaxy minlum:11 conjunction:1

Open clusters and/or globular clusters that are near each other:

type:ogc :conjunction

Open or globular clusters or planetary nebulae with at least one planetary nebula in the pair. The curious cases of M46 and NGC 2818:

type:pnogc conjunction:0.7 conjunctiontype:pn minsize:0.005

The results are some pretty nice vistas.



The Soapbox MountPusher Guider

the interface on top of an image acquired with the guiding solution

I have the following problem at home: the balcony is small, the tube is big and I am lazy. This sums up to a constant problem of drifting, the planet or lunar surface being imaged slowly walks away. Though there are methods to polar align a mount even when there is no way to see the north pole, the small balcony part means frequent small bumps into the whole thing. The oversized scope is also prone to accidents. I also tried the feature tracker in Sharpcap, failed, and the autoguiding of PHD2, failed. So I came up with the soapbox ensembleI call it noszogtató in Hungarian, for it means something like nagger-pusher-convincer. It got itself a soapbox, literally.

UPDATE 2019-09-30: I extended the hardware and the software.

UPDATE 2020-05-10: I extended the hardware and the software. Lots of additional functions added.


  • rationale
  • block diagram
  • communication
  • desktop app
  • arduino code overview
  • hardware
  • side projects
  • download
  • conclusions, photos



Jupiter, Saturn, 2019-06-08

The setup is the usual, ASI 224MC, TSO ADC, N250/1200, HEQ5 with the home made motorized focuser and the home made arduino noszogtató mount guider. I would like to call this the soapbox project — it is mounted inside a soap box, though in Hungarian and Romanian we use soapbox to denote compact and dumb cameras too.


2019.06.07. Jupiter 2019-06-07-2144 7 pipp g3 ap1 reg1 szep

2019.06.07. Jupiter 2019-06-07-2144 7 pipp g3 ap1 reg1 szep

2019.06.07. Jupiter 2019-06-07-2226 5 pipp g3 ap1 reg1

2019.06.07. Jupiter 2019-06-07-2226 5 pipp g3 ap1 reg1

2019.06.07. Jupiter 2019-06-07-2326 8 pipp g3 ap1 reg1 szep

2019.06.07. Jupiter 2019-06-07-2326 8 pipp g3 ap1 reg1 szep

2019.06.07. szaturnusz 2019-06-07-2352 1 pipp g3 ap6 Drizzle15 p5

2019.06.07. szaturnusz 2019-06-07-2352 1 pipp g3 ap6 Drizzle15 p5



Safe php acos, astronomy

I’m posting because of a very frustrating issue I stumbled upon while developing my photo planner: php’s acos function has an undocumented (yet found by others) behavior. It can return NaN, in a way that breaks a JSON. The PHP manual says (2019-04-02) Return Values: The arc cosine of arg in radians — and nothing about a NaN scenario. Nothing. On forums, it can be found that the function returns NaN when the argument is out of the range [-1, 1]. And as it turns out, due to rounding errors in the float, this can happen. Very, very, very annoying.

I have the following lines of code, obviously for astronomy, calculating the arc distance, in degrees, from radec pairs, in degrees.

function arcdistdeg($ra1, $dec1, $ra2, $dec2){
  $cosA = sin(deg2rad($dec1)) * sin(deg2rad($dec2)) + cos(deg2rad($dec1)) * cos(deg2rad($dec2)) * cos(deg2rad($ra1 - $ra2));
  return rad2deg(acos($cosA));

And this function returned NaN for perfectly valid input values (around NGC 4103). So the obvious solution was to force the range with a safe_acos function, similar to

function safe_acos($n){ return acos(min(max($n,-1.0),1.0)); };

Very, very annoying.


A walk on memory lane – dselena

Working with Renesas chips and the GUIX framework made me take a walk on  memory lane, a program I wrote almost two decades ago.


A little charging station

I like horizontal extensions :)

I like stuff that’s standard, modular, dumb, fault tolerant and degrades gracefully. The mount, the camera, the heating, the guiding — these all have different priorities, different needs and complexities. This is why I chose to use the 12V 7.2Ah standard UPS batteries, many of them, in separate circuits. This setup, obvious from the way the charging is solved, is for occasional one night sessions, not continuous deployment.


One circuit is for the mount. I put one or more batteries in parallel, or more like max(): the batteries are isolated from each other through diodes.


My Canon 1100D (modified) does work from a USB phone charger, but it has its own 12V battery. It works well, non stop all night, from a single battery, without depleting it. A fellow amateur astronomer has already asked me to make him a similar wonder-box :D See details.

The DSLR was the last item that a voltage other than the one provided by the standard 12V batteries. Its own batteries meant special care, special costs, and thankfully that is over, once and for all. (tovább…)


When to, what to – photograph

a year of the Lagoon nebula, observed from a forgotten corner of Transylvania

You may already know my astronomy catalog search engine, the DSO. It includes all the catalogs we amateurs use: the Messier, Caldwell, NGC, IC, Arp, SH2, Collinder, Melotte, Abell planetaries, it even grabs the list of exoplanets from a wiki page to always be up to date. But this is not all. It includes some ugly formulae to know about the position of the Sun and the Moon, and do some math based on  the geolocation of the user. The DSO however is more like a text mode tool, or an API. It is good to just look up what Messier 51 or NGC 7000 is. Anything more complex requires some heavy wizardry even I don’t master and need to look up in the help I fortunately did write.



Jól kalibrált monitoron mindegyik számnál elkülönülő árnyalat látszik. Ha mégsem látszanak, akkor a megjelenített képek színhiányosan rajzolódnak ki. A monitort valószínűleg kalibrálni kell.

You should see distinct shades for each number. If those shades are not clearly visible, the displayed pictures will lack accuracy. Your display most likely needs to be calibrated (brightness, gamma, contrast etc.).