Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Changed JPG to PNG, invert nighttime Meteor M2 images and fixed timezone issues #49

Merged
merged 6 commits into from
Oct 16, 2020
Merged

Conversation

MihajloPi
Copy link
Contributor

I've changed all receive scripts and rectify.py to work exclusively with PNG instead of JPG format in order to preserve the resolution. Nighttime Meteor M2 passes are inverted in colour so that clouds remain white, and not black. Fixed issue with timezones I have had (when I input +2, program calculates sun elevation for -2 timezone).

mihajlo2003petkovic added 6 commits October 14, 2020 22:41
I've added piece of code to invert Meteor M2 images from nighttime pases (APID68 from IR sensor) so that clouds appear white and not black, text overlay (satellite name, timestamp and elevation) on Meteor M2 images like NOAA have, and deleting all intermediate images.
I've added elevation on text overlay, changed all images from JPG to PNG in order to preserve whole resolution and added code to remove map image for overlay.
I've experienced issue when I put in +2 timezone, the script calculates sun elevation for -2 timezone so i changed plus to minus in time.localtime function. Also added support for Daylight saving time.
I've changed the last line which saves the image from JPG format to PNG in order to be compatible with receive_meteor.sh script. I've also changed satellite height to 830 km since according to https://www.n2yo.com/satellite/?s=40069 perigee is 826.8 km, and apogee is 833.6 km as of 14 October 2020.
@ghost
Copy link

ghost commented Oct 15, 2020

@mihajlo2003petkovic

Thanks for collaborating - I've a tremendous doubt, can't understand if in sun.py file I've to put "+2" (I'm from Italy) or just "2" in the tz line...

When I've opened the file yesterday I've found the wrong value of "-2", strangely... lately, the station seems to work and receive well, probably for this value too? Can't understand why it has changed without motivation.

@MihajloPi
Copy link
Contributor Author

MihajloPi commented Oct 15, 2020

Argentina is I think -2 timezone or something comparing to UTC. When I first downloaded v1.2, the script was also calculating sun elevation for -2 timezone so I just had to change it to +1 for CET (I'm from Serbia) and add time.localtime().tm_isdst to timezone value in order to automatically correct local time for DST. For some reason, even though I've input timezone during installation, it remained missing in sun.py script.

@reynico
Copy link
Owner

reynico commented Oct 16, 2020

Hi @mihajlo2003petkovic ! Thanks for the time you invested here.

Ain't -rotate 180 missing here?
af1772f#diff-8942e4d50aae6d815baaf2e8805d9a9c1daad883f358c85f6c34443ec6ae1a8bR58

@MihajloPi
Copy link
Contributor Author

Hi @mihajlo2003petkovic ! Thanks for the time you invested here.

Ain't -rotate 180 missing here?
af1772f#diff-8942e4d50aae6d815baaf2e8805d9a9c1daad883f358c85f6c34443ec6ae1a8bR58

Yes, I removed rotate by 180° because I was always getting correctly oriented images so, I never needed to rotate them even at night passes.

@MihajloPi
Copy link
Contributor Author

I forgot to mention that I was comparing sun elevation calculated by sun.py with webpage: https://www.timeanddate.com/sun/ . That's how I found that it was not being calculated correctly. Yoi just type in your city and it shows sun elevation in degrees.

@reynico reynico merged commit 0abd2a9 into reynico:master Oct 16, 2020
@ghost
Copy link

ghost commented Oct 16, 2020

@mihajlo2003petkovic
@reynico

Sorry folks... I'm lost. Didn't understood if now, after update, I have to put -2 / +2 or 2 here for Italy :(

OR +1 / 1 CEST?

My receptions seem not to work well anymore...

Screenshot_20201016_210710_com.android.chrome.jpg

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

Successfully merging this pull request may close these issues.

2 participants