Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Satellite elevation/azimuth wrong #43

Open
Derekcz opened this issue Dec 16, 2018 · 3 comments
Open

Satellite elevation/azimuth wrong #43

Derekcz opened this issue Dec 16, 2018 · 3 comments

Comments

@Derekcz
Copy link

Derekcz commented Dec 16, 2018

Hello, I am trying to write a simple script that outputs the elevation and azimuth of a selected satellite relative to my location. I took the original code from an older issue thread here, as it seemed to be exactly what I was looking for. I modified it so that it (hopefully) downloads the satellite data from the net and constantly updates.
However, the result does not at all line up with what gpredict is displaying.
Granted, the lat/long position is approximated, but the resulting data are far too different.
E.g. while gpredict displayed NOAA 19's elevation as -1.76, the script set it at -31.something

I am new to this, so any help would be greatly appreciated.

from math import degrees
import pyorbital.orbital
import datetime
import time

satellite_name = "NOAA 19"
(lon, lat, ele) = (49, 14, 0)

while True:
	timestamp = time.time()
	satellite = pyorbital.orbital.Orbital(satellite_name)
	time1 = datetime.datetime.utcfromtimestamp(timestamp)
	az1, alt1 = satellite.get_observer_look(time1, lon, lat, ele)
	print("")
	print("Elevation:	", alt1)
	print("Azimuth:	", az1)
	time.sleep(1)
@ivan95603
Copy link

ivan95603 commented Jun 20, 2019

@Derekcz,
Try it like
az1, alt1 = satellite.get_observer_look(utc_time=now, lon=antenna_lon, lat=antenna_lat, alt=antenna_altitude)
with named parameters. It works. Checked with gpredict.

Cheers,

@mraspaud
Copy link
Member

Sorry that this question was never answered before, thanks @ivan95603

@ivan95603
Copy link

@mraspaud
You are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants