Update: SPMReader Announcement
I’ve decided to go ahead and create a parser type application for SPM files. Please read more here: Announcing SPMReader
I’m looking to start a new software project.
I have a Spektrum DX18 2.4 GHz radio which I use to fly my model aircraft. It’s an impressive radio. One of the cool features is that you can move data files to and from the radio’s internal memory to a SD card. The idea is that you can take the file and back it up or give it to others for use as a template.
Using the export/import feature of the radio allows expert users to build templates for complex types of aircraft and share them with others. Another user takes that template, imports it into the radio’s memory and then adjusts it to work with their model. This is ingenious as it cuts out a lot of the hard work for programming complex mixing functions that are often used in sailplanes.
Program Idea
The idea I have is an editor for the file which is produced by the radio. The file, a .SPM, is used for the export/import functionality. Opening this file up in a text editor (I suggest Notepad++) shows that it is ANSI encoded with Macintosh line endings. It uses a pseudo XML layout.
My first task would be to convert the data in the file to a standard XML format with an appropriate schema documenting the layout. Doing this would allow me to generate classes in any OO language in which I attempted to implement the editor.
The first phase of the editor would actually be more of a viewer. This viewer would open up and display the data in a loaded SPM file. The goal of this step would be to conveniently view all the data which the template contains so that as one were editing the same template in the radio they could refer back to the base for guidance.
The second phase would be to make a full editor. This editor would work with the standardized XML through the interface that was developed in the first phase. The completion goal would be the ability to load, view, edit, and save a SPM file. An export function would allow the editor to dump the intermediate XML to disk.
Example of SPM File
Generator="DX18" VCode=" 1.03" ; Originator="HH201JAAk4AGwAGj0ELG1szlFbVB+S" PosIndex= 5 PosMaxSail= 10 Type=Sail curveIndex= 7 enabXPLUS=Disabled Name="DX18 Sail 2AL 2FL V3" Wing=Ail_2_Flap_2 Tail=Normal Motor=None analogID= 198 conditionID= 0 trimID= 0 activeMask=%0000 delay= 0 mixName="FLP > ELE" assignedCurve: 4 1 2 3 4 [Curvedata] *Index= 0 points= 5 Expo=Disabled trimActive=Disabled curved=Enabled X: -1023 -511 0 511 1023 0 0 Y: 0 0 0 0 0 0 0 [/Curvedata] [Curvedata] *Index= 1 points= 5 Expo=Disabled trimActive=Disabled curved=Enabled X: -1023 -511 0 511 1023 0 0 Y: 0 0 0 0 0 0 0 [/Curvedata] [Curvedata] *Index= 2 points= 5 Expo=Disabled trimActive=Disabled curved=Enabled X: -1023 -511 0 511 1023 0 0 Y: 0 0 0 0 0 0 0 [/Curvedata] [Curvedata] *Index= 3 points= 5 Expo=Disabled trimActive=Disabled curved=Enabled X: -1023 -511 0 511 1023 0 0 Y: 0 0 0 0 0 0 0 [/Curvedata] [Curvedata] *Index= 4 points= 0 Expo=Disabled trimActive=Disabled curved=Enabled X: -1023 -511 0 511 1023 0 0 Y: 0 0 0 0 0 0 0 [/Curvedata]
Is There Interest?
I’m looking to see if there is any interest in this project. I don’t think I can work on it solely on my own time. I plan on keeping it open source. Please leave a comment if you’re interested.
Hi,
Did you find anyone interested in your project? As I have an interest in doing this but do not want to reinvent the wheel!
Cheers
Mario
I am interested in this. I have been looking for something like this on and off since I bought the radio in Dec 2012. I am sure that others would love this.
Unfortunately I am not a professional programer. I have writen some code in fortran and pascal years ago as well as visual basic and Java recently. I would be willing to assist in testing or writing code but it would be learning for me.
There are two similar projects underway. Search for “dx8 Heli decode” … this is an excel spreadsheet that parses the spm file and http://spektrum.riviera.org.uk/ which seems to be a sharing site that you upload your spm file to but also parses the code into a nice table presentation. I don’t think it allows editing but there may be some code behind it that we could use.
Ok I will look at that excel tool and then build something so we can also edit, Any preference to an Online tool or offline application?
Build the interface and loading of the file, as soon as I have a working test version I will let everyone know!
Cool! I’m looking forward to seeing what you have made. Do you have it in an online repo like GitHub?
How is it coming? I was also thinking of conversions DX8->DX18 & DX18 -> DX8 when possible.
I got as far as this : http://quadmovies.nl/spektrum/spektrum.php
but then a project came up and had to finish it, then the holidays, so need to look at it again some time soon,
Don’t worry still gonna carry on 😉 but it is a non paying job so will have to do it whenever there is spare time!
Do you have the source on gitgub or something? I’d like to help out if I can.
And I am gonna make it webbased 😉
I have added the files to github here the link https://github.com/MIMSDesign/spektrumeditor
Cool! Thanks for sharing that!
If you don’t mind I’m going to do a write up and may host a copy here.
thats cool, I just started, it is not a full editor yest, it just read the file but it is still missing some stuff!. Its opensource so we can all use it for our spektrums
Hi Mario,
I decided to try my hand at a conversion to XML app for SPM files. Read more at http://blog.itsnotfound.com/2014/03/announcing-spmreader/. Thanks!
Hiya, I’m the author of http://spektrum.riviera.org.uk/ sounds like we have similar goals in mind! Drop me a line, maybe some of the code I have for parsing up the saved model files might be useful. Its not anywhere public at the moment, but I’m happy to push it to github if you’d like a look. All the parsing is in a single file at the moment, the rest is just the website fluff.
If you’d put it out to github I’d love to take a look at it. I’m not a php coder so the other project is hard for me to read. How are you working on yours?
Hi Mike, I’ll rip out the parser function and put it up on GitHub, the rest of the code is just the website which is probably less interesting, although the page where I display the info about the saved model memory (example here http://spektrum.riviera.org.uk/display/6b4836 ) might be interesting to some.
I hope to add displaying of Mixes at some point in the future, given a bit of time to work out how they are stored in the .spm file.
Hi, I’ve put the parser p on github, with an example page which shows the output. Here https://github.com/rk295/Spektrum-SPM-parser
Hi Robin,
I decided to try my hand at a conversion to XML app for SPM files. Read more at http://blog.itsnotfound.com/2014/03/announcing-spmreader/. Thanks!
Hi Mike, ta for telling me. I’ll head over there and have a look.
r.