Search the Community
Showing results for tags 'coordinates'.
The search index is currently processing. Current results may not be complete.
-
Hello, I'm attempting to draw custom orbit lines and place objects in the Tracking Station view. I'm trying to retrieve the position on a orbit from a true anomaly. However, I'm coming accross weird position calculations when using the Orbit.getPosition functions and custom true anomalies values. I saw a similar issue in this post, but it doesn't provide an explanation or solution to the problem: I've setted up this bit of code to debug what's going on, which runs on the first frame when entering the Tracking Station. It first compares positions calculated using UT and an offsetted UT. Then it compares the positions by modifying the true anomaly angle with a small offset. I made a small analysis of the results below. Logger.Log("MODIFYING UT:"); double ut = Planetarium.GetUniversalTime(); Logger.Log("UT: " + ut); double trueAnom1 = kerbin.orbit.TrueAnomalyAtUT(ut); double trueAnom2 = kerbin.orbit.TrueAnomalyAtUT(ut + 1); // +1 second Logger.Log("True Anom 1: " + trueAnom1); Logger.Log("True Anom 2: " + trueAnom2); Vector3d localPos1 = kerbin.orbit.getPositionFromTrueAnomaly(trueAnom1); Vector3d localPos2 = kerbin.orbit.getPositionFromTrueAnomaly(trueAnom2); Logger.Log("Local Pos 1: " + localPos1); Logger.Log("Local Pos 2: " + localPos2); Vector3d scaledPos1 = ScaledSpace.LocalToScaledSpace(localPos1); Vector3d scaledPos2 = ScaledSpace.LocalToScaledSpace(localPos2); Logger.Log("Scaled Pos 1: " + scaledPos1); Logger.Log("Scaled Pos 2: " + scaledPos2); Logger.Log("Local Positions Distance: " + (localPos1 - localPos2).magnitude); Logger.Log("Scaled Positions Distance: " + (scaledPos1 - scaledPos2).magnitude); Logger.Log("MODIFYING TRUE ANOMALY:"); ut = Planetarium.GetUniversalTime(); Logger.Log("UT: " + ut); trueAnom1 = kerbin.orbit.TrueAnomalyAtUT(ut); trueAnom2 = trueAnom1 + 0.001; // 0.001 offset angle in radians (= 0.05729578°) Logger.Log("True Anom 1: " + trueAnom1); Logger.Log("True Anom 2: " + trueAnom2); localPos1 = kerbin.orbit.getPositionFromTrueAnomaly(trueAnom1); localPos2 = kerbin.orbit.getPositionFromTrueAnomaly(trueAnom2); Logger.Log("Local Pos 1: " + localPos1); Logger.Log("Local Pos 2: " + localPos2); scaledPos1 = ScaledSpace.LocalToScaledSpace(localPos1); scaledPos2 = ScaledSpace.LocalToScaledSpace(localPos2); Logger.Log("Scaled Pos 1: " + scaledPos1); Logger.Log("Scaled Pos 2: " + scaledPos2); Logger.Log("Local Positions Distance: " + (localPos1 - localPos2).magnitude); Logger.Log("Scaled Positions Distance: " + (scaledPos1 - scaledPos2).magnitude); (Logger.Log is a custom wrapper around Debug.Log) Here are the results: MODIFYING UT: UT: 135842917.592889 True Anom 1: 1.63107920616794 True Anom 2: 1.63107988885983 Local Pos 1: [493910.75, 1014.90991210938, -340737.9375] Local Pos 2: [501845.514609337, 1014.90991210938, -335916.997343063] Scaled Pos 1: [82.3098468153844, 0.269453518842612, -56.9360563766938] Scaled Pos 2: [83.6323075694434, 0.269453518842612, -56.1325663591432] Local Positions Distance: 9284.500708296 Scaled Positions Distance: 1.54741676814283 MODIFYING TRUE ANOMALY: UT: 135842917.592889 True Anom 1: 1.63107920616794 True Anom 2: 1.63207920616794 Local Pos 1: [493910.75, 1014.90991210938, -340737.9375] Local Pos 2: [12113141.2240677, 1014.90991210938, 6726731.39502716] Scaled Pos 1: [82.3098468153844, 0.269453518842612, -56.9360563766938] Scaled Pos 2: [2018.84823841927, 0.269453518842612, 1120.97548642882] Local Positions Distance: 13599839.6893388 Scaled Positions Distance: 2266.63992394695 First test (modifying the UT) : In the first comparison, I'm calculating the true anomalies using the built in TrueAnomalyAtUT function at two different dates : the current UT and that same time but 1 second in the future. As you can see, the positions seem close enough both in local space and scaled space. Morover, the distance of about 9284 meters between the two position matches the distance Kerbin would travel in 1 second, based on its orbital velocity which is 9285 m/s (according to the wiki: https://wiki.kerbalspaceprogram.com/wiki/Kerbin). Note also that the scaled position calculated at the current UT matches the coordinates of kerbin.scaledBody.transform.position (not shown here, but tested). However, the magnitude of the position vector (in local space) is about 60000 m, which doesn't seem to match Kerbin's orbit semi major axis of 13 599 840 256 m (according to the wiki). I thought intuitively that the origin of the world (= local space ?) coordinates would be where the Sun is, but it can't be according to these values. Where is the origin of the world ? Am I missing something in how the local space works ? I also find a bit curious that the distance traveled in the scaled space is about 1 unit. The magnitude of the position vector in scaled space (according to these logs) is about 100 units. So that means that Kerbin would have moved of 1/10th of its "position magnitude" in one second in the Tracking Station view... which clearly isn't the case. We don't see any bodies moving that much in just 1 second (they look pretty still). Second test (modifying the true anomaly) : Now the second comparison. I first compute the true anomaly at the current UT, and the position at this true anomaly using getPositionFromTrueAnomaly. Then I compute another position but with a true anomaly offsetted of only 0.001 radians, which corresponds to about 0.06 degrees. I expect to have very close coordinates, but as you can see, it's complete nonsense. The position calculated from the true anomaly at the current UT looks correct (same as in first test). But the positions calculated at the offseted anomaly makes no sense. Except the y-coordinate, the xz-coordinates are different from the first position by several orders of magnitude (not mentioning the sign change on the z-component). The scaled coordinates doesn't make sense either. The distance between the two positions is about 13 600 km for a 0.06 degrees difference in the true anomaly, and in scaled space it's about 2300 units. Something is obviously wrong and I can't figure out what. I want to draw custom orbit lines and I've looked through the source code of other mods (the DrawTools class in Kopernicus: https://github.com/Kopernicus/Kopernicus/blob/755ab1e3a5cf73e44e033be12906693f9564ceaa/src/Kopernicus/Components/DrawTools.cs) and they don't seem to do anything different from me except using the eccentric anomaly (I tried it, and I get the same problems). What am I missing ? Am I misunderstanding how local space / scaled space work ? (another post I made related to Tracking Station positioning problems : Thank you very much in advance for any help !
-
A Comprehensive List of the Lowest & Highest Geographical Locations & Altitudes for Celestial Bodies Below are charts locating the lowest and highest locations with their respective altitudes for bodies regularly featured in KSP in the Lat/Long = Degrees, Minute, Seconds and Decimal Degrees format. Why are these locations useful...? I don't know, it's just interesting, right? This information is not typically listed and/or can sometimes not be readily available so its nice to have it collated in one place. Stock + OPM System Body Lowest Point Highest Point DMS Decimal Altitude DMS Decimal Altitude Moho LAT = 19° 38' 13" S LON = 166° 14' 31" W LAT = -19.637 LON = -166.242 ALT = 29m LAT = 54° 40' 55" N LON = 153° 28' 23" E LAT = 54.682 LON = 153.473 ALT = 6818m Eve LAT = 40° 05' 13" N LON = 14° 44' 20" W LAT = 40.087 LON = -14.739 ALT = -1866m LAT = 24° 59' 42" S LON = 158° 28' 30" W LAT = -24.995 LON = -158.475 ALT = 7541m Gilly LAT = 56° 47' 31" N LON = 7° 15' 00" W LAT = 56.792 LON = -7.25 ALT = 1494m LAT = 29° 14' 35" S LON = 123° 53' 20" W LAT = -29.243 LON = -123.889 ALT = 6401m Kerbin LAT = 27° 04' 30" S LON = 79° 00' 11" W LAT = -27.075 LON = -79.003 ALT = -1393m LAT = 61° 35' 46" N LON = 46° 21' 36" E LAT = 61.596 LON = 46.36 ALT = 6768m Mun LAT = 35° 20' 24" N LON = 76° 38' 17" W LAT = 35.34 LON = -76.638 ALT = -248m LAT = 82° 30' 14" S LON = 152° 18' 00" W LAT = -82.504 LON = -152.3 ALT = 7059m Minmus LAT = 0° 36' 00" S LON = 180° 06' 00" W LAT = -0.6 LON = -180.1 ALT = 0m LAT = 62° 56' 17" S LON = 74° 36' 58" E LAT = -62.938 LON = 74.616 ALT = 5724m Duna LAT = 6° 36' 18" S LON = 50° 12' 58" W LAT = -6.605 LON = -50.216 ALT = 127m LAT = 20° 53' 53" N LON = 106° 48' 04" W LAT = 20.898 LON = -106.801 ALT = 8268m Ike LAT = 14° 21' 40" S LON = 25° 28' 44" E LAT = -14.361 LON = 25.479 ALT = 73m LAT = 25° 15' 25" N LON = 178° 17' 24" E LAT = 25.257 LON = 178.29 ALT = 12738m Dres LAT = 19° 01' 08" N LON = 57° 09' 43" W LAT = 19.019 LON = -57.162 ALT = 25m LAT = 84° 58' 44" S LON = 42° 36' 36" E LAT = -84.979 LON = 42.61 ALT = 5670m Jool Laythe LAT = 29° 18' 50" N LON = 7° 19' 41" E LAT = 29.314 LON = 7.328 ALT = -2800m LAT = 17° 34' 41" S LON = 172° 34' 01" E LAT = -17.578 LON = 172.567 ALT = 6079m Vall LAT = 11° 38' 24" N LON = 145° 28' 52" E LAT = 11.64 LON = 145.481 ALT = -394m LAT = 18° 40' 55" S LON = 84° 12' 14" W LAT = -18.682 LON = -84.204 ALT = 7985m Tylo LAT = 14° 48' 40" N LON = 177° 42' 54" W LAT = 14.811 LON = -177.715 ALT = 1m LAT = 28° 52' 52" S LON = 171° 59' 53" W LAT = -28.881 LON = -171.998 ALT = 12904m Bop LAT = 37° 35' 17" N LON = 139° 16' 19" W LAT = 37.588 LON = -139.272 ALT = 2004m LAT = 23° 52' 52" N LON = 64° 34' 05" W LAT = 23.881 LON = -64.568 ALT = 21757m Pol LAT = 25° 07' 30" S LON = 173° 45' 40" E LAT = -25.125 LON = 173.761 ALT = 83m LAT = 62° 48' 47" S LON = 164° 33' 54" E LAT = -62.813 LON = 164.565 ALT = 4891m Eeloo LAT = 51° 34' 16" N LON = 33° 13' 34" W LAT = 51.571 LON = -33.226 ALT = -608m LAT = 24° 07' 19" N LON = 28° 23' 02" E LAT = 24.122 LON = 28.384 ALT = 3797m Sarnus Hale LAT = 54° 24' 18" N LON = 0° 40' 19" E LAT = 54.405 LON = 0.672 ALT = 1577m LAT = 56° 01' 48" N LON = 164° 05' 02" W LAT = 56.03 LON = -164.084 ALT = 5918m Ovok LAT = 76° 06' 47" S LON = 17° 13' 37" E LAT = -76.113 LON = 17.227 ALT = 0m LAT = 0° 10' 30" S LON = 91° 19' 05" W LAT = -0.175 LON = -91.318 ALT = 14000m Eeloo LAT = 51° 34' 16" N LON = 33° 13' 34" W LAT = 51.571 LON = -33.226 ALT = -608m LAT = 24° 07' 19" N LON = 28° 23' 02" E LAT = 24.122 LON = 28.384 ALT = 3797m Slate LAT = 76° 16' 37" S LON = 163° 20' 38" E LAT = -76.277 LON = 163.344 ALT = -1227m LAT = 3° 52' 01" N LON = 169° 42' 07" W LAT = 3.867 LON = -169.702 ALT = 16559m Tekto LAT = 20° 18' 11" S LON = 104° 34' 55" E LAT = -20.303 LON = 104.582 ALT = -631m LAT = 2° 42' 58" N LON = 143° 20' 13" E LAT = 2.716 LON = 143.337 ALT = 5954m Urlum Polta LAT = 52° 04' 05" S LON = 14° 43' 30" E LAT = -52.068 LON = 14.725 ALT = -466m LAT = 64° 20' 10" N LON = 88° 56' 42" W LAT = 64.336 LON = -88.945 ALT = 8835m Priax LAT = 24° 31' 30" S LON = 166° 12' 58" E LAT = -24.525 LON = 166.216 ALT = 8234m LAT = 4° 44' 10" S LON = 115° 01' 30" E LAT = -4.736 LON = 115.025 ALT = 30485m Wal LAT = 39° 13' 26" N LON = 106° 06' 54" E LAT = 39.224 LON = 106.115 ALT = -542m LAT = 2° 57' 36" S LON = 87° 11' 24" W LAT = -2.96 LON = -87.19 ALT = 20650m Tal LAT = 47° 48' 43" N LON = 152° 34' 41" E LAT = 47.812 LON = 152.578 ALT = -62m LAT = 51° 40' 19" N LON = 32° 13' 44" E LAT = 51.672 LON = 32.229 ALT = 11904m Neidon Thatmo LAT = 11° 14' 35" N LON = 79° 58' 55" W LAT = 11.243 LON = -79.982 ALT = -341m LAT = 50° 34' 59" N LON = 104° 05' 10" W LAT = 50.583 LON = -104.086 ALT = 4981m Nissee LAT = 56° 37' 08" S LON = 127° 21' 00" E LAT = -56.619 LON = 127.35 ALT = 1933m LAT = 9° 03' 43" N LON = 61° 25' 48" E LAT = 9.062 LON = 61.43 ALT = 9113m Plock LAT = 25° 54' 54" N LON = 121° 40' 52" E LAT = 25.915 LON = 121.681 ALT = -461m LAT = 46° 17' 46" N LON = 65° 47' 24" E LAT = 46.296 LON = 65.79 ALT = 3383m Karen LAT = 12° 28' 05" S LON = 34° 15' 18" E LAT = -12.468 LON = 34.255 ALT = -420m LAT = 3° 05' 46" S LON = 151° 50' 20" E LAT = -3.096 LON = 151.839 ALT = 4655m ------------------------ Big thanks to Sigma88 for the help in acquiring this information. If there are any errors, pointers, suggestions etc. please feel free to tell me.
- 29 replies
-
- 34
-
- altitude
- coordinates
-
(and 2 more)
Tagged with:
-
I just saw @Matt Lowne's video on landing a single-launch Dres Canyon base, and it got me thinking about new spots for my second surface base there. Can someone please send me the coordinates for the Dres canyon/s. I would also like a canyon landing spot that: Has a resource concentration of 5% or higher (my drills won't work at 2.5%, but I just want to be safe) Adequate landing space, especially for rovers/landing pods. It's kind of hard to tell what spots are canyons on Dres map view, and I don't want to risk getting too low if I decide to do a recon orbit (which can be very difficult to plan and time, not to mention costly). If anybody has some coordinates of the Dres Canyon/s, that'd be awesome. If you recommend NOT going in there, please send me the coordinates anyway so I know which spots to avoid - I'll put up a "DO NOT GO HERE" or "HAZARDOUS" waypoint.
- 7 replies
-
- dres canyon
- dres awareness
-
(and 3 more)
Tagged with:
-
hi,im looking for help using ksp coordinates. i need to know how to find the coordinates of a place i am not at so i can use the teleporting feature of hyperedit. any help is greatly appreciated
- 7 replies
-
- coordinates
- ksp
-
(and 1 more)
Tagged with:
-
So I made a rover and I would like to take it to the UFO on the Mun to see it for myself but I can't find any coordinates online, can someone help me?
- 2 replies
-
- ufo
- easter egg
-
(and 3 more)
Tagged with:
-
Hi. I use hyperedit which i'd prefer as a mod but i posted here anyway. i'd like the latitude, longitude and alt for a good mining area on minmus that's 10% or more. Please help me. I'm just a poor little kerbal =(
-
Is there any API call that given Ksp launch pad coordinates I can find the relative position for other celestial bodies? The reason is that if I am to plan a launch inclination (to intercept an asteroid for instance) I need to know to where in space launch pad is pointing at (it's normal vector ) and it's current angle related to the body/target I am interested. Any Ideas?
- 4 replies
-
- orbit
- coordinates
-
(and 1 more)
Tagged with:
-
(Please don't wonder about my english :D) Hi! I'm playing the Career-Mode in RSS (no RealismOverhaul). I want to land on Mercury, but everywhere I land there are mountains and hills and I cant land with my ship! Every time I topple down and thats why I can't fly home after landing. Do you know/Can you give me good coordinates to land? With no gradient and hills etc.? I tried 10 times to land but every landing failed. I watches videos on youtube and there is everywhere a flat area if they land. I think I have an another version of RSS and in real life there aren't very much flat areas on mercury. Thank you very very much for helping! Greetings, Daniel
-
Gentleman, does anyone know how to get x/y/z coordinates (regarding to part's CoM) of the closest and the farthest points that possible for the surface attach (in partmodule)? While in part i need to know this range about parent. also, what this means: part.partInfo.partSize; part.parent.partInfo.partSize; returns 2.12319183f for Mk1pod. what this figure means? but its size:diameter 1.25 and 1m tall Thanks for your time.