It was suggested by Kristaps (User x-f in #highaltitude) that rather than interleaving this website’s address with the telemetry for VAYU, I should insert it every 10 sentences sent. I had previously thought of this but didn’t know how to code it and got side-tracked away from the problem. Kristaps suggested I use the code:
if (sentence_id % 10 == 0) { tx_link();}
or something like it. I examined the code to see how I could implement this. The old code read:
sprintf(datastring,”%s%s”,datastring,messagestring);
This takes the constructed sentence, for example ‘$$$$VAYU-1,107,09:55:51,51.452759,00.176324,24,10,1,1,2.96,29*2D2A’ and adds the messagestring (Info at http://projecthab.co.uk) to the end of it making:
$$$$VAYU-1,107,09:55:51,51.452759,00.176324,24,10,1,1,2.96,29*2D2A
Info at http://projecthab.co.uk
Embedded carriage returns format the sentences correctly. What I needed to do was use the ‘if’ statement to check the count and see if it was a 10th count. The method Kristaps suggested uses modulo, something I remember the name of from way back at school. At first I constructed an ‘if-else’ statement structure but I realised that this was not necessary. Either I needed to insert the messagetext or just leave the telemetry alone. So I constructed the line:
if (count % 10 == 0) sprintf(datastring,”%s%s”,datastring,messagestring); //Insert info every 10 sentences
This works a treat and I have soak tested the board to make sure. Here is the output shown in dl-fldigi (HAB Mode)
This will be much better for trackers and will have the effect of making the map plots smoother. My thanks go to Kristaps for his suggestion and code snippet.
You must be logged in to post a comment.