Orbital Stations

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
stranger
Deadly
Deadly
Posts: 146
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Orbital Stations

Post by stranger » Tue Jan 08, 2019 5:03 am

Orbital Stations

Latest OXZ - Version 2.6.0
Uploaded 15 Feb 2019

Ideas with revolutionary potential sometimes remains underestimated or just unnoticed.
This is a case for Satellite OXP (author – Rorschachhamster). Nice exercise in coding and just one more OXP in Appearance category.
Well.
It is hard task to simulate true orbital dynamics in Oolite.
In real world calculation of orbital dynamics is based on integration of acceleration vector and on energy conservation law. If you have no acceleration produced by propulsion engine, your total energy (sum of kinetic and potential energy) would be constant value. So on elliptic orbit you’ll trade velocity for altitude and vice versa.
In Oolite we have no gravity nor energy. Acceleration is limited to propulsion acceleration/deceleration parameter thrust and this is not vector value – it is just rate of change of ship speed. So we need some trick to simulate true orbital dynamics – calculate ship position for next frame and place ship to it directly.
Unfortunately JavaScript is not suitable instrument for smooth dynamic simulations. It generates only 4 fps, so you’ll see sequence of frames instead illusion of smooth movement.
Bad idea. Forget it.
Satellite OXP uses more elegant approach, based on AI behavior. It generates realistically looking pattern of circular movement around planet without sophisticated math.
Let’s try to apply this approach to some large ship. Large enough to be dockable.
You got the idea.

Orbital Stations OXP puts into operation network of stations, moving on circular orbits.
All stations in network has specific roles and markets.
Kiota class stations from WildShips OXP (author Thargoid) were used as prototypes for my orbiters. Kiota stations has modular design, suitable for assembling custom configurations. These stations has reach-through axial docking well, allowing easy closing and docking from six o’clock chasing position. And these stations has pretty looking appearance.
Nice job, Thargoid!

It is technically possible to adjust each orbiter velocity individually to simulate orbital periods as function of planet mass and orbit radius, but I have no plans to implement such idea. Escape velocity in our Solar system is 2.38 km/s for Moon and 59.5 km/s for Jupiter – 25x ratio. All orbiters has H = 0.5 R circular orbits, so orbital velocities will be in the same x25 ratio. Setting orbital velocity of jovian orbiter to 200 m/s to allow Adder or Boa to dock with station you’ll have 8 m/s for lunar orbiter – barely noticeably movement. So I decide to sacrifice accuracy for fun. All orbiters has the same orbital velocity 50 m/s.

Features:

Lock Advanced Space Compass onto K beacon and enjoy flight onto new destination!

Orbital Stations implemented:

KHS-2R
KHS-4R
KHS-8R

Main stations in high tech systems. Same configuration as original ring habitat stations in WildShips OXP, but with different seeding criteria. Stationary (not moving) stations.

KOS-RJ Jovian research orbiter
KOS-RM Martian research orbiter
KOS-RT Terran research orbiter
KOS-RS Superterran research orbiter

Research orbital stations located in high-tech systems with stable governments and high GNP. All research orbiters except Jovian orbiter based on the same configuration.

KOS-M

Mining complex in heliocentric orbit. Located in high-tech systems with stable governments and high GNP.

KOS-P

Orbital plant on orbit of large moon of main planet. Located in most advanced high-tech systems with stable governments and high GNP.

All stationary KHS stations has roles of main system station with default system market.
KOS orbiters has custom markets, adjusted individually for every type of station.

Conflicts and dependencies

Required OXP: Planetary System

This OXP uses planets from Planetary Systems OXP as destination points for station spawn. If you have Planetary Systems missing, Orbital Station still try to spawn stations but results may be negative or logically flawed (for example, you have no research station on orbit of gas giant if you have no at least one gas giant in system!).
Stations used are modified Kiota stations from Wild Ships OXP (author - Thargoid). Resource files from Wild Ships OXP are included in Orbital Stations and renamed to avoid clashes with possible future updates of Wild Ships.
Orbital Stations and Wild Ships uses different station roles and seeding scripts, so in theory Orbital Stations will not conflict with Wild Ships. Any feedback will be welcomed.
Main orbital stations KHS completely replaces old Tori station. Remove Tori.oxp from AddOn folder if you have one to see new stations!

This package minimum requirement is Oolite 1.82.

Credits

Station models, shaders and textures are renamed files from WildShips OXP (author - Thargoid). Specifications of stations are readjusted.
Algorithm of seeding stations based on Stations for Extra Planets OXP (author - spara).
Algorithm of orbital movement tightly based on Satellite OXP (author - Rorschachhamster).
Station market saver script tightly based on PlanetfallMarketSaver (author - SMax).
Help of commander vasig from Russian Oolite community in heavy testing of this OXP was and will be invaluable!
Last edited by stranger on Thu Feb 14, 2019 10:54 pm, edited 6 times in total.

User avatar
stranger
Deadly
Deadly
Posts: 146
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Orbital Stations

Post by stranger » Tue Jan 08, 2019 5:09 am


another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5396
Joined: Wed Feb 28, 2007 7:54 am

Re: Orbital Stations

Post by another_commander » Tue Jan 08, 2019 7:09 am

stranger wrote:
Tue Jan 08, 2019 5:03 am
Unfortunately JavaScript is not suitable instrument for smooth dynamic simulations. It generates only 4 fps, so you’ll see sequence of frames instead illusion of smooth movement.
Bad idea. Forget it.
I wouldn't forget it right away. Frame callbacks can be used for animations and are invoked on every game frame. Check here for details.

Also, very quick and dirty (no cleanup at end, no nothing) example for showing how you can use this for moving the station. Put this function inside script.js in Config and see how the station smoothly slides away once you launch.

Code: Select all

this.$fcb = addFrameCallback(function (delta)
{
	system.mainStation.position = system.mainStation.position.add([0,0,100 * delta]);
});

User avatar
stranger
Deadly
Deadly
Posts: 146
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Orbital Stations

Post by stranger » Tue Jan 08, 2019 7:25 am

:oops: Need to reconsider my statement...
Thank you!

User avatar
stranger
Deadly
Deadly
Posts: 146
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Orbital Stations

Post by stranger » Fri Feb 15, 2019 12:59 am

Commanders,

Orbital Stations is now compatible with Wild Ships.

Personally I prefer to select one of packs, not both. Having two sets of stations with similar design but different roles and markets seems as excess. But there are fun features in Wild Ships lacking in my Orbital Stations like unique ships with unique traffic pattern etc. It will be wrong to demand “you must choose one of packs, not both”. So compatibility is welcomed option.
Lacking modeler skills I’m using for my orbiters nice models from Wild Ships. There is some drawbacks in using shared resource files however.
Some players like I can prefer to use only Orbital Stations, not Wild Ships. So Orbital Stations must contain all resource files to work as stand-alone pack without need to install Wild Ships.
But some players can prefer to use both packs. Running two packs with similar resource files in parallel can arouse issue of synchronization. Any possible future update of resource files of Wild Ships will lead to unpredictable clashes between new resource files and old ones.
How to avoid these issues?

Possible variants

A. Split Orbital Stations onto two packs – core pack and optional resource pack. For using Orbital Stations in parallel with Wild Ships you'll need only core pack. Install core pack AND resource pack to use Orbital Stations as stand-alone OXP.
It will work, but it is a bit confusing for gamer. Installing Orbital Stations core pack and installing resource pack. Well. A bit later you’ll try to install Wild Ships too and you need to remove Orbital Stations resource pack to avoid above mentioned issues. OK, resource pack can be declared (and must be declared) as incompatible with Wild Ships, but how many players has habit to read instructions before installing new packs?

B. Two version of Orbital Stations.
Full stand-alone version with all resource files included, declared as incompatible with Wild Ships
AND
Lite version, using shared resources from Wild Ships and declared as dependent from Wild Ships.
It will work too, but again it not simplest for casual gamer.

So I have final decision.
All resource files were be renamed and all corresponding references were be edited.
Now resource files, borrowed from Wild Ships, are isolated.
Log file is clear and I hope it will be safe.

Enjoy!

User avatar
RockDoctor
Deadly
Deadly
Posts: 254
Joined: Sat May 01, 2010 9:05 pm
Location: Scotland
Contact:

Re: Orbital Stations

Post by RockDoctor » Thu Feb 21, 2019 3:50 pm

stranger wrote:
Tue Jan 08, 2019 5:09 am
Lunar orbital factory
(I haven't read the rest of the thread, I was browsing for something else.)
Lots of solar panels. Fine. Does the code keep them approximately normal to the station-sun line? Of not, you're going to get power-loss Klaxons going off all over the place.
Also, the ISS has radiator panels positioned perpendicular to the solar panels. They're there for a reason, and oriented so for a reason.
--
Shooting aliens for fun and ... well more fun.
"I'm just stepping out of the airlock for a breath of fresh vacuum. I may be gone some time."

User avatar
stranger
Deadly
Deadly
Posts: 146
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Orbital Stations

Post by stranger » Thu Feb 21, 2019 10:51 pm

RockDoctor wrote:
Thu Feb 21, 2019 3:50 pm
Lots of solar panels. Fine. Does the code keep them approximately normal to the station-sun line? Of not, you're going to get power-loss Klaxons going off all over the place.
Also, the ISS has radiator panels positioned perpendicular to the solar panels. They're there for a reason, and oriented so for a reason.
Yes, I was concerned with this aspect taking and re-assembling original design of Kiota modular stations for orbiters.
So-called solar panels are really heat radiators in my version of game reality despite being declared as solar panels in shipdata.plist (heredity of original Thargoid's shipdata.plist). You have no pressing need to use solar power having concentrated energy in form of witchfuel, collected from solar wind (OK, there are some issues with density of solar wind in real reality - it has too low energy density comparing to electromagnetic solar radiation, but in theory you can collect it using huge intake area of magnetic trap).
There are no issues with heliocentric mining complex - it always has optimal orientation of heat radiators due to orbital orientation. But we have issue with orientation of heat radiators in case of lunar orbital factory, really.
Possible decisions:
A. Simplest - just redesign lunar factory. No radiator panels - no issue.
B. More complex - orbital plane normal to sun. I need some time to try it, OK?
C. Heat radiators as individually oriented sub-entities. It is beyond my coding skills.

And we have similar case for original Thargoid's solar station too, having solar panels and lacking heat radiators.

Thanks for feedback!

User avatar
RockDoctor
Deadly
Deadly
Posts: 254
Joined: Sat May 01, 2010 9:05 pm
Location: Scotland
Contact:

Re: Orbital Stations

Post by RockDoctor » Fri Feb 22, 2019 12:21 am

stranger wrote:
Thu Feb 21, 2019 10:51 pm
So-called solar panels are really heat radiators in my version of game reality despite being declared as solar panels in shipdata.plist (heredity of original Thargoid's shipdata.plist).
Yeah, I was thinking things about attitude control while watching the data stream from the Hayabusa2 mission.
--
Shooting aliens for fun and ... well more fun.
"I'm just stepping out of the airlock for a breath of fresh vacuum. I may be gone some time."

Post Reply