#!/usr/bin/python3 """ celestia-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 . """ # Usage: # celestia-galmon-observers # Example: # ./celestia-galmon-observers > \ # /usr/share/celestia/extras-standard/galmon/galmon-observers.ssc 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()