Page 1 of 1

Use of PyEphem

Posted: Sat Nov 18, 2017 8:25 pm
by kramkroc
Hi folks,

just wondering about the use of PyEphem in the Astro PI. The reading for the TLE is only valid for a period of time, so I wondered, in the depths of space (i.e. no network access) whether there was some way for an up to date reading to the supplied when a 3 hour program was to be kicked off?

Cheers in advance folks,

/Mark

Re: Use of PyEphem

Posted: Mon Nov 20, 2017 9:20 am
by Davespice
Hi Mark

I'll be explaining this during the webinar (which your teacher will get an email about soon). But basically if you get chosen for space-flight a few minor modifications are made to your code to make it obey the Astro Pi MCP (Master Control Program). As part of those edits, if I see your code is using hard coded two-line element telemetry lines I update it to load the telemetry from a shared location which is kept up to date by our ground station in Switzerland.

So you can expect to be able to computer accurate ISS locations when your code runs.
I hope this helps!

Dave

Re: Use of PyEphem

Posted: Mon Nov 20, 2017 3:37 pm
by kramkroc
Cheers (I am the "teacher", well, coderdojo mentor). That answer really helps us out!

Re: Use of PyEphem

Posted: Tue Nov 21, 2017 9:04 am
by Davespice
Oh sorry! :)

Re: Use of PyEphem

Posted: Wed Dec 06, 2017 1:50 pm
by divad
Hi,
I have this error when I try to install ephem (sudo pip3 install pyephem) :

arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Ilibastro-3.7.6 -I/usr/include/python2.7 -c extensions/_libastro.c -o build/temp.linux-armv7l-2.7/extensions/_libastro.o
extensions/_libastro.c:3:20: fatal error: Python.h: Aucun fichier ou dossier de ce type
#include "Python.h"

compilation terminated.

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1



Somebody can help me?

Thank you,
David.

Re: Use of PyEphem

Posted: Thu Dec 07, 2017 3:20 pm
by Davespice
I normally just use

Code: Select all

sudo pip3 install ephem
So ephem as opposed to pyephem.
You might find that installing these two packages helps

Code: Select all

sudo apt-get install libc6 libc6-dev
Please also check out the Mission Space Lab webinar which explains how to use it;
https://www.youtube.com/watch?v=WYjaAZcWIPg&t=7760

Re: Use of PyEphem

Posted: Tue Dec 19, 2017 2:48 pm
by DarrenPi
Hi

I am getting a similar install error. I have tried a few different solutions including the one suggested by Dave in the above post.

Code: Select all


sudo apt-get install libc6 libc6-dev
I have also tried the suggestions on this page https://raspberrypi.stackexchange.com/q ... or-python3 . As I am new to Raspberry Pi I don't know how to run the command below as root

Code: Select all

python3 setup.py install

Re: Use of PyEphem

Posted: Tue Dec 19, 2017 6:34 pm
by DarrenPi
Update

I have now successfully installed Ephem. I updated and upgraded raspbian, https://www.raspberrypi.org/documentati ... pdating.md