Top Level Namespace
Defined in:
Constant Summary
-
ACTUAL_SUN_SIZE =
1392700000
-
all sizes are in meters
-
AU_TO_M =
147000000000_i64
-
astronomical units to meters
-
EARTH_RADIUS =
6378137.0
-
GMAP_API_KEY =
ENV["GMAP_API_KEY"]
-
INITIAL_COORDINATES =
{49.273251, -123.103767}
-
LATITUDE_RANGE =
(-90..90)
-
LONGITUDE_RANGE =
(-180..180)
-
PLANETS =
[{"Sun", 0, ACTUAL_SUN_SIZE}, {"Mercury", 0.38, 4878000}, {"Venus", 0.72, 12104000}, {"Earth", 1, 12756000}, {"Mars", 1.5, 6794000}, {"Jupiter", 5.2, 142984000}, {"Saturn", 9.5, 120536000}, {"Uranus", 19.2, 51118000}, {"Neptune", 30.1, 49532000}]
-
tuples of (Name, AstronomicalUnits, CelestialBodyRadius)
-
SUN_SIZE_RANGE =
(0.01..500.0)
Method Summary
- build_placemark(centre_lat_long : LatLng, name : String, orbit_distance : Float64, body_radius : Float64)
- circle_coordinates(orbit_radius, points = 100) : Array(LatLng)
- generate_html(sun_size, initial_coordinates : LatLng, kml_endpoint : String, placemarks : Array(Placemark))
- generate_kml(sun_size : Float64, centre_lat_long : LatLng, placemarks : Array(Placemark)) : String
- kml_circle(placemark : Placemark)
- m_to_human(m : Float64 | Int32)
-
offset(lat_long : LatLng, x_y_in_meters : LatLng) : LatLng
https://gis.stackexchange.com/questions/2951/algorithm-for-offsetting-a-latitude-longitude-by-some-amount-of-meters
- radians(degrees)
Method Detail
def build_placemark(centre_lat_long : LatLng, name : String, orbit_distance : Float64, body_radius : Float64)
#
def generate_html(sun_size, initial_coordinates : LatLng, kml_endpoint : String, placemarks : Array(Placemark))
#
def generate_kml(sun_size : Float64, centre_lat_long : LatLng, placemarks : Array(Placemark)) : String
#
https://gis.stackexchange.com/questions/2951/algorithm-for-offsetting-a-latitude-longitude-by-some-amount-of-meters