Sun Gear
Moderators: winston, another_commander
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Sun Gear
Sun Gear
Current OXZ - Version 4.5.2
Uploaded 02 Decembary 2022
This project was initially inspired by Distant Suns (author Wildblood). The main reason to develop alternative project was rebalancing sun population and using potential of more complex color space instead simple named colors for more accurate simulation of sun spectra.
Another different project is Distant Stars (author Rustem). It was presented later and has no such influence on my work with one exception (it will be discussed later).
Let’s omit long story of iterations such as “hot yellow suns for agricultural systems, red and orange dwarves for industrial ones” and outline present state of project.
Sun population and spectra
If you’ll inspect star population in Sun proximity (quite common region of Galaxy in terms of star population) and apply statistical data to Ooniverse, typical distribution of suns on regional map will be appoximately:
5...10 hot white stars (spectral class A) – like Sirius
10...15 yellow stars (spectral class G) – like our Sun or Alpha Centauri A or bit cooler like Tau Ceti
25 orange dwarves (spectral class K) – like Epsilon Eridani or 61 Cygni
200 red dwarves (spectral class M) – like Proxima Centauri
And the rest of total 256 systems – 15...25 of brown dwarves (“failed” stars with mass too low to maintain ignition of thermonuclear synthesis in core).
This is reality. Most of Galaxy star population belongs to low mass, relatively cold, dim red dwarves with extremely long life span.
Well, now take statistical data for distribution of stars with confirmed exoplanets. This is rapidly expanding database and data for March 2015 are outdated, but tendency as whole remains actual. For Oolite 256 system map approximately:
A + B – 4 systems
F – 36 systems
G – 128 systems
K – 72 systems
M – 16 systems
Observation bias, of course. Searching exoplanets is shifted to suns like our Sun because Sun twins seems most suitable suns for habitable planets. But is seems for the same reasons that distribution of colonized worlds will be shifted to suns like our Sun too.
Distribution of suns in Distant Suns reflects predominance of red dwarves in Galaxy:
B – 4 systems
A – 12 systems
F – 16 systems
G – 32 systems
K – 64 systems
M – 128 systems
Six spectral classes and seven named colors: blue, cyan, white, yellow, orange, red, magenta (red and magenta are both used for M class red dwarves).
Distant Stars uses more complex RGB color space and has potential to simulate wide range of spectral subclasses, but there are only six spectral subclasses in database:
A2 – 7 systems
A7 – 21 system
F2 – 40 systems
G2 – 118 systems
K2 – 30 systems
K8 – 40 systems
Red dwarves are completely excluded from Rustem’s Ooniverse and remaining suns reflects above mentioned distribution of stars with exoplanets.
Sun Gear covers only five spectral classes, not six as in Distant Suns, but every spectral class is subdivided onto spectral subclasses with unique color signature. Spectral class G (yellow stars) for example is subdivided onto subclasses from G0 to G9. Moreover, every subclass is subdivided onto two steps with unique color too. Spectral subclass G2 for example is subdivided onto two steps – G2 and G2.5. This nomenclature is sometimes used in astronomy for more precise classification (star of spectral class G2.5 is a bit cooler than G2 but a bit hotter than G3). In total 28 spectral subclasses and 56 unique spectral signatures from F6 to M3. All suns in Sun Gear belongs to main sequence (luminosity class V), so you can see sun designations as G2V or K7V.
Distribution of suns in Sun Gear is shifted to yellow suns of spectral class G – not for reasons based on real astronomy data, but for considerations of visual pleasure. Wildblood’s Ooniverse with predominance of red suns seems a bit too biased to red. Nice for space battles, but I prefer more frequent yellow and white for illumination of planet textures. Color distribution of sun population for Sun Gear 4.3 for all eight sectors (total 2048 systems):
F6V...F9V (white stars) – 214
G0V...G9V (yellow stars) – 1102
K0V...K9V (orange dwarves) – 433
M0V...M3V (red dwarves) – 299
Hot B and A stars with bluish-white tint are completely excluded from my Ooniverse. It seems that life span of F5V star or hotter is too limited for planets with multicellular life and advanced biomes. Red dwarves cooler than M5V is another case: these suns has extremely long life span, but extremely violent solar flares too.
Since Sun Gear 4.0 I'm using RGB color space for sun colors instead HSB. In theory RGB colors based on real astrometric data can be simulated, but there are technical limitations in game, preventing such accurate simulation. Color of sun in Oolite is blended with 50% white, so you have no possibility to get saturated color. Moreover, real color space in Oolite is too restricted to simulate colors of real stars. M0V red dwarf, for example, has RGB color #ffcd90 or 255, 205, 144 in decimal notation, but you have no possibility to get value below 170 in any channel. Overriding this limitation needs some skill in redefining blending rules. So sun colors in Sun Gear enhanced to provide more visual diversity to game world.
Sun properties
Sun mass and chemical composition are initial parameters in theory of star evolution. Having sun mass and chemical composition you’ll predict sun radius and temperature. Having sun radius and temperature you’ll calculate sun luminosity. Having sun luminosity you’ll calculate inner and outer radius of sun habitable zone. And having radius of main planet orbit in centre of habitable zone you’ll calculate main planet orbital period (local year). This is how matters stand in theoretical astrophysics and celestial mechanics.
In astronomy we are usually know star magnitude and color. Well, star color and temperature are strongly correlated parameters (black body radiation approximation), so knowing star color you’ll know star temperature. For nearest stars you’ll also have distance measured directly with some error margins. Based on magnitude and distance you’ll calculate star luminosity. Based on star luminosity and temperature you’ll calculate star radius. In case of nearest binary stars with measurable orbital periods like Alpha Centauri you can estimate masses of components. In case of distant star you have only directly measured star magnitude and color, maybe sometimes distance with more wide error margins. You can estimate missing parameters based on known mean properties of stars of the same spectral class. This is how matters stand in real astronomy.
And this is how matters stand in Ooniverse. We have only sun radius in planetinfo.plist, not sun mass nor temperature per se. But we can estimate missing parameters based on known properties of stars of the same radius.
Just for historical reasons I am using not Sun analog as standard candle, but sun of spectral class G0V (temperature 6000 K).
If you have sun with radius 0.96 of standard candle – this is our Sun twin: spectral class G2V, temperature 5800 K, luminosity 0.80, mean radius of habitable zone 0.90.
If you have sun with radius 0.8 of standard candle – this is orange dwarf: spectral class K0V, temperature 5000 K, luminosity 0.31, mean radius of habitable zone 0.56.
If you have sun with radius 0.6 of standard candle – this is red dwarf: spectral class M0V, temperature 4000 K, luminosity 0.07, mean radius of habitable zone 0.27.
And so on.
This is simplified and slightly shifted data – you’ll see in astronomy handbooks temperature of M0V red dwarf color 3750 K, not 4000, and temperature of K0V orange dwarf 5240 K, not 5000. Sun Gear is not intended for generating publications in Astrophysical Journal.
Radius of standard candle is 1,000,000 m in game units. So sun radii covers range from 460,000 m (M3.5V red dwarf) to 1,120,000 m (F6 white star). Sun analog (G2V) has radius 960,000 m in game units (radius of our Sun in real reality is 696,000 km).
Sun radii, temperatures and masses distribution is pseudo-randomly smoothed to avoid discrete gaps in data. Every sun has unique radius, temperature and mass.
Sun distances and habitable zones
Sun Gear large suns (5x of vanilla suns) needs really vast solar systems, of course. In vanilla Ooniverse distance between Earth twin (radius approx. 6400 km) is 64,000 * 20 = 1,280,000 m in game units. In Sun Gear distance between Earth and Sun twins is approx. 43,500,000 m – 34 times farther (approx. 680 planet radii).
Distances between system sun and main planet are set to provide standard insolation level (the same insolation that Earth receives from Sun) with pseudo-random distance bias ± 5%, so Sun Gear simulates real proportions of habitable zones. M0V red dwarf has luminosity only 0.09 of our Sun, so in such system distance between sun and main planet will be approx. 0.3 of distance between Sun and Earth twins – approx. 12,900,000 m in game units. Based on mass of red dwarf 0.55 solar mass and main planet orbit radius 0.3 AU in accordance with Third Kepler’s Law we’ll have main planet orbital period approx. 81 days, and Sun Gear really calculates local year for main planet of every visited system.
Large planets – large suns
Search for logically motivated sun population distribution was maybe most informal part of project, and after experimenting I came to simple rule:
Sun radius is proportional to main planet radius.
Seems too oversimplified – we have evidence of numerous super-Earths, discovered in systems of red dwarves. Sometimes there are more than one planet similar with Earth in terms of mass and radius in systems of red dwarves, like in TRAPPIST-1. Observation bias again maybe – combination of large and massive planet(s) with low mass red dwarf is optimal for planet detection. But definitely there are no any reasons to prevent formation of large planets in system of red dwarves and vice versa, small planets in systems of yellow and white suns.
This project was started in epoch of Oolite 1.77, when sun_distance_modifier – parameter, measured in planet radius – was the only way to construct custom solar systems. Correlation between planet radius and sun radius is simplest way to generate population of systems with main planets near habitable zone – having large planet, you have large sun too, but more distant. All my systems has sun_distance_modifier in range from 450 to 700.
Since Oolite 1.81 we have direct parameter sun_distance and above mentioned reason is obsolete. Sun Gear now using sun_distance parameter. But there are some reasons to maintain this rule “large planet – large sun”.
First, we have nav charts with large and small colored circles. Having large planets associated with large suns we have also cool sky chart with really looking color-coded stars! Just aesthetic reason, of course. But aesthetics is a vital component of good game.
Second, function planet radius vs sun radius is a good reason to limit spectral class range to above mentioned values. Look, if your Earth twin (6400 km for simplicity) has sun with radius 960,000 km (15 planet radii in game units), small planet with radius 2800 km will have sun 420,000 km. This is M3V red dwarf in my scale. Again, planet radius 6900 km gives sun radius 1,035,000 km – this is F8V white star. Pure coincidence, honestly, but such fortunately!
Third reason will be discussed a bit later.
Just one remark. I have another OXP – Habitable Main Planets (HMP). It redefines vanilla planet radii to more realistic values. Details are in relevant topic. Sun radii in Sun Gear are correlated with planet radii redefined in HMP, not in vanilla ones. It is not the case if you are using Sun Gear as pure ambience, but without HMP part of vanilla planet population vill be outside of habitable zones. So since Sun Gear 4.3 I decided to declare HMP as obligatory condition for Sun Gear.
Just more about habitable zones
Sun Gear calculates equilibrium temperature of main planet, providing this information for my other OXPs. System Makeup OXP, for example, uses this calculated main planet temperature to select planet texture. In the previous Sun Gear iterations I was using simple formula for such calculation, with no account taken of greenhouse effect. To generate various climate conditions I was using rule “large planets in systems of hot suns a bit closer to inner edge of habitable zone, small planets in systems of cold red dwarves – a bit closer to outer edge” in combination with pseudo-random distance offsets. Now Sun Gear taking greenhouse effect into account. Just rough formula, of course, based on estimation of atmosphere mass as function of planet radius. So large main planets in systems of white and yellow stars has more warm climate as compared with small main planets in systems of orange and red dwarves not due to more hot sun per se but due to more dense atmospheres providing more evident greenhouse effect.
Solar flares and solar wind
Rustem’s Distant Stars has nice custom feature – dynamic solar flares. I borrowed this idea for Sun Gear (with my own realization of course).
Corona flare is controlled dynamically by script. Most of time sun of system is in quiet state (corona_flare random value in range 0.1…0.2), but sometimes solar flares occurs and corona_flare rises randomly up to 0.5 (yes, I know, in reality it is NOT linear correlation between solar corona size and solar flares!). As a rule flare frequency increases from yellow to red stars. Peculiar suns with "solar activity" in system description has more frequent flares with higher magnitudes (corona_flare rises up to 1.0 in case of "deadly solar activity").
Solar wind model is implemented. Solar wind allows to refuel ship without sunskimming (in some cases refuelling is possible en route from witchpoint to main planet). More detailed description of this feature will be in relevant topic.
Magnetospheres of celestial bodies are simulated. Solar wind density is dropped to zero level near planets and moons.
Credits:
Wildblood - Distant Suns OXP/OXZ: initial concept of custom sun population & spectroscope script.
Tch - Tch_Russian_Systems OXP: idea of using RGB model for sun color instead simple named colors.
Rustem - Distant Stars OXP/OXZ: idea of dynamic coronae.
Damocles Edge, phkb and another_commander - detecting OXP incompatibility with DH ANC OXP, formulation issue with HSB colors and invaluable help to solve this issue.
Current OXZ - Version 4.5.2
Uploaded 02 Decembary 2022
This project was initially inspired by Distant Suns (author Wildblood). The main reason to develop alternative project was rebalancing sun population and using potential of more complex color space instead simple named colors for more accurate simulation of sun spectra.
Another different project is Distant Stars (author Rustem). It was presented later and has no such influence on my work with one exception (it will be discussed later).
Let’s omit long story of iterations such as “hot yellow suns for agricultural systems, red and orange dwarves for industrial ones” and outline present state of project.
Sun population and spectra
If you’ll inspect star population in Sun proximity (quite common region of Galaxy in terms of star population) and apply statistical data to Ooniverse, typical distribution of suns on regional map will be appoximately:
5...10 hot white stars (spectral class A) – like Sirius
10...15 yellow stars (spectral class G) – like our Sun or Alpha Centauri A or bit cooler like Tau Ceti
25 orange dwarves (spectral class K) – like Epsilon Eridani or 61 Cygni
200 red dwarves (spectral class M) – like Proxima Centauri
And the rest of total 256 systems – 15...25 of brown dwarves (“failed” stars with mass too low to maintain ignition of thermonuclear synthesis in core).
This is reality. Most of Galaxy star population belongs to low mass, relatively cold, dim red dwarves with extremely long life span.
Well, now take statistical data for distribution of stars with confirmed exoplanets. This is rapidly expanding database and data for March 2015 are outdated, but tendency as whole remains actual. For Oolite 256 system map approximately:
A + B – 4 systems
F – 36 systems
G – 128 systems
K – 72 systems
M – 16 systems
Observation bias, of course. Searching exoplanets is shifted to suns like our Sun because Sun twins seems most suitable suns for habitable planets. But is seems for the same reasons that distribution of colonized worlds will be shifted to suns like our Sun too.
Distribution of suns in Distant Suns reflects predominance of red dwarves in Galaxy:
B – 4 systems
A – 12 systems
F – 16 systems
G – 32 systems
K – 64 systems
M – 128 systems
Six spectral classes and seven named colors: blue, cyan, white, yellow, orange, red, magenta (red and magenta are both used for M class red dwarves).
Distant Stars uses more complex RGB color space and has potential to simulate wide range of spectral subclasses, but there are only six spectral subclasses in database:
A2 – 7 systems
A7 – 21 system
F2 – 40 systems
G2 – 118 systems
K2 – 30 systems
K8 – 40 systems
Red dwarves are completely excluded from Rustem’s Ooniverse and remaining suns reflects above mentioned distribution of stars with exoplanets.
Sun Gear covers only five spectral classes, not six as in Distant Suns, but every spectral class is subdivided onto spectral subclasses with unique color signature. Spectral class G (yellow stars) for example is subdivided onto subclasses from G0 to G9. Moreover, every subclass is subdivided onto two steps with unique color too. Spectral subclass G2 for example is subdivided onto two steps – G2 and G2.5. This nomenclature is sometimes used in astronomy for more precise classification (star of spectral class G2.5 is a bit cooler than G2 but a bit hotter than G3). In total 28 spectral subclasses and 56 unique spectral signatures from F6 to M3. All suns in Sun Gear belongs to main sequence (luminosity class V), so you can see sun designations as G2V or K7V.
Distribution of suns in Sun Gear is shifted to yellow suns of spectral class G – not for reasons based on real astronomy data, but for considerations of visual pleasure. Wildblood’s Ooniverse with predominance of red suns seems a bit too biased to red. Nice for space battles, but I prefer more frequent yellow and white for illumination of planet textures. Color distribution of sun population for Sun Gear 4.3 for all eight sectors (total 2048 systems):
F6V...F9V (white stars) – 214
G0V...G9V (yellow stars) – 1102
K0V...K9V (orange dwarves) – 433
M0V...M3V (red dwarves) – 299
Hot B and A stars with bluish-white tint are completely excluded from my Ooniverse. It seems that life span of F5V star or hotter is too limited for planets with multicellular life and advanced biomes. Red dwarves cooler than M5V is another case: these suns has extremely long life span, but extremely violent solar flares too.
Since Sun Gear 4.0 I'm using RGB color space for sun colors instead HSB. In theory RGB colors based on real astrometric data can be simulated, but there are technical limitations in game, preventing such accurate simulation. Color of sun in Oolite is blended with 50% white, so you have no possibility to get saturated color. Moreover, real color space in Oolite is too restricted to simulate colors of real stars. M0V red dwarf, for example, has RGB color #ffcd90 or 255, 205, 144 in decimal notation, but you have no possibility to get value below 170 in any channel. Overriding this limitation needs some skill in redefining blending rules. So sun colors in Sun Gear enhanced to provide more visual diversity to game world.
Sun properties
Sun mass and chemical composition are initial parameters in theory of star evolution. Having sun mass and chemical composition you’ll predict sun radius and temperature. Having sun radius and temperature you’ll calculate sun luminosity. Having sun luminosity you’ll calculate inner and outer radius of sun habitable zone. And having radius of main planet orbit in centre of habitable zone you’ll calculate main planet orbital period (local year). This is how matters stand in theoretical astrophysics and celestial mechanics.
In astronomy we are usually know star magnitude and color. Well, star color and temperature are strongly correlated parameters (black body radiation approximation), so knowing star color you’ll know star temperature. For nearest stars you’ll also have distance measured directly with some error margins. Based on magnitude and distance you’ll calculate star luminosity. Based on star luminosity and temperature you’ll calculate star radius. In case of nearest binary stars with measurable orbital periods like Alpha Centauri you can estimate masses of components. In case of distant star you have only directly measured star magnitude and color, maybe sometimes distance with more wide error margins. You can estimate missing parameters based on known mean properties of stars of the same spectral class. This is how matters stand in real astronomy.
And this is how matters stand in Ooniverse. We have only sun radius in planetinfo.plist, not sun mass nor temperature per se. But we can estimate missing parameters based on known properties of stars of the same radius.
Just for historical reasons I am using not Sun analog as standard candle, but sun of spectral class G0V (temperature 6000 K).
If you have sun with radius 0.96 of standard candle – this is our Sun twin: spectral class G2V, temperature 5800 K, luminosity 0.80, mean radius of habitable zone 0.90.
If you have sun with radius 0.8 of standard candle – this is orange dwarf: spectral class K0V, temperature 5000 K, luminosity 0.31, mean radius of habitable zone 0.56.
If you have sun with radius 0.6 of standard candle – this is red dwarf: spectral class M0V, temperature 4000 K, luminosity 0.07, mean radius of habitable zone 0.27.
And so on.
This is simplified and slightly shifted data – you’ll see in astronomy handbooks temperature of M0V red dwarf color 3750 K, not 4000, and temperature of K0V orange dwarf 5240 K, not 5000. Sun Gear is not intended for generating publications in Astrophysical Journal.
Radius of standard candle is 1,000,000 m in game units. So sun radii covers range from 460,000 m (M3.5V red dwarf) to 1,120,000 m (F6 white star). Sun analog (G2V) has radius 960,000 m in game units (radius of our Sun in real reality is 696,000 km).
Sun radii, temperatures and masses distribution is pseudo-randomly smoothed to avoid discrete gaps in data. Every sun has unique radius, temperature and mass.
Sun distances and habitable zones
Sun Gear large suns (5x of vanilla suns) needs really vast solar systems, of course. In vanilla Ooniverse distance between Earth twin (radius approx. 6400 km) is 64,000 * 20 = 1,280,000 m in game units. In Sun Gear distance between Earth and Sun twins is approx. 43,500,000 m – 34 times farther (approx. 680 planet radii).
Distances between system sun and main planet are set to provide standard insolation level (the same insolation that Earth receives from Sun) with pseudo-random distance bias ± 5%, so Sun Gear simulates real proportions of habitable zones. M0V red dwarf has luminosity only 0.09 of our Sun, so in such system distance between sun and main planet will be approx. 0.3 of distance between Sun and Earth twins – approx. 12,900,000 m in game units. Based on mass of red dwarf 0.55 solar mass and main planet orbit radius 0.3 AU in accordance with Third Kepler’s Law we’ll have main planet orbital period approx. 81 days, and Sun Gear really calculates local year for main planet of every visited system.
Large planets – large suns
Search for logically motivated sun population distribution was maybe most informal part of project, and after experimenting I came to simple rule:
Sun radius is proportional to main planet radius.
Seems too oversimplified – we have evidence of numerous super-Earths, discovered in systems of red dwarves. Sometimes there are more than one planet similar with Earth in terms of mass and radius in systems of red dwarves, like in TRAPPIST-1. Observation bias again maybe – combination of large and massive planet(s) with low mass red dwarf is optimal for planet detection. But definitely there are no any reasons to prevent formation of large planets in system of red dwarves and vice versa, small planets in systems of yellow and white suns.
This project was started in epoch of Oolite 1.77, when sun_distance_modifier – parameter, measured in planet radius – was the only way to construct custom solar systems. Correlation between planet radius and sun radius is simplest way to generate population of systems with main planets near habitable zone – having large planet, you have large sun too, but more distant. All my systems has sun_distance_modifier in range from 450 to 700.
Since Oolite 1.81 we have direct parameter sun_distance and above mentioned reason is obsolete. Sun Gear now using sun_distance parameter. But there are some reasons to maintain this rule “large planet – large sun”.
First, we have nav charts with large and small colored circles. Having large planets associated with large suns we have also cool sky chart with really looking color-coded stars! Just aesthetic reason, of course. But aesthetics is a vital component of good game.
Second, function planet radius vs sun radius is a good reason to limit spectral class range to above mentioned values. Look, if your Earth twin (6400 km for simplicity) has sun with radius 960,000 km (15 planet radii in game units), small planet with radius 2800 km will have sun 420,000 km. This is M3V red dwarf in my scale. Again, planet radius 6900 km gives sun radius 1,035,000 km – this is F8V white star. Pure coincidence, honestly, but such fortunately!
Third reason will be discussed a bit later.
Just one remark. I have another OXP – Habitable Main Planets (HMP). It redefines vanilla planet radii to more realistic values. Details are in relevant topic. Sun radii in Sun Gear are correlated with planet radii redefined in HMP, not in vanilla ones. It is not the case if you are using Sun Gear as pure ambience, but without HMP part of vanilla planet population vill be outside of habitable zones. So since Sun Gear 4.3 I decided to declare HMP as obligatory condition for Sun Gear.
Just more about habitable zones
Sun Gear calculates equilibrium temperature of main planet, providing this information for my other OXPs. System Makeup OXP, for example, uses this calculated main planet temperature to select planet texture. In the previous Sun Gear iterations I was using simple formula for such calculation, with no account taken of greenhouse effect. To generate various climate conditions I was using rule “large planets in systems of hot suns a bit closer to inner edge of habitable zone, small planets in systems of cold red dwarves – a bit closer to outer edge” in combination with pseudo-random distance offsets. Now Sun Gear taking greenhouse effect into account. Just rough formula, of course, based on estimation of atmosphere mass as function of planet radius. So large main planets in systems of white and yellow stars has more warm climate as compared with small main planets in systems of orange and red dwarves not due to more hot sun per se but due to more dense atmospheres providing more evident greenhouse effect.
Solar flares and solar wind
Rustem’s Distant Stars has nice custom feature – dynamic solar flares. I borrowed this idea for Sun Gear (with my own realization of course).
Corona flare is controlled dynamically by script. Most of time sun of system is in quiet state (corona_flare random value in range 0.1…0.2), but sometimes solar flares occurs and corona_flare rises randomly up to 0.5 (yes, I know, in reality it is NOT linear correlation between solar corona size and solar flares!). As a rule flare frequency increases from yellow to red stars. Peculiar suns with "solar activity" in system description has more frequent flares with higher magnitudes (corona_flare rises up to 1.0 in case of "deadly solar activity").
Solar wind model is implemented. Solar wind allows to refuel ship without sunskimming (in some cases refuelling is possible en route from witchpoint to main planet). More detailed description of this feature will be in relevant topic.
Magnetospheres of celestial bodies are simulated. Solar wind density is dropped to zero level near planets and moons.
Credits:
Wildblood - Distant Suns OXP/OXZ: initial concept of custom sun population & spectroscope script.
Tch - Tch_Russian_Systems OXP: idea of using RGB model for sun color instead simple named colors.
Rustem - Distant Stars OXP/OXZ: idea of dynamic coronae.
Damocles Edge, phkb and another_commander - detecting OXP incompatibility with DH ANC OXP, formulation issue with HSB colors and invaluable help to solve this issue.
Last edited by stranger on Fri Dec 02, 2022 11:46 pm, edited 19 times in total.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
In 3.7.0 release I was focused on improvement of part of AstroLibrary, providing values for PlanetEngine.
Selection of additional planet texture and generating planet data page in Planetary Systems depends on AstroLibrary.
Runaway greenhouse effect was too strong in Sun Gear 3.6, so inner Terra-like additional planet always has extremely hot super-dense atmosphere like Venus. In Sun Gear 3.7 runaway greenhouse effect is relaxed, so you can see hot desert planets now.
3.8.0 release - continue tuning of PlanetEngine. Less one empirical constant, less one IF-THEN-ELSE construction, almost the same result!
Selection of additional planet texture and generating planet data page in Planetary Systems depends on AstroLibrary.
Runaway greenhouse effect was too strong in Sun Gear 3.6, so inner Terra-like additional planet always has extremely hot super-dense atmosphere like Venus. In Sun Gear 3.7 runaway greenhouse effect is relaxed, so you can see hot desert planets now.
3.8.0 release - continue tuning of PlanetEngine. Less one empirical constant, less one IF-THEN-ELSE construction, almost the same result!
- Damocles Edge
- ---- E L I T E ----
- Posts: 256
- Joined: Thu Mar 30, 2017 9:57 pm
Re: Sun Gear
I think I may have stumbled upon a conflict with another oxp.
I use ANC https://bb.oolite.space/viewtopic.php?f=4&t=13526
And I have found that the ANC refuses to engage properly when attempting to enter witchspace. I get the first automated message where it attempts to lock onto beacon but after this the ship does nothing (it would normally orientate the ship towards the system and then after 30 seconds enter witchspace resulting in less fuel being used).
I have then back tracked removing a number of oxps which I have recently added one by one to see which would alleviate the issue.
First of all I removed stations for extra planets base oxp together with extra stations pack.
Then I removed Sun Gear and this seems to have resolved matters (I had installed Sun Gear together with Habitable Main Planets oxp)
I presume that I was running 3.7 (I noted in the previous post that a new version 3.8 was made available today)
Hope this helps
I use ANC https://bb.oolite.space/viewtopic.php?f=4&t=13526
And I have found that the ANC refuses to engage properly when attempting to enter witchspace. I get the first automated message where it attempts to lock onto beacon but after this the ship does nothing (it would normally orientate the ship towards the system and then after 30 seconds enter witchspace resulting in less fuel being used).
I have then back tracked removing a number of oxps which I have recently added one by one to see which would alleviate the issue.
First of all I removed stations for extra planets base oxp together with extra stations pack.
Then I removed Sun Gear and this seems to have resolved matters (I had installed Sun Gear together with Habitable Main Planets oxp)
I presume that I was running 3.7 (I noted in the previous post that a new version 3.8 was made available today)
Hope this helps
O.C.T.D (Oolite Crash Test Dummy) Hmm Hmm Hmm Hmm......
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
Thank you for feedback!Damocles Edge wrote: ↑Sat Feb 02, 2019 4:46 pmI think I may have stumbled upon a conflict with another oxp.
I'll be offline today, so I'll install your OXP and try it later.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
Confirmed - Sun Gear conflicts with Deep Horizon Advanced Navigation Computer just as was described by Damocles Edge.
And this is case for Sun Gear - Distant Suns with similar rearranged solar systems has no such side effects.
DH ANC has complex math and I have no any clues to locate issue yet. Hope Cmd. Cheyd or Phantor Gorth can help to resolve issue.
I have such reports in log:
... and long sequence of similar lines follows every 20 ms or so.
And this is case for Sun Gear - Distant Suns with similar rearranged solar systems has no such side effects.
DH ANC has complex math and I have no any clues to locate issue yet. Hope Cmd. Cheyd or Phantor Gorth can help to resolve issue.
I have such reports in log:
Code: Select all
19:37:14.981 [script.javaScript.exception.ooliteDefined]: ***** JavaScript exception (Deep_Horizon_Adv_Nav_Comp 1.0.4): Error: Native exception: -[__NSCFDictionary length]: unrecognized selector sent to instance 0x608001c7fcc0
19:38:24.203 [LogEvents]: primed EQ_ADV_NAV_COMP
19:38:29.528 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Deep_Horizon_Adv_Nav_Comp_Equipment 1.0.0): TypeError: this.$jumpMarker is undefined
19:38:44.567 [LogEvents]: cancelled jump countdown
19:38:44.567 [LogEvents]: started 15 seconds standard jump countdown
19:38:44.572 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (<unidentified script>): TypeError: ccl_tar[1] is undefined
19:38:44.595 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (<unidentified script>): TypeError: ccl_tar[1] is undefined
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Sun Gear
Do you have the Oolite Developer release installed? That will help with tracking down bugs by adding JS line numbers to your log file. Otherwise all I know is that there were two errors. As the maintainer of the DH ANC, it will probably fall to me to do any code change, so any help you can provide here would be beneficial.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
Not yet. Have game Oolite release on desktop computer. I'll install Oolite dev release on my notebook.phkb wrote: ↑Mon Feb 04, 2019 2:01 amDo you have the Oolite Developer release installed? That will help with tracking down bugs by adding JS line numbers to your log file. Otherwise all I know is that there were two errors. As the maintainer of the DH ANC, it will probably fall to me to do any code change, so any help you can provide here would be beneficial.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
Well, now I have some additional info.
Installing Advanced Navigation Computer, loading saved game (current system Zaonce - system 129).
Selecting Lave as destination system (system 7).
Starting from mains station and having such log lines:
Selecting and priming ANC and having the next log lines:
30+ seconds later - attempting to reboot hyperjump countdown manually. The next log lines:
and loop of log lines with reference to error in line 525
There are also JavaScript Console messages.
Launching from station
and priming ANC
Installing Advanced Navigation Computer, loading saved game (current system Zaonce - system 129).
Selecting Lave as destination system (system 7).
Starting from mains station and having such log lines:
Code: Select all
11:55:12.496 [LogEvents]: gui screen changed from GUI_SCREEN_SHORT_RANGE_CHART to GUI_SCREEN_MAIN
11:55:12.507 [script.javaScript.exception.ooliteDefined]: ***** JavaScript exception (Deep_Horizon_Adv_Nav_Comp 1.0.4): Error: Native exception: -[__NSCFDictionary length]: unrecognized selector sent to instance 0x608003872600
11:55:12.507 [script.javaScript.exception.ooliteDefined]: /Applications/Oolite-1.88-Mac-TestRelease/AddOns/Deep_Horizon_Advanced_Navigation_Computer.oxz/Scripts/Deep_Horizon_Adv_Nav_Comp_World.js, line 405.
11:55:12.531 [LogEvents]: will launch from Icosahedron Station 17483 flying Cobra Mark III null
Code: Select all
11:55:48.088 [LogEvents]: primed EQ_ADV_NAV_COMP
11:55:50.579 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Deep_Horizon_Adv_Nav_Comp_Equipment 1.0.0): TypeError: this.$jumpMarker is undefined
11:55:50.579 [script.javaScript.exception.unexpectedType]: /Applications/Oolite-1.88-Mac-TestRelease/AddOns/Deep_Horizon_Advanced_Navigation_Computer.oxz/Scripts/Deep_Horizon_Adv_Nav_Comp_World.js, line 234.
Code: Select all
11:56:23.588 [LogEvents]: cancelled jump countdown
11:56:23.590 [LogEvents]: started 15 seconds standard jump countdown
11:56:23.594 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (<unidentified script>): TypeError: ccl_tar[1] is undefined
11:56:23.594 [script.javaScript.exception.unexpectedType]: /Applications/Oolite-1.88-Mac-TestRelease/AddOns/Deep_Horizon_Advanced_Navigation_Computer.oxz/Scripts/Deep_Horizon_Adv_Nav_Comp_World.js, line 525.
11:56:23.653 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (<unidentified script>): TypeError: ccl_tar[1] is undefined
11:56:23.653 [script.javaScript.exception.unexpectedType]: /Applications/Oolite-1.88-Mac-TestRelease/AddOns/Deep_Horizon_Advanced_Navigation_Computer.oxz/Scripts/Deep_Horizon_Adv_Nav_Comp_World.js, line 525.
There are also JavaScript Console messages.
Launching from station
Code: Select all
Exception: Error: Native exception: -[__NSCFDictionary length]: unrecognized selector sent to instance 0x608002a75700
Active script: Deep_Horizon_Adv_Nav_Comp 1.0.4
Deep_Horizon_Adv_Nav_Comp_World.js, line 405:
var color = System.infoForSystem(galaxyNumber,sysID).sun_color;
Code: Select all
Exception: TypeError: this.$jumpMarker is undefined
Active script: Deep_Horizon_Adv_Nav_Comp_Equipment 1.0.0
Deep_Horizon_Adv_Nav_Comp_World.js, line 234:
this.$navFrameVE = system.addVisualEffect("deephorizon_navframe",this._vectoredPositionToTarget(this.$jumpMarker.position,player.ship.collisionRadius + 5000));
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Sun Gear
@stranger: Can you please give it one more try with the latest v1.89 nightly? One of the exceptions you are getting seems to be related to sun_color and it may be the result of using hue color value dictionaries in your script. In 1.89 a fix for cases like this has been inserted.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
@another_commander
I'll try it.
And maybe redefining sun color in RGB will solve this issue. I am using HSB colors in Sun Gear planetinfo.plist now.
I'll try it.
And maybe redefining sun color in RGB will solve this issue. I am using HSB colors in Sun Gear planetinfo.plist now.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Sun Gear
Actually, I think that might be the cause. Because of that bug, the DH ANC will terminate it's setup process prematurely, resulting in all the undefined errors.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
@phkb
It seems as logical explanation. Need to be verified of course.
Well, now I have plans to study this issue.
It seems as logical explanation. Need to be verified of course.
Well, now I have plans to study this issue.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
Well. Results for this evening:
Due to Debug OXP in development version I am detecting error in name of one variable, preventing displaying sun spectral class on F7 info page. Already tested and will be fixed in the next Sun Gear update. This is not cause for issue with ANC, but this is error. Thank you, phkb, for advice to use development version! it's shame, I was too long neglected this tool.
Testing Sun Gear with DH ANC.
Oolite 1.89 nightly build - no issues, clear log. So future Oolite update will fix this issue.
How to fix issue now?
Trying the simple OXP with short planetinfo.plist to override my HSB sun colors for Zaonce and Lave (systems of departure and destination):
Not works in Oolite 1.88. The same errors.
What I am doing wrong?
Due to Debug OXP in development version I am detecting error in name of one variable, preventing displaying sun spectral class on F7 info page. Already tested and will be fixed in the next Sun Gear update. This is not cause for issue with ANC, but this is error. Thank you, phkb, for advice to use development version! it's shame, I was too long neglected this tool.
Testing Sun Gear with DH ANC.
Oolite 1.89 nightly build - no issues, clear log. So future Oolite update will fix this issue.
How to fix issue now?
Trying the simple OXP with short planetinfo.plist to override my HSB sun colors for Zaonce and Lave (systems of departure and destination):
Code: Select all
{
"0 7" = {
sun_color = "0.999 0.000 0.000 1";
};
"0 129" = {
sun_color = "0.281663 0.323689 0.836652 1";
};
}
What I am doing wrong?
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Sun Gear
DH ANC goes through all the possible destinations from your current location during it's setup process. So, if you've kept the entirety of your original planetinfo.plist file, and simply overridden two locations, any of the other connections will cause the error.stranger wrote:Trying the simple OXP with short planetinfo.plist to override my HSB sun colors for Zaonce and Lave (systems of departure and destination)
You can try again with 1.88, but either override all the other possible destinations from Zaonce (Tionisla, Isinor, Bemaera, and Qutiri), or temporarily remove your original planetinfo.plist file so the HSB values aren't used at all.
- stranger
- ---- E L I T E ----
- Posts: 351
- Joined: Thu Apr 05, 2018 5:31 am
- Location: Vladivostok, Russia
Re: Sun Gear
@phkb
It making sense!
So refactoring planetinfo.plist using RGB color model will fix issue.
I'll try to override colors of all Zaonce 7 LY neigbors and test again.
It making sense!
So refactoring planetinfo.plist using RGB color model will fix issue.
I'll try to override colors of all Zaonce 7 LY neigbors and test again.