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 | |
################################# | |
# Get SOURCETABLE from an NTRIP server to discover mount points. | |
# | |
# Example: | |
# | |
# GET / HTTP/1.0 | |
# Host: ok.smartnetna.com:10000 | |
# User-Agent: MyAppName |
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
fun getPointByDistanceAndBearing(lat: Double, lon: Double, bearing: Double, distanceKm: Double): Pair<Double, Double> { | |
val earthRadius = 6378.1 | |
val bearingR = Math.toRadians(bearing) | |
val latR = Math.toRadians(lat) | |
val lonR = Math.toRadians(lon) | |
val distanceToRadius = distanceKm / earthRadius |
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
/** | |
* EditText that only allows input of IP Addresses, using the Phone | |
* input type, and automatically inserts periods at the earliest appropriate | |
* interval. | |
*/ | |
// Note; this probably isn't the best pattern for this - a Factory of Decorator | |
// pattern would have made more sense, rather than inheritance. However, this | |
// pattern is consistent with how other android Widgets are invoked, so I went | |
// with this to prevent confusion |