Generating a custom landscape for Stellarium - smart-underworld/seestar_alp GitHub Wiki
I did this on iOS, and OSX using two paid tools - but I presume the details are similar on Windows / Android.
Software used:
Observer Pro is a paid app for iOS for astronomy planning. One of the features it has, is the ability to create horizon measurements, and export them to a .hrz file - which contains values measuring az/el in a text format
Affinity Photo is a paid image editing app that I use for astrophotography...it also happens to have panorama stitching capabilities.
Alternative software
While I don't cover the details here, the following tools may be good to investigate as free alternatives to the above Gyrocam and Gimp with a panorama plugin
Prepping the filesystem
On OSX, Stellarium stores files in ~/Library/Application Support/Stellarium/
The landscapes
folder must be created, along with the two folders we will use for a polygon based landscape, and a panoramic image based landscape:
mkdir -p "~/Library/Application Support/Stellarium/landscapes/polygon"
mkdir -p "~/Library/Application Support/Stellarium/landscapes/panoramic"
Generating a polygon based horizon file
Using Observer Pro, generate a "site" - with a defined horizon. Export this file from iOS, to your computer. We will name this file horizon.hrz
Copy this file to "~/Library/Application Support/Stellarium/landscapes/polygon"
Create a text file in that same directory, named landscape.ini
:
Note that text following ;
are comments
[landscape]
name = your_polygon_name
author = You
description = anything is fine here
type = polygonal
polygonal_horizon_list = horizon.hrz
; in case the measured line was grid-relative only (meridian convergence issue) or had other problems, allow a corrective rotation also here.
; Unfortunately, a horizon with edges at exactly 0 or 180 degrees azimuth causes bad effects. Adding a minimal offset avoids this without causing much trouble.
; Because we can mix photo and polygon in the other classes, use a different name for the polygon rotation:
polygonal_angle_rotatez=0.00001
; Fill color for this landscape. It gets darkened at night
ground_color = .15,.45,.45
; Color for the line. It will not be drawn if this is not defined. This color will not be dimmed at night.
horizon_line_color = .25,.15,.15
; specify a minimum brightness value 0..1 to have the ground always visible.
minimal_brightness = 0.15
[location]
light_pollution = 5
atmospheric_extinction_coefficient = 0.29
atmospheric_temperature = 10
; The next line with value -1 translates to "compute from altitude and standard atmosphere model"
atmospheric_pressure = -1
planet = Earth
latitude = YOUR_LATITUDE
longitude = YOUR_LONGITUDE
altitude = YOUR_ALTITUDE_IN_METERS
Generating an imaged based horizon file
Ideally, you would use a tool that could create an image sphere...but I couldn't find one for iOS that didn't require signing up for another service - so I stitched one myself
- Take a bunch of overlapping photos while spinning in place. Export these to your computer
- In Affinity Photo - create a new panorama from File -> New Panorama...
- Add the photos, and stitch them together
- Crop the photo so the left side matches up with the right side of the panorama - and any image warping artifacts are cropped out
- Scale the image to a width of 4096 pixels - keep the height auto generated
- Expand the canvas from
Document -> Resize Canvas
- make the document 4096x2048, keeping the existing panorama centered in the document - Using the lasso tool - delete everything above your horizon - Eg, above trees, house lines, etc
- Move the actual horizon line to the midpoint of the Y axis @ 1024px
- Make a new layer behind the panorama layer
- Using the rectangular selection tool, select any part of the canvas visible below the bottom of the panorama.
- Using the fill tool - fill this selection in with a solid color of your choice
- Save the file, and export to a file - we'll use
horizon.png
for this - Move/copy the
horizon.png
file to"~/Library/Application Support/Stellarium/landscapes/panoramic"
- Create a landscape ini file:
[landscape]
name = your_panoramic_name
author = you
description = anything is fine here
type = spherical
maptex = horizon.png
angle_rotatez = -41 ;Fine tune this to your site
minimal_brightness = 0.12
[location]
planet = Earth
country = USA
latitude = YOUR_LATITUDE
longitude = YOUR_LONGITUDE
altitude = YOUR_ALTITUDE_IN_METERS
light_pollution = 5
;atmospheric_extinction_coefficient = 0.175
timezone = Americas/New_York
- Using a compass app - note a landmark at one of the cardinal directions. Adjust
angle_rotatez
until this matches reality - By switching between the polygon, and panoramic landscapes - you can validate your actual horizon is approximately correct by comparing your polygon horizon objects with your image. It may be necessary to go back to step 8, and adjust the horizon location.