Jump to content

[Excel] KOMET (Kerbal Orrery and Maneuver Evaluation Tool (ver. 0.4 2019-09-25)


Recommended Posts

pB2K4WP.png

Update 2019/09/25: Version 0.4 is available! Download it here!

Changelog:

Spoiler
Version Date Comments
0.4 2019-09-25 Broke UpdateSegment() sub into SetUpSegment() (for sheet setup tasks) and SimulateSegment() (for time evolution calcs and updating of "Orbit Map" charts)
Added min safe altitude (either atmosphere height or highest peak) line and body name to chart on "Segment X" sheets    
Removed hard-coded row numbers from chart management lines of SetUpSegment() and SimulateSegment()    
Added arrow heads and tails to maps on "Segment X" sheets    
Added functionality for capture by a sister body    
Re-coded PosVeltoOrbElms() to a corrected version using vector math (previous version did not correctly calculate LPe)    
Modified the layout of the information section on "Orbit Map" sheet and updated code accordingly    
Modified the layout of "Segment Summary" sheet to include the number of orbits in each segment   
0.3 2019-02-22 Switched revision history listing to newest-to-oldest    
Fixed bug where ending time step of segment wasn't calculated…again, but better    
Changed behavior of KepEll() during interim steps where calculated E > pi; previous implementation failed at high e values    
Removed global variables from SegmentSubs module to allow sequential calls    
Created functions and subs to derive orbital elements from position and velocity vectors and to get behavior at end of a segment    
Transitioned from transferring variables using variant arrays to custom data types    
Created logic for drawing arrow heads/tails; test implementation of arrow heads on segment sheet orbit maps    
Re-worked automatic show/hide of features (surfaces, orbits, names, etc.) based on zoom level    
Implemented PropogateOrbits() subroutine for sequential orbit segments; updated several ManeuverControl subs accordingly.    
    Works for outward (escape) trajectories only.
0.2 2018-12-06 Added revision history    
Changed to using segment-sheet-calculated secondary orbit elements instead of passed variables; removed from summary    
Implemented data on "Body Info" sheet as formulas rather than static values    
Removed duplicate time variables from segment subs    
Fixed bug where ending time step of segment wasn't calculated    
Fixed bugs in orbit plots on segment sheets    
Function "CSUN" renamed to "KepEll" to reduce confusion    
Added "TEST" sheet for sandbox testing of functions, concepts, etc.    
Parabolic and hyperbolic trajectories implemented    
Added a macro to re-plot everything and reduce the number of necessary body plot series from 50 to 20    
Hid rows in "Body Info" sheet to prevent needless scrolling   
0.1 2018-10-16 Initial release

 

WELCOME TO KOMET! Or, Yet Another Third-Party Orbit Simulation! They seem to be pretty popular.

KOMET is a simulation of the Kerbal solar system implemented in Microsoft Excel 2016. I wrote it to help me plan my missions better. Specifically, I wanted three things:

  • Orthographic views. Since KSP is a game, it makes sense that there is a perspective view in map mode. But I find perspective makes it more difficult to see what's going on in the big picture. KOMET displays orbits in three orthographic views instead, like an engineering drawing.
  • Views of SOI. I still get surprised when I make an encounter with...well, pretty near anything. KOMET draws the spheres of influence around all bodies so you have some idea how precise you need to be with your orbits.
  • Time control. The maneuver node system is very useful, but it has some limitations for several orbit segments ahead; and of course you can't see your past track at all. KOMET allows you to view the state of the system at any arbitrary time.

Here's a comparison of KOMET and the in-game map:

tzmuJAN.png

In addition to showing you the state of the solar system, KOMET allows you to enter a user-defined orbit and follow the position of that object through time. As of version 0.4, both escapes to a higher SOI and captures by another body within the same SOI are simulated. Please see the Readme tab for more details on current limitations.

zoJVipJ.png

KOMET is implemented in Microsoft Excel 2016, and is not guaranteed to work in earlier versions of Excel. This spreadsheet also relies heavily on macros and user-defined functions. You will need to enable these in order to interact with the tool. For those of you who are wary of macros in files you get from a stranger (and good on you for that!), Excel will disable macros unless you press the "Enable Macros" button when you open it, or place it in a Trusted Location. I encourage you to open the macro editor (Alt+F11) to inspect the code. The code is found in three places:

  • Forms: Right-click on any form and select "View Code" to see what makes that form tick.
  • Modules: Double-click any module. This is where more general-purpose code goes.
  • ThisWorkbook: Double-click this object. A short code snippet is here which controls what happens when you select different tabs.

Download KOMET here.

KOMET is licensed under the BSD 3-Clause License.

Spoiler

Copyright 2019 D.A.Bender

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Hope you enjoy, and don't forget to leave feedback!

- Dan B. (pincushionman)

Edited by pincushionman
version 0.4 release
Link to post
Share on other sites

Version 0.2 is now available at the download link.

Parabolic and hyperbolic trajectories are now implemented, and a number of important subroutines and functions have been updated to support arbitrary orbit depth. See the changelog or the readme for more details. Patched-conic propagation is not yet implemented.

In other news, if anyone knows which version the switch from g = 9.81 to g = 9.80665 m/s^2 was made, please let me know.

Link to post
Share on other sites
  • 2 months later...

Version 0.4 is now available! Download it here!

Capture by other bodies within the same SOI is now implemented!

Do note that I have been unable to match the behavior of the KSP simulation precisely with regards to captures, even for a small system like the Jool sub-system. There may be several factors at play, which I will investigate further before the next release. However, I have also been unable to set a precise orbit repeatably in-game using either HyperEdit or the F12 cheat menu, so it may be that the best that an Excel simulation can accomplish is a "close enough" answer. The next release will focus on adding maneuvers to the user-defined orbit, which will allow the user to iron out any errors in the KOMET simulation, regardless of their sources.

Link to post
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...