Skip to content

Instantly share code, notes, and snippets.

View HB-Stratos's full-sized avatar

HB-Stratos

  • Germany
  • 03:27 (UTC +02:00)
View GitHub Profile
@HB-Stratos
HB-Stratos / read_ardupilot_log_to_cached_dataframe.py
Created September 16, 2025 23:39
A python script that loads an ardupilot log (or a mavlog, use read_file = MavTLog), converts it to pandas dataframes and then saves these to files with parquet. This means for future runs of the program one doesn't have to run the ~2 minute log read, but can load the cache in ~3s.
import logging
from pathlib import Path
import numpy as np
import pandas as pd
from pymavlog import MavLog, MavTLog
from pymavlog.core import MavLinkMessageSeries
logger = logging.getLogger(__name__)

Writing Status: in progress

Afterburners and Heat Blur Rendering, a Study

This is a collection of years of research and information collection I have done, written with the hope it will be helpful specifically to the developers of KSA, but also to anyone else who might find this.

I will be going into detail on the intricacies of afterburner and heat blur, as well as possible ideas to render all of it for the purpose of a video game.

Afterburners (aka Reheat)

@HB-Stratos
HB-Stratos / OpenVSP-Python-API.md
Last active January 24, 2025 22:36
How to use the OpenVSP Python API

WRITING STATUS: Unfinished

How to use the OpenVSP Python API (Unofficial Beginners Guide)

This guide will attempt to teach you how to set up the OpenVSP Python API for automated airplane analysis from zero to extracting the VSPAERO solver data into python data structures. This is not a comprehensive guide of the API as there are several areas of it that I have not touched yet and therefore can't teach.

This guide also assumes you have some base knowledge of how to use OpenVSP through the GUI. Should you not have this knowledge yet, the OpenVSP Ground School is one of the best tutorial series for a program I have ever come across. You can find it here

Note

This guide was not written by an expert, just your everyday end user who learnt the API in a week for a university project. Do take everything said here with a grain of salt, though I do hope the content is useful. Thank you to Rob McDonald on the Google Group for answering my many questions while learning.

@HB-Stratos
HB-Stratos / HowToDecompileKsp.md
Last active October 5, 2025 02:26
A guide on how to decompile Kerbal Space Program for modding.

Decompiling KSP is technically against the Take2 EULA, but having the KSP Code to reference is an invaluable tool for modding. Hence it's been a bit of an open secret that modders decompile the game to help inform their mod writing. Sadly, nobody has ever fully captured how this is done, so this is what I intend to do here. If you wish to read the Take2 Eula before following this guide, you can find it here.

Notes on Legality

Preface: I am not a lawyer, this is not legal advice, etc. From the research I have done on the topic, I have been able to gather this:

In US and EU legislature it is legal to decompile any program regardless of license restrictions if the purpose of the decompilation is done to enable interoperability (ref1). In the case of KSP I would say this is not given as KSP does provide a public interfac

@HB-Stratos
HB-Stratos / HowToModKsp.md
Last active October 5, 2025 02:26
A guide on how to set up Visual Studio for Kerbal Space Program mod development.

This guide has been moved to the official KSP Modding Libs Wiki, where it is maintained. This guide will not be maintained. https://github.com/KSPModdingLibs/KSPModdingWiki/wiki/Creating-a-new-Plugin-Mod-on-Windows

How to Mod KSP in 2024

I am not a mod developer, I am just starting out. I got a lot of help, and I'm writing this as a mental note for myself, as well as a hopefully correct guide for others who may want to start with KSP mod developement.

1. Installing Visual Studio Community 2022

@HB-Stratos
HB-Stratos / postprocessor.py
Created July 2, 2024 00:36
A gcode post processor to increase the extra restart distance based on travel time. currently quite messy, and does not account for acceleration of the printherad
from dataclasses import dataclass
import dataclasses
from collections import namedtuple
import math
import re
#I apologize for the mess of camelcase and underscores
gcode_file_name = "Soldering Jig_0.2mm_LW-PLA_I3MEGA_1h37m.gcode"
gcode_file = open(gcode_file_name, "r")