DX18 Template Editing Application

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.

About Mike

I'm a software engineer. Look into the about page for more information about me.
Tagged , , . Bookmark the permalink.

19 Responses to DX18 Template Editing Application

  1. 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

  2. cam berry says:

    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.

  3. Mario Vermeulen says:

    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?

  4. Mario Vermeulen says:

    Build the interface and loading of the file, as soon as I have a working test version I will let everyone know!

  5. andy n says:

    How is it coming? I was also thinking of conversions DX8->DX18 & DX18 -> DX8 when possible.

  6. Mario Vermeulen says:

    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!

  7. Mario Vermeulen says:

    And I am gonna make it webbased 😉

  8. Mario Vermeulen says:

    I have added the files to github here the link https://github.com/MIMSDesign/spektrumeditor

  9. Mario Vermeulen says:

    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

  10. Robin Kearney says:

    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.

  11. Robin Kearney says:

    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.

  12. Robin Kearney says:

    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

Leave a Reply