This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* An extremely basic example using PHP to update a Linode DNS entry via the | |
Linode v4 API (<https://developers.linode.com/api/v4>). | |
Takes an IP address as a GET parameter. | |
Can be used with pfSense's custom Dynamic DNS service (add a new Dynamic | |
DNS client, choose service type of 'Custom' or 'Custom (v6)' for IPv6, add | |
an update URL of 'https://yourlinode.com/yourscript.php?ip=%IP%', and add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ephem | |
import math | |
''' | |
Takes two PyEphem objects, one for the sun and one for the satellite, and the | |
satellite's standard magnitude value (-1.3 for the International Space Station), | |
and calculates the visual magnitude of the satellite. | |
''' | |
def calculate_visual_magnitude(sun, satellite, standard_magnitude): |