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

Ah, xephem on a Raspberry Pi

  • Please log in to reply
21 replies to this topic

#1 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 12 August 2019 - 12:34 PM

I've used this program since about 1995.  The author's name is Elwood Downey (and I see he's also a ham).  http://www.clearskyi...ute.com/xephem/  It's a serious ephemeris program with a lot of depth and features.  Sorry MS Windows users, it doesn't go there, Linux and Mac only, get a Raspberry Pi (or one of the other cheap ARM machines: a $10 RPI Zero might work).  The program's been around since at least 386 days so it's pretty efficient, not bloatware.

 

screenshot1.png

 

Reference manual: http://www.clearskyi...ute.com/xephem/  I see he's also giving away 2 CDs of star catalogs to magnitude 18.5, he was selling them before.  And "XEphem does not run under native Windows but it works fine using a virtualization toolkit such as Virtualbox and a free linux distro such as OpenSUSE."

 

It's not in the standard packages, I had to build it from sources but I'm used to that so it was fairly easy, took about 5 minutes.  Under Debian/Raspbian make sure you have libmotif-dev installed.  Unpack the tgz file and cd into GUI/xephem inside. You need to know where your motif libraries are installed, "locate libXm" did it for me.  Then I did "make MOTIF=/usr/lib/arm-linux-gnueabihf/" and it worked perfectly, left me with an xephem executable which I ran.  His binaries for Linux are for Intel/AMD, for other forms of Linux like ARM you need to build from source code.

 

The only thing I don't like about the program is that there's no Preferences dialog in a modern sense [fixed?].  You can enter your location (for example) but it doesn't save it, making it permanent takes a bit of work.  I didn't think of it for the screenshot above, but when you point to an object in the sky the coordinates appear, in both ra/dec and alt/az.  And yes, of course, you can zoom in (use the slider on the left), install the star catalogs for more detail.


Edited by alan01346, 12 August 2019 - 12:44 PM.

  • ccs_hello, mikefulb, Oleg Astro and 4 others like this

#2 rkinnett

rkinnett

    Viking 1

  • *****
  • Posts: 769
  • Joined: 08 Aug 2018
  • Loc: La Crescenta, CA

Posted 12 August 2019 - 02:00 PM

Interesting, thanks or sharing.  I'll check it out.  What features do you find most useful?



#3 Der_Pit

Der_Pit

    Vanguard

  • *****
  • Posts: 2,324
  • Joined: 07 Jul 2018
  • Loc: La Palma

Posted 12 August 2019 - 02:01 PM

Oh yes, I've been using that one, too, for a looong time.  I think it also is the roots for INDI, the ASCOM counterpart in Linux-World (and you can still use it to point your mount).  Unfortunately (well, maybe fortunate for him) Elwood is retired and doesn't continue development of it.  

But if you want accurate calculations of ephemerids etc. (ocultations and whatsoever) it (still) is what you should look at.  But it's not really easy to use.

 

While it is still installed on my laptop, I'm mostly using KStars nowadays, for a big part because it integrates the full EKOS package for observation acquisition.


  • Xilman and alan01346 like this

#4 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 12 August 2019 - 09:07 PM

When I went into Synaptic, the GUI Raspbian/Debian package manager and searched for xephem I only found

 

PyEphem provides an ephem Python package for performing high-precision
astronomy computations. The underlying numeric routines are coded in C and
are the same ones that drive the popular XEphem astronomy application, whose
author, Elwood Charles Downey, generously gave permission for their use in
PyEphem.

I have no patience with Python stuff so I looked up the original C at http://www.clearskyinstitute.com  Retired, yeah, me too.

 

One thing I dislike about this forum software package is that you can't look outside your post while you're posting.  The raspberrypi.org forum runs phpBB and I'm pretty sure you can scroll above and/or below what you're writing to reread the posts you're answering.  Here you can only read what you're answering if you quoted it.

 

Hadn't heard of indi, but there seem to be multiple libraries of astronomy routines.  There's also astronomy-library (or indigo) at https://github.com/i...stronomy/indigo which calls itself a next generation indi.  I used a library a few years ago for making sidereal time calculations, I forget why now.


Edited by alan01346, 12 August 2019 - 09:23 PM.

  • Xilman likes this

#5 lphilpot

lphilpot

    Surveyor 1

  • *****
  • Posts: 1,993
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 13 August 2019 - 06:00 PM

Maybe the preferences issue is local to the RPi (or write permissions, etc.)? When I ran Xephem on my Linux desktop it saved my preferences just fine. I wasn't able to get it to build on Xubuntu 16.04 and never really pursued it. I'm now on 18.04. I know it will, since Oleg has it as part of his Astronomy Linux distro, I just never tracked down the build issues.



#6 DuncanM

DuncanM

    Soyuz

  • *****
  • Posts: 3,563
  • Joined: 03 Nov 2009
  • Loc: Arizona Sky Village or the rain forest

Posted 14 August 2019 - 01:43 AM

I was part of a team that ported Xephem to OS/2 (using the Xfree86 X-windows system) back in the late 1990s for use in the RASC VC CARO supernova search project. 



#7 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 14 August 2019 - 03:59 AM

Maybe the preferences issue is local to the RPi (or write permissions, etc.)? When I ran Xephem on my Linux desktop it saved my preferences just fine. I wasn't able to get it to build on Xubuntu 16.04 and never really pursued it. I'm now on 18.04. I know it will, since Oleg has it as part of his Astronomy Linux distro, I just never tracked down the build issues.

No, it's changed so there's a real preferences section.  It's been probably 10 years since I've looked at it but everything used to be in X Resources.  There was no location editor dialog either.  It used to be quite a challenge to add a new location, it didn't always parse the way you wanted.


Edited by alan01346, 14 August 2019 - 06:43 AM.


#8 lphilpot

lphilpot

    Surveyor 1

  • *****
  • Posts: 1,993
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 15 August 2019 - 09:12 PM

Good old X resources... I remember spending so much time with editres trying to figure out and get all the hierarchies right. In particular I was using an editor called NEdit that used (or at least, benefitted from) some additional X resources. And on top of that, it was on Solaris.... took quite a while to even get close to making that old Motif look decent!  :)



#9 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 16 August 2019 - 07:57 PM

Well, it works on a Pi under Raspbian Stretch, on my Odroid under aarch64 Debian Stretch they seem to have left out the xprint (libxp-dev and libxp6) libraries.  Athena I got with libxaw7-dev.

 

/usr/bin/ld: error: cannot find -lXp

I hate it when these young whippersnappers leave out old stuff because they don't use it.  I'll get it somehow but it's going to be bumpy.  It was in Jessie but left out of Stretch.  I could use a Jessie deb but it needs to be an aarch64 (aka arm64) one.  Or I'll build it from source.

 

You do need libmotif-dev on a Pi to build xephem, and libxp6 and libxp-dev but I had those already.

 

I like Motif.  Athena in principle is OK but I can't stand the scroll bars which don't actually scroll.  I've even written some xlib stuff, good experience.

 

What I remember most about fudging xephem 20 years ago was adding a location because none of the standard ones were within 50 miles or so.  And it took a bunch of tries to get the syntax just right so it would work.


Edited by alan01346, 16 August 2019 - 08:04 PM.


#10 lphilpot

lphilpot

    Surveyor 1

  • *****
  • Posts: 1,993
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 16 August 2019 - 08:09 PM

I like Motif.  Athena in principle is OK but I can't stand the scroll bars which don't actually scroll.  I've even written some xlib stuff, good experience.

Motif can be cleaned up to look and work pretty decently (Elwood was part of the Motif development effort, IIRC). I've come across a few Athena-based apps (xFig, maybe?) but I always ended up clicking the wrong mouse button. At least it wasn't Open Windows... Then again, at least Open Windows wasn't the "Java Desktop" (ick). I'm pretty happy with Xubuntu right now, once I tweak it a bit. Hope they don't break it (like what's happened to KDE).



#11 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 16 August 2019 - 08:25 PM

I don't remember a problem with xfig, still have it installed upstairs I think.  Yeah, you were supposed to left-click to scroll down and right-click to scroll up or something like that.  But if you didn't remember there was some mess.

 

KDE is broken?  I always preferred it to Gnome but I haven't used it in a while.  I use LXDE mostly.


Edited by alan01346, 16 August 2019 - 08:26 PM.


#12 lphilpot

lphilpot

    Surveyor 1

  • *****
  • Posts: 1,993
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 16 August 2019 - 08:41 PM

There was nothing broken about xFig, I just never used enough Athena-based stuff to get all the 'moves' ingrained in my brain. smile.gif

 

KDE? I was being a bit personal - It's effectively broken for me compared to what I used to like about it -- which is admittedly highly-personal preferences. I, too, much preferred it to GNOME back in the KDE 2/3 days. I was able to twist KDE 4 into something tolerable, but with 5 to me it now looks and feels like a cross between a Mac and Windows 8. Of course, that may be the point. confused1.gif  I can totally understand refactoring, cleaning up code internals, etc., but it's just a shame it's not as friendly as it once was (last time I looked, which was a while back). I suppose with a bunch of tweaks, custom theme, etc., it might be possible to get the older look and functionality back, but now that I've become accustomed to Xfce, I see no reason to go to the effort. And certainly not to GNOME3, so I'll stick with Xubuntu. I have my "collection" of favorite software (whether built on GTK, Qt or something else) so I just install all that and I'm good to go.

 

At work, I bounce between Windows, Solaris (occasionally) and RHEL -- and seemingly stay in a browser more than anything else -- so I'm doing good to remember anything! lol.gif



#13 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 16 August 2019 - 11:51 PM

Whatever Windows I ran into I always made a point of setting it to legacy mode or whatever they called it.  The differences between those are less significant.  But I haven't seen anything past Windows 7, I've never seen OSX or Solaris.  LXDE looks like legacy Windows, most people can deal with that.  I've used FVWM a bunch.  Once I get a copy of the Joe editor and mc on a machine I can start to move in.  Nano is OK at first but I refuse to learn vim, never ran into emacs that much.  Joe works like the Borland programming editors, Wordstar compatible.

 

I've used xfig a little but lately I like Dia or maybe Libre Office Draw.  Still looking for a decent flow charting program, so using it is more intuitive and less of a distraction from the program I'm trying to flowchart.  Gschem actually comes close, you have objects and connection points, you can drag something and the connections just rubberband and stay connected.  When you need more space you move something over, you don't have to redo all the connections.  But it doesn't really do flowcharts, it's for drawing schematics.  Could be adapted I think.

 

Yes, I'm apt to have 20 or so browser tabs, and 6-8 desktops.  Open source stuff has gotten a lot better, I'd hate to have to submit a purchase order for whatever I feel like trying or pay out of my pocket, I just do it, click, click, done.  I'm on an Odroid N2 using a Firefox nightly that I built on it.



#14 lphilpot

lphilpot

    Surveyor 1

  • *****
  • Posts: 1,993
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 17 August 2019 - 10:21 AM

I used FVWM95 for a while on what, Red Hat 5 (?, not RHEL) but I was no master of The Config File. :) I did a few things, nothing fancy. Nice and fast. Vim/vi? I use it but am no master. Those who know it well can make it walk and talk, though. Usually I'll fire up Geany instead but being able to get around in vi for quick stuff is handy, since it's always there on every system. I never warmed to emacs.



#15 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 17 August 2019 - 06:53 PM

Xephem, for posterity, is available at http://www.clearskyi...te.com/xephem/  But it's hardcoded to use an old xprint library that's been declared obsolete and dropped from Debian as of Jessie.  I'm on the Debian Arm mailing list so I posted a question about it:

Vagrant Cascadian <vagrant@debian.org> Sat, Aug 17, 2019 at 1:42 PM

To: debian-arm@lists.debian.org

On 2019-08-17, Alan Corey wrote:

> They seem to be missing from Stretch but they're in Buster.  Maybe, by

> pkgs.org, and they only have the i386 and amd64 versions.  They don't

> show up using this sources.list
The last release that contained libxp was jessie (oldoldstable):
  https://tracker.debian.org/pkg/libxp


It was removed from Debian testing and unstable about four years ago,

the process starting back in 2012:
  https://bugs.debian.org/657253


> I'm on an aarch64 machine (Odroid N2).  Raspbian has them.
Maybe raspbian never cleaned them up, and they're just leftovers from

raspbian jessie.


live well,

  vagrant

So I'm stuck tracking down xprint source  They can take their Python junk and stick it where to sun doesn't shine but Xephem is sacred.

 

FVWM95 seemed to be short-lived, it was just FVWM configured to look like Windows95.  FVWM is still the default window manager I think in OpenBSD.  I like it because it's lightweight, and if you can still get to a tiny patch of the root window you can click and bring up its full tree of features.  If you install the libraries Gnome and KDE stuff works from any window manager.

 

https://packages.deb...ce/jessie/libxp until it gets deleted too has a link to the source, and a bit of description.


Edited by alan01346, 17 August 2019 - 07:01 PM.


#16 lphilpot

lphilpot

    Surveyor 1

  • *****
  • Posts: 1,993
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 17 August 2019 - 07:31 PM

Oleg Astro includes Xephem in his Astronomy Linux distro. At least, it was there about a year ago when I took a look. Here's one of his recent posts on this forum:

 

https://www.cloudyni...nux”/?p=9516792

 

He might have info that's of assistance in getting Xephem built...? Worth checking, maybe.



#17 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 17 August 2019 - 07:51 PM

Oh, I'll get it, it's just being a pain.  One of the reasons I switched from OpenBSD to Debian is because OpenBSD gave me  lots of practice with issues like this.  Linux mostly works a lot better, except when people start deciding things are obsolete.

 

The xephem build stops at

stro -lip -llilxml -ljpegd -lpng -lz -lm

/usr/bin/ld: error: cannot find -lXp

Xp is the xprint library, which I built

ls /usr/local/lib/libXp*
shows
/usr/local/lib/libXp.a  /usr/local/lib/libXp.so.6

/usr/local/lib/libXp.la  /usr/local/lib/libXp.so.6.2.0

/usr/local/lib/libXp.so
so it's there, it just isn't seeing it for whatever reason

Time to find some food and see if the moon's up yet.

 



#18 alan01346

alan01346

    Sputnik

  • -----
  • topic starter
  • Posts: 43
  • Joined: 07 Aug 2019

Posted 17 August 2019 - 09:39 PM

make MOTIF=/usr/lib/aarch64-linux-gnu/ LIBRARY_PATH=/usr/local/lib

 

Was the answer, it wasn't looking in /usr/local/lib even though I thought it was.  This helped: https://stackoverflo...ameofthelibrary

 

xephem_first.png

 

So: install libmotif-dev, libxmu-dev and x11proto-print-dev from the debs.  Then get xprint: http://deb.debian.or...0.2.orig.tar.gz and install, then xephem.  Tell the xephem build both where your Motif and your xprint are.


Edited by alan01346, 17 August 2019 - 10:46 PM.


#19 tkirkman

tkirkman

    Lift Off

  • -----
  • Posts: 1
  • Joined: 22 Jun 2021

Posted 22 June 2021 - 01:00 PM

I just installed xephem on rpi4 without problems.

 go to clearskyinstitute.com/ and download the source (which at this time is 4.0.1)

gunzip, tar -xvf

apt-get install  libmotif-dev libxmu-dev

 

in the Makefile in xephem-4.0.1/GUI/xephem remove the -lXp as in

XLIBS = -lXm -lXt -lXext -lXmu -lX11

 

do nothing else and make

 

I have not much tested the result but it *seems* to work



#20 DuncanM

DuncanM

    Soyuz

  • *****
  • Posts: 3,563
  • Joined: 03 Nov 2009
  • Loc: Arizona Sky Village or the rain forest

Posted 22 June 2021 - 04:52 PM

I used to run Xephem natively on OS/2 via Xwindows, back in the mid 1990s.



#21 Gert

Gert

    Viking 1

  • *****
  • Posts: 503
  • Joined: 15 Apr 2008

Posted 22 June 2021 - 04:58 PM

Hello All,

 

The underlying ephemerides codes of XEphem are ported into a python package. 'pyephem'.

 

https://rhodesmill.org/pyephem/

 

You'll find all the computations in there for your own little scripts.

I.e. I wrote a little script that produces starparty dates tables (Saturdays with Moon phases out of the way) for our club. Very handy.

 

Cheers,

Gert


  • Der_Pit likes this

#22 gmiller123456

gmiller123456

    Vostok 1

  • -----
  • Posts: 159
  • Joined: 25 Dec 2020

Posted 23 June 2021 - 12:59 AM

Sorry MS Windows users, it doesn't go there, Linux and Mac only

 

You can compile and run it under Cygwin.  Cygwin is a Windows port of a lot of Linux packages, essentially a Linux subsystem for Windows.  When I first tried to compile it, I was surprised at how cleanly it compiled.  No errors, no warnings, worked on the first try.  I e-mailed the author a "Thank You!" and mentioned compiling it on Cygwin, and he said compiling under Cygwin was part of his standard tests before releasing.




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