48 lines
1.4 KiB
Python
Executable File
48 lines
1.4 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
galmon-observers
|
|
Retrieve Galmon observers, output SSC format for Celestia.
|
|
|
|
Copyright (C) 2022, Jeff Moe, jebba.
|
|
Author: Jeff Moe
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
"""
|
|
|
|
# Usage:
|
|
# galmon-observers
|
|
# Example:
|
|
# ./galmon-observers
|
|
|
|
import pandas as pd
|
|
|
|
#observers_url='https://galmon.eu/observers.json'
|
|
observers_url='data/observers.json'
|
|
|
|
observers = pd.read_json(observers_url, orient='records')
|
|
|
|
for x in range(len(observers.id)):
|
|
print('Location "Observer ', observers["id"][x],
|
|
', ', observers["owner"][x], '" ',
|
|
'"Sol/Earth"', sep="")
|
|
print('{')
|
|
print(' LongLat [', observers["longitude"][x],
|
|
observers["latitude"][x], "%.3f" %(observers["h"][x] / 1000),
|
|
']')
|
|
print(' Importance 1000.00')
|
|
print(' Type "Observatory"')
|
|
print(' }')
|
|
print()
|
|
|