Chris Thompson - AC2CZ - Amateur Radio Station

On the workbench:

2018-Aug-01 - The Wonderful world of WISP - Writing Pacsat Files

I'm starting to make some good progress on the Pacsat Ground Station for FalconSat-3. It will now automatically request the directory from a standing start and fill the holes. Unlike WISP it will look back as far as possible and grab the whole directory from the spacecraft. When the files disappear from the spacecraft they don't disappear from your directory. If you try to request missing files then the spacecraft replies with an error like this:

AC2CZ NO -2

That means there is a permanent error with the file and I mark it as "GONE", which is shorthand for deleted and no longer available.

My next objective was to conquer the slightly daunting task of creating Pacsat File Headers and writing complete Pacsat files that the spacecraft will accept. That code is complete and written in a reasonably generic way. I expanded the PacSatFileHeader.java class that I used for receive and gave it a constructor that creates the needed bytes. Most of the heavy lifting was done by updating my PacSatField.java class so that it could create fields from many different types of input, such as strings, dates, and different length integers. I gave it a set of constructors so that it could handle all the possible types.

Testing with WISP

Java Pacsat Groundstation Screenshot

I wrote a simple message editor, shown to the right, that will need to be expanded in the future. But it will work for the initial test.

To make sure the created file had integrity I decided to open it in WISP's message maker. Of course that failed immediately with "Bad Body Checksum". The checksums are not that hard, because they are just the sum of all of the bytes into a 16 bit number, ignoring overflow. I had checked that was working with test data, so I could not work out what was going on. After a fairly long debugging session, where I discounted java issues with byte conversion and line terminations, I realized that the Body Offset was wrong and WISP was calculating the checksum from the wrong point. So with that fixed Message Maker opened.

But when I tried to view the message in Message Maker by clicking Edit, it created a new message. When I exited that it changed the type to binary from ASCII. Huh?

It turned out that WISP uses the "User File Name" field as the filename in its temporary directory when you edit the file with message maker. I had set that filename to "AC2CZ55.OUT" which was the name of the file. But WISP did not know what a ".OUT" file was, so it assumed it was binary. When I selected "edit" it got confused.

Changing the "User File Name" to "AC2CZ55.txt" fixed the problem and my new file successfully opened in Message Maker, as shown below:

WISP Message Maker

This being software it was not quite as simple as above. I had to fix several bugs and stupid errors as I went along, but that is why you test code. So now it is working and I have put the file in the Wisp FalconSat-3 directory. MSPE is running and I am expecting it to try to upload the file on the next pass. Let's see what happens!

73
Chris


Enter Comments Here:

Name:

Answer this question to help prevent spam (one word, not case sensitive):
The third planet from the sun is called what?


Comments on this post

On: 08/02/18 7:07 Aitor EB2AT said:
Hello Chris
I received your message with WISP and it looks like this with the Message Viewer in Windows 7.
Congratulations.
73 Aitor

##########################################
From:     AC2CZ
To:       ALL
Subject:  Test message from new message editor
Keywords: TEST PACSAT
----------------------------------------
Hi All,

I created this message with a new Java message editor.  If this ends up on the spacecraft then WISP has successfully uploaded it and FS-3 has accepted the Pacsat Header I calculated.  If it is rejected, then back to testing...

Depending on your editor, this may be all on one line without line terminations.  I see that WISP creates Windows style CR and LF.  But we have some people on Linux using PB and PG.  What does that create?  How do we make it work for all?  What has the convention been historically?  

73
Chris
g0kla/ac2cz
##########################################
On: 08/02/18 8:08 Aitor EB2AT said:
Sorry, CR + LF appears well in the message received but not in the previous post.
On: 08/02/18 8:08 Chris G0KLA said:
Thanks Aitor!  Really nice to see this go up to FS-3 and come back down 
correctly.  It looks like WISP may be doing something to fix the CR-LF 
mismatch.

I fixed the formatting in your post so that it displays correctly.  That is 
a problem with my comment capture program
On: 08/03/18 15:15 Aitor EB2AT said:
 OK. Now it looks like I see it.

Copyright 2001-2021 Chris Thompson
Send me an email