Skip to content

Instantly share code, notes, and snippets.

View cadojo's full-sized avatar

Joe(y) Carpinelli cadojo

View GitHub Profile
@cadojo
cadojo / escape.c
Created July 15, 2023 16:19
Escaping Octal Numbers in C
#include <stdio.h>
/**
* It looks like you can produce integers by escaping octal numbers.
* What's happening when you exceed the bounds of an octal digit, i.e.
* '\8' or '\9'?
**/
int main(void) {
@cadojo
cadojo / intersections.jl
Created September 27, 2021 03:23 — forked from mforets/intersections.jl
Intersection of trajectories
using Plots
using Unitful
using DifferentialEquations
using GeneralAstrodynamics
using LazySets
# Find a periodic orbit near Earth (orbit, period)
Oₑ, Pₑ = halo(SunEarth; Az=100_000u"km", L=2)
# Find a periodic orbit near Jupiter (orbit, period)
@cadojo
cadojo / fetch_ephemeris.sh
Last active April 5, 2021 22:47
Fetch Ephemeris from JPL Horizons
#!/usr/bin/sh
#
# Fetch JPL Horizons ephemeris files for all
# of the ~popular~ solar system bodies
#
# Requirements: UNIX system, expect, inetutils, moreutils, sponge
# If you have a Windows system, check out the Windows Subsystem for Linux!
#
# Usage:
# 1) Download ftp://ssd.jpl.nasa.gov/pub/ssd/SCRIPTS/vec_tbl
@cadojo
cadojo / Planar Launch State Equations.ipynb
Last active July 8, 2020 10:13
Planar Launch State Equations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.