Skip to content

Instantly share code, notes, and snippets.

@yuasatakayuki
yuasatakayuki / the_open_source_space_project.md
Created February 15, 2016 03:48
The open-source SpaceWire project

Overview

SpaceWire is the standard data transfer and network interface which is standardized as ECSS-E-ST-50-12C lead by the European Space Agency (ESA). RMAP is a short for Remote Memory Access Protocol which is the standardized data transfer protocol over SpaceWire (ECSS-E-ST-50-52C).

@yuasatakayuki
yuasatakayuki / open_source_spacewire_rmap_ip_cores.md
Created February 15, 2016 03:41
Open-source SpaceWire and SpaceWire-RMAP IP Cores
@yuasatakayuki
yuasatakayuki / use_ruby_wrapper_of_spacewire_rmap_library.md
Last active February 15, 2016 01:38
User Ruby wrapper of SpaceWire/RMAP Library

Now users can use basic SpaceWire and RMAP functionalities of the library in the Ruby scripting language. Scripting capability allows developers to quickly iterate try-and-error loops on, for example, new SpaceWire device without compiling a test program.

The SWIG wrapper is already included in the Github repository of SpaceWire RMAP Library, and existing users can pull it by executing:

@yuasatakayuki
yuasatakayuki / flowchart_sample.html
Created January 28, 2016 12:27
テキスト形式でフローチャートを作図する例 - flowchart.js
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
<script src="raphael-min.js"></script>
<script src="flowchart-latest.js"></script>
@yuasatakayuki
yuasatakayuki / calculate_fermi_energy_of_white_dwarf.rb
Created January 20, 2016 10:55
Calculates Fermi energy of a white dwarf star using ruby-dimensional module
#!/usr/bin/env ruby
# Calculates the Fermi energy and temperature of a typical white dwarf star.
require "ruby-dimensional-standard"
require "ruby-dimensional-physics"
#define constants
G=Physics::Constant::GravitationalConstant
Msun=Physics::Constant::Msun
@yuasatakayuki
yuasatakayuki / conver_fits_to_csv.rb
Created January 20, 2016 09:20
a short example of FITS Table HDU read access using RubyFits
#!/usr/bin/ruby
# This script dumps data contained in a FITS Table HDU into a CSV file using RubyFits.
# Usage:
# ruby conver_fits_to_csv.rb FITS_FILE
# Output:
# - Header: FITS_FILE_n_header_HDU_NAME
# - Data : FITS_FILE_n_data_HDU_NAME
# (n is HDU index)
@yuasatakayuki
yuasatakayuki / read_and_fit_histogram.rb
Last active August 29, 2015 14:23
RubyROOT example: fill histogram then fit with gaussian+pol1
require "RubyROOT"
include Root
include RootApp
inputFile="histogram_sample.data"
outputPDFFile="histogram_sample.pdf"
#create an instance of histogram
hist=TH1D.create("hist","Histogram",512,0,512)
@yuasatakayuki
yuasatakayuki / read_mcp3208.c
Created June 5, 2015 09:05
AD conversion using MCP3208 on Raspberry Pi convers
/*
* Before running this program, execute the following initialization command:
* > gpio load spi
*
* Expected result:
* > pi@raspberrypi:~$ ./read_mcp3208
*
* wiringPiSPISetup status = 3
* wiringPiSPIDataRW status = 3
* data[0]=00
@yuasatakayuki
yuasatakayuki / CMakeLists.txt
Last active August 29, 2015 14:19
CMakeLists.txt for sllib
#---------------------------------------------
# CMakeLists.txt for sllib
#---------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
SET(CMAKE_C_FLAGS_RELEASE "-Wall -O3")
SET(CMAKE_C_FLAGS_DEBUG "-g")
SET(CMAKE_BUILD_TYPE Release)
@yuasatakayuki
yuasatakayuki / CMakeLists.txt
Last active August 29, 2015 14:19
CMakeLists.txt for sfitsio
#---------------------------------------------
# CMakeLists.txt for sfitsio
#---------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
SET(CMAKE_C_FLAGS_RELEASE "-Wall -O3")
SET(CMAKE_C_FLAGS_DEBUG "-g")
SET(CMAKE_BUILD_TYPE Release)