Skip to content

5. Added Value

Kyle Burge edited this page May 12, 2018 · 4 revisions

As it currently stands, all of the code that I've used for the demo was written by me. I've had quite a bit of experience prior to this working with Linux framebuffers, 3D projection and Arduinos which have proved to be particularly usefully for this project.

NAIF SPICE Database Code

My cspice_database/spice.c program was able to be written thanks to the great tutorials made publicly available by the NAIF.

For the SPICE library itself, please visit https://naif.jpl.nasa.gov/naif/toolkit.html

For SPICE documention, https://naif.jpl.nasa.gov/naif/documentation.html.

For SPICE Database Files, https://naif.jpl.nasa.gov/naif/data.html

And finally for the tutorials, https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/Lessons/

Raspberry Pi Display Code

Rendering to the display was a particularly fun bit of code to get working correctly. Given that Linux exposes every device as a simple file, I had to essentially write a file IO wrapper that wrote data directly to /dev/fb1, the LCD framebuffer. I was able to get this running a fairly moderate rate by resorting to large block memory writes to the file. I basically have a buffer in memory in which I perform my rendering and once it's time to update the display, I perform one enormous fwrite.

As far as general design of the display library goes, I've written it in a manner independent of the Raspberry Pi. The only things the library assumes is the size of the LCD display (480x320 pixels), the color depth/color encoding and the presence of a framebuffer device on /dev/fb1.

Clone this wiki locally