Jump to content

Atmospheric Pe Changes on Flight Scene Load


Recommended Posts

This could be a stock issue, but I'm filing this report with a lot of mods so placing it here for now.

I have an asteroid that was spawned on a Kerbin intercept trajectory that takes it 16.97972km (as reported by KSPTOT) into Kerbin's atmosphere. This shows up in the tracking station properly as 16.980km when I check its Periapse. However when I load the asteroid in the flight scene the Pe is now 16.977km - consistently. I ran the following steps three times (requires Kerbal Alarm Clock to visit the asteroid):

  1. Load this save file
  2. Go to the Tracking Station
  3. Select the asteroid and confirm Pe 16,980m
  4. Timewarp to the alarm
  5. Select the option to jump to the asteroid
  6. After loading is finished, enter the map view and check Pe is 16,977m
  7. Press Esc & return to Space Center
  8. Repeat from #1

Now, I'm using a mod to get to the asteroid - Kerbal Alarm Clock lets you get to an asteroid when the game doesn't - so that could be the cause of the issue. To help rule this out, I transferred the orbital properties of the asteroid to a piece of debris and repeated the process with that. Its Pe did not change:

  1. Load this save file
  2. Go to the Tracking Station
  3. Select the debris and confirm Pe 16.980m
  4. Timewarp to the alarm
  5. Close the alarm notification
  6. Select the debris
  7. Click "Add" to create a new alarm in KAC
  8. Select "Raw TIme Alarm"
  9. Set all fields to 0 & create the alarm, which will instantly ask you to jump to the vessel
  10. Jump to vessel, switch to map view and Pe should still be 16,980m

This still isn't a 100% guarantee that KAC isn't doing something different when it loads an asteroid, but if we consider an asteroid to be a generic game object there's no reason why KAC should be loading it differently than an object that is identified as type "Debris".

This issue of the Pe changing on load has a different effect depending on what mods are installed. Here are the results of my investigations - each instance has been loaded & test 3 times in a row :

in ALL instances: 16.980km Pe in Tracking Station

Stock + KAC: 16.977km | 16.977km | 16.977km Pe in flight
Stock + KAC + Module Manager + Persistent Rotation: 17.395km | 17.398km | 17.397km Pe in flight
Stock + KAC + Module Manager + Asteroid Recycling Technologies: 16.973km | 16.973km | 16.973km Pe in flight
Stock + KAC + Module Manager + Kopernicus + Modular Flight Integrator: 16.977km | 16.977km | 16.977km Pe in flight

Now here is something interesting. Using the last configuration above with Kopernicus, if I include this patch:

@Body[Kerbin]
{
  @Properties
  {
    // return Kerbin to old pre-v1.0.5 rotation period
    %rotationPeriod = 21651
  }
}

Then all three times I loaded into the flight scene the Pe was 16.979km. When I also installed Vessel Orbital Information Display I can see the Pe flip after the asteroid finishes loading:

Pe2bMFY.gif

It does this for all instances I tested.

So, that's it for now. I don't really know what conclusions to draw from all this right now, maybe because it's 2am and I've been looking into this for the past few hours now. And I just said "now" in the last three sentences. Maybe I should go to bed now. (But of course I'm not gunna cause I wanna see if this rock gets captured after aerobraking!)

Edited by Drew Kerman
Link to comment
Share on other sites

The orbital data with the asteroid in that savegame (SMA = -62370614.5606016, ECC = 1.00989215399152) allow to compute Pe = SMA*(1-ECC) = 616979.723778947, or (given Kerbin's radius = 600,000 m) a Pe altitude ASL = 16979.723778947. Which is totally consistent with KSPTOT and (rounded) with the Tracking station (unmodded) and VOID. The rotation period of Kerbin doesn't change the above (would only if Pe altitude was measured AGL instead of ASL, and terrain altitude changed at the Pe because of the different rotation).

However, when a vessel goes off rails (loaded in the scene) its positional data is updated based on time and velocity vector. The process may easily bring to differences just because of the accuracy of the data. Can only guess at what may happen with add-ons, but should those affect any of the data required (positional vector, velocity vector, frame timing interval) the difference would come evident.

Anyway, would be best to check with a saved game after having switched scene to the asteroid. SMA and ECC shouldn't change at all while off-rails when no external forces act on a vessel; but if they did then it would be a confirmation the orbit changed.

The only thing that could actually bring to a difference of Pe altitude in reality would be to compute atmospheric drag (though believe none of the add-ons you mentioned do). And when atmospheric drag is considered, a difference could be due to the rotation of the asteroid itself because of the Magnus effect.

Link to comment
Share on other sites

thx @diomedea it looks like Persistent Rotation was the major culprit and an update today made things much better, I still see a small change on the order of meters even when Persistent Rotation is not installed, but nothing on the order of several Km or Mm of change anymore, so I can chalk that up to precision problems

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...