Skip to content

Instantly share code, notes, and snippets.

View amyinorbit's full-sized avatar

Amy Parent amyinorbit

View GitHub Profile
@amyinorbit
amyinorbit / mf-syntax.md
Last active April 16, 2025 13:42
Mobiflight config and command reverse-engineering

Mobiflight config and command reverse-engineering

Config Types:

0   NotSet
1   Button
2   Encoder (single detent)
3   Output
4   Led Module (deprecated)
@amyinorbit
amyinorbit / xpdata.c
Created March 23, 2025 12:58
Thread-safe data access in X-Plane
/*===--------------------------------------------------------------------------------------------===
* xpdata.c
*
* Created by Amy Parent <[email protected]>
* Copyright (c) 2025 Amy Parent. All rights reserved
*
* Licensed under the MIT License
*===--------------------------------------------------------------------------------------------===
*/
#include "xpdata.h"
@amyinorbit
amyinorbit / nav_utils.c
Last active February 17, 2022 11:13
Basic functions needed to compute along- and cross-track error, using acfutils
//===--------------------------------------------------------------------------------------------===
// nav_utils.c - navigation utilities using acfutils
//
// Created by Amy Parent <[email protected]>
// Copyright (c) 2022 Amy Parent
// Licensed under the MIT License
//===--------------------------------------------------------------------------------------------===
#include <acfutils/geom.h>
#include <acfutils/assert.h>
//
// main.cpp
// formatter
//
// Created by Amy Parent on 12/10/2019.
// Copyright © 2019 Amy Parent. All rights reserved.
//
#include <iostream>
#include <fstream>
@amyinorbit
amyinorbit / crew_dragon_reentry.py
Created March 6, 2019 22:17
Basic 2D simulation of lifting body spacecraft reentry
#!/usr/bin/env python3
import numpy as np
from matplotlib import pyplot as plt
import matplotlib
### 130m/s deorbit burn from a 410km*410km orbit ###
#
# periapsis: -31.87 km
# speed at EI: 7870.71 m/s
#!/usr/bin/env python3
import numpy as np
from matplotlib import pyplot as plt
# Parachute data:
# http://www.laboratoridenvol.com/space/gnusoyuz/gnusoyuz.en.html
#
# Timings
# http://russianspaceweb.com/soyuz-ms-10.html#scenario
@amyinorbit
amyinorbit / orbit_stringpool_1.c
Created April 22, 2018 21:21
Naive, 20-minute string pool for the orbit compiler. Probably needs better indexing than what is currently implemented
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
typedef uint32_t StringID;
typedef struct _String String;
typedef struct _StringPool StringPool;
@amyinorbit
amyinorbit / test.orbit
Last active September 28, 2017 15:41
Orbit AST Tests
fun fibonacci(n: Number) -> Number {
if n < 2 {
return 1
}
return fibonacci(n-2) + fibonacci(n-1)
}
fun main() -> Void {
print("OrbitVM running on " + System.getOS())
print("Fibonacci demo:")
@amyinorbit
amyinorbit / wpa_supplicant.conf
Last active September 15, 2017 18:20
Abertay Eduroam RPi WiFi Config
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="eduroam"
key_mgmt=WPA-EAP
identity="ABERTAY STUDENT NO"
password="ABERTAY PASSWORD"
@amyinorbit
amyinorbit / new_shepard.ks
Created August 21, 2016 10:38
(badly commented and organised) autopilot code for New Shepard - Style landing in KSP
declare function neutral {
return ship:mass*9.81 / ship:availablethrust.
}
declare function limits {
declare parameter value.
return min(max(value, 0), 1.0).
}
declare function steer_iip {