Jump to content

[WEB][ANYOS] RemoteTech Constellation Builder v0.2


Recommended Posts

Constellation Builder v0.3 - Web version

File version - requires GeoGebra software, download link below

DIRECTIONS:

  1. Adjust slider for range of omnidirectional antenna to be used on the satellites, in 100's of kilometers. 4Mm range? Set it to 40. As of v0.3 all distance sliders display in kilometers. The grid scale is still 1 unit = 100km.
  2. Anjust slider for number of satellites in the constellation.
  3. Select connection requirements. (Do they need to connect to KSC and/or each other?) IMPORTANT: IF YOU DO NOT SELECT EITHER CHECKBOX IT WILL PUT THE CONSTELLATION IN AN ORBIT UNDER THE SURFACE OF KERBIN. This is hardcoded and keeps GeoGebra from choking on it until I implement some more features. As of v0.3 this is no longer true. An additional slider has been added to choose the orbital altitude in km, with upper and lower limits of the orange rings.
  4. Area of uninterrupted coverage will be displayed as a wireframe torus built from magenta circles and dark purple rings.
  5. Recommended constellation orbit displayed as a dark red ring. This will be removed at some point.
  6. Minimum and maximum bounds for the given parameters are displayed as orange rings.

ADDITIONAL NOTES:

  • Kerbin has a sort of halo - that's where the atmosphere is.
  • Points representing the Mun and Minmus, along with to-scale spheres for both bodies, correct orbits, and rings representing the SOI of both bodies are present. Minmus' orbit uses y+ as the reference direction and the x-y plane as the reference plane.
  • Zoom out far enough and you'll notice a pair of rings. The blue ring represents Kerbin's SOI. The red ring represents the max range at which KSC can connect to a satellite without relays.
  • For the purposes of this tool, KSC is located exactly on the equator at sea level at (6,0,0) Cartesian coordinates.
  • If you download the file, be very careful not to accidentally change something and break it.
  • All game data from the official wiki. http://wiki.kerbalspaceprogram.com/wiki/Main_Page
  • All RemoteTech data from https://remotetechnologiesgroup.github.io/RemoteTech/.

HOW IT WORKS:

Spoiler
  1. Create variable AngleBetweenSats.
    1. Divide 360 degrees by the number of sats.
  2. Place two rays AngleBetweenSats apart in the x-y plane with origin at Kerbin such that the angle bisector will pass through the KSC placeholder, which lies on the x-axis.
    1. Divide AngleBetweenSats by 2 to get the angle from the X-axis.
    2. A point 1 unit away from KerbinCenter (the origin) has coordinates (cos(AngleBetweenSats / 2),sin(AngleBetweenSats / 2),0). Save the X and Y coordinates to KSCWindowXCoordHelper and KSCWindowYCoordHelper.
    3. Ray KSCWindowRay1 is ray with origin KerbinCenter through point with coordinates (KSCWindowXCoordHelper,KSCYCoordHelper,0).
    4. Ray KSCWindowRay2 is ray with origin KerbinCenter through point with coordinates (KSCWindowXCoordHelper,-KSCYCoordHelper,0). (Negate the Y-coordinate to mirror about the x-axis.)
  3. Find the distance at which a sat can connect to KSP.
    1. Draw circle KSCConnectionRange with center KSC, radius AntennaRange, and direction zAxis. 
  4. Find the maximum orbit distance at which at least one sat in the constellation is connected to KSC at all times.
    1. Plot point KSCConnectionHelper as intersect of KSCWindowRay1 and KSCConnectionRange.
    2. Draw circle KSCConnectionUpperLimit with center KerbinCenter, point on perimeter KSCConnectionHelper, and direction zAxis.
  5. Find the maximum orbit distance at which all satellites in the constellation can see each other at all times.
    1. Use portions of KSCWindowRay1 and 2 to form an isosceles triangle with legs of length equal to the maximum altitude for all sats to connect to each other.
      1. Base of isosceles triangle is AntennaRange. Angle between the equal legs is AngleBetweenSats.
      2. To solve, divide isosceles triangle into two congruent right triangles with 1 side equal to AntennaRange/2, hypotenuse IntersatConnectionHelper, and angle opposite given short side AngleBetweenSats/2.
      3. Variable IntersatConnectionHelper = (AntennaRange / 2) / sin(AngleBetweenSats / 2). (Solve "sin( θ ) = opposite/hypotenuse" for hypotenuse.)
      4. Legs have length IntersatConnectionHelper.
    2. Draw circle IntersatConnectionUpperLimit with center KerbinCenter, radius IntersatConnectionHelper, and direction zAxis.
  6. Find the minimum orbit distance at which all satellites in the constellation can see each other. (This will be a circle with radius equal to the length of the equal legs of an isoceles triangle with angle AngleBetweenSats between the equal legs and base tangent to the equator.)
    1. Draw circle KerbinEquator with center KerbinCenter, radius 6, and direction zAxis
    2. Draw line LowerLimitHelper as line tangent to KerbinEquator at point KSC
    3. Plot point LowerLimitRadius as intersect of LowerLimitHelper and KSCWindowRay1
    4. Draw circle ConstellationLowerLimit with center KerbinCenter, point on perimeter LowerLimitRadius, and direction zAxis (to be changed as part of fixing known issue #2)
  7. Find the upper bound of the constellation orbit.
    1. Logic statement to read boolean value of connection requirement checkboxes. (true == checked)
      1. If both are true, compare the radius of IntersatConnectionUpperLimit and KSCConnectionUpperLimit. Draw circle ConstellationUpperLimit with center KerbinCenter, radius the lower of the two, and direction zAxis.
      2. Otherwise:
        1. If one OR the other is true:
          1. If IntersatConnectionRequired is true, draw circle ConstellationUpperLimit with center KerbinCenter, radius equal to radius[IntersatConnectionUpperLimit], and direction zAxis.
          2. Otherwise, draw circle ConstellationUpperLimit with center KerbinCenter, radius equal to radius[KSCConnectionUpperLimit], and direction zAxis.
        2. Otherwise, draw circle ConstellationUpperLimit around line zAxis such that KSC lies on its perimeter (a nonsense orbit).
  8. Draw the recommended constellation orbit.
    1. Draw circle ConstellationOrbit with center KerbinCenter, radius radius[ConstellationUpperLimit-1], and direction zAxis.
  9. Draw the area of uninterrupted coverage. 
    1. Calculate the positions of a pair of adjacent sats on the orbit.
      1. Plot point CoverageHelper1 as intersect of KSCWindowRay1 and ConstellationOrbit.
      2. Plot point CoverageHelper2 as intersect of KSCWindowRay2 and ConstellationOrbit.
    2. Draw segment ConstantCoverageRHelper between CoverageHelper1 and CoverageHelper2.
    3. Variable ConstantCoverageR is distance between KerbinCenter and the intersect of ConstantCoverageRHelper and the xAxis. (torus major radius)
    4. Variable ConstantCoverager is one leg of a right triangle with hypotenuse equal to AntennaRange and other leg equal to length[ConstantCoverageRHelper], use Pythagorean Theorem and solve for one leg. (torus minor radius)
    5. Build the torus.
      1. Vertical portion of wireframe:
        1. Draw initial circle with center as the intersect of ConstantCoverageRHelper and the xAxis, radius ConstantCoverager, and direction yAxis.
        2. Rotate the previous circle made (start with the initial circle) about the zAxis by (360/32) degrees.
      2. Horizontal portion of wireframe:
        1. Draw circle with center KerbinCenter, radius ConstantCoverageR+ConstantCoverager, and direction zAxis. (outer equatorial circle)
        2. Draw circle with center KerbinCenter, point on perimeter (ConstantCoverageR-ConstantCoverager,0,0), and direction zAxis. (inner equatorial circle, using a point with the radius as the x-coordinate prevents the circle from being undefined for a spindle torus, where majorradius-minorradius is negative)
        3. Draw circle around the z-axis with point (ConstantCoverageR,0,ConstantCoverager) on the perimeter (highest circle)
        4. Draw circle around the z-axis with point (ConstantCoverageR,0,-ConstantCoverager) on the perimeter (lowest circle)
        5. Draw 4 circles around the z-axis. Use the 45-45-90 triangle ratios to make the math simpler, thus, add or subtract ConstantCoverageR and ConstantCoverager/sqrt(2) to get X-coordinate, and use +-ConstantCoverager/sqrt(2) as the Z-coordinate. Therefore: 
          1. First circle has point (ConstantCoverager / sqrt(2) + ConstantCoverageR, 0, ConstantCoverager / sqrt(2)) on perimeter. (Add to x-coordinate, positive Z)
          2. Second circle has point (-ConstantCoverager / sqrt(2) + ConstantCoverageR, 0, ConstantCoverager / sqrt(2)) on perimeter. (Subtract from x-coordinate, positive Z)
          3. Third circle has point (ConstantCoverager / sqrt(2) + ConstantCoverageR, 0, -ConstantCoverager / sqrt(2)) on perimeter. (Add to x-coordinate, negative Z)
          4. Fourth circle has point (ConstantCoverager / sqrt(2) + ConstantCoverageR, 0, ConstantCoverager / sqrt(2)) on perimeter. (Subtract from x-coordinate, negative Z)
    6. Compute numerical output
      1. Display antenna range - put AntennaRange*100 into a text object
      2. Display altitude above the poles to which the torus extends
        1. Point PolarLimitHelper is the intersect of any two vertical torus segments
        2. Distance from PolarLimitHelper to Kerbin's center, minus 6
        3. Multiply that by 100, put it in a text object
      3. Display ConstellationOrbit parameters. Radius[ConstellationOrbit]*100, in kilometers.
      4. Calculate latitude of polar shadow.
        1. Find the angle for a right triangle of hypotenuse = radius[ConstellationOrbit] and adjacent side = 6.
        2. Multiply by 180/pi to convert to degrees.
        3. Display as text object (variable name LatBlackout)
      5. Display torus parameters for external recreation:
        1. Major axis == ConstantCoverageR*100 km.
        2. Minor axis == ConstantCoverager*100 km.

KNOWN ISSUES:

  • Selecting neither connection requirement results in a nonsensical orbit.
  • Minimum orbit does not respect intersat connection requirement checkbox.
  • My torus sucks.
  • Missing "impossible orbit" checks. (inside the atmosphere, in an area swept by the Mun's or Minmus' SOI, etc.)
  • Latitude of polar shadow is given as degrees north (it's both poles) and simply uses "?"  if the coverage zone does not actually intersect Kerbin.
  • Polar shadow calculations don't care if the constellation is actually in range of Kerbin's surface.

TO-DO:

  • Fix the known issues.
  • Allow adjustment of the placement of the constellation within the upper and lower bounds. Right now, it places the constellation 100km inside the upper bound.
  • Make the antenna range input in either kilometers or megameters.
  • Draw the polar shadows of Kerbin. Right now, all it has is the latitude N or S above which there is no ground coverage.
  • Add an option to show the calculation objects.
  • Upload the version of this that matches the description of how it works.
  • Add pictures.

GEOGEBRA SOFTWARE LINKS:

GeoGebra main page - Download GeoGebra - GeoGebra License - About GeoGebra

GeoGebra user manual (more like a wiki)

LICENSE (because forum rules):

I did not make GeoGebra. I also did not invent math. All data related to the game and the mod came from the KSP Wiki and the RemoteTech website.

What part of this I do hold the rights to is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Creative Commons License

Have fun!

Edited by DaMachinator
Updated to v0.3. Older versions no longer available.
Link to comment
Share on other sites

Sweet!!

Between THIS mod/webapp, and THIS one, they make an awesome combination... The main thing I find lacking, and have been wishing for on the other one, is a 3d representation of the coverage torus... I like how yours also has the polar shadow/ground coverage limit... :)

THANK YOU!! :D

Link to comment
Share on other sites

6 hours ago, Stone Blue said:

Sweet!!

Between THIS mod/webapp, and THIS one, they make an awesome combination... The main thing I find lacking, and have been wishing for on the other one, is a 3d representation of the coverage torus... I like how yours also has the polar shadow/ground coverage limit... :)

THANK YOU!! :D

You're welcome!

Right now this one somewhat arbitrarily decides where to put the constellation.  I plan to fix that soon. Also GeoGebra is not great for data readouts. 

I'll probably make the constellation placement independent of the bounds, and include an option to draw another torus showing the area of intermittent coverage. 

I'd also like to include support for constellations in polar orbits. 

Getting the latitude for the ground coverage was the hardest part to figure out. I'm glad you like it. Eventually I'll actually draw a cone there, or at least the apex of the polar shadow cone. 

Link to comment
Share on other sites

  • 1 month later...

Cant BELIEVE this mod hasnt gotten more love...???

Unfortunately, I havent been playing KSP hardly AT ALL, since 1.1.0 dropped, so I havent been able to use it hardly at all, nor does it look like I will be playing much in the near future, so i cant say I'd be able to give useable feedback... :(

 

Link to comment
Share on other sites

Just to clear things up:

This is not a KSP mod, it is an external tool to assist in the placement of commsat relays.

I don't know how AntennaRange works, but you should be able to use it for that too.

Works best in conjunction with an autopilot (MechJeb 2, kOS) and the Visual RemoteTech Planner by @ryohpops.

Edited by DaMachinator
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...