Skip to content

Commit

Permalink
Work around APRS.fi bug (issue #6)
Browse files Browse the repository at this point in the history
I thought I did this already (back in version 1.5.1), but I suppose
I forgot about it.  Sorry, Menno.
  • Loading branch information
rhymeswithmogul committed Oct 27, 2022
1 parent 5b53064 commit 2a16d65
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
13 changes: 7 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
## Version 1.6
* Support for compiling with OpenWatcom (with `-D_DOS`). This will allow us to target 16-bit targets and retro machines, all the way back to MS-DOS and the 8086 (without APRS-IS support, unless we figure out [mTCP](https://www.brutman.com/mTCP/)). I've only tested it on FreeDos and an emulated 486 thus far.
<time datetime="2022-10-26T22:53:17-04:00">October 26, 2022</time>
* This app now runs on DOS systems! Added support for compiling with OpenWatcom, to target 16-bit targets and retro machines, all the way back to MS-DOS and the 8086 (without APRS-IS support). I've only tested it on FreeDOS 1.3 and an emulated 486 thus far.
* Custom comments can be added to packets! Use `--comment` to add your own notes to a packet.
* When not using custom comments, the "X" in the comment field is removed. APRS packets rarely, if ever, use the operating system identifier these days, so there is no need to prefix the user agent with it.
* Fix a bug ([#9](https://github.com/rhymeswithmogul/aprs-weather-submit/issues/9)) where minute values less than ten would result in invalud uncompressed positions. Thank you, [ploeffler](https://github.com/ploeffler)!
* Fix a bug where the `--altitude` parameter was not being detected in its short form (`-A`).
* Replace calls to `strncat()` with calls to `strcat()`. This eliminates on-by-default warnings in GCC 8.1. [Thank you](https://github.com/rhymeswithmogul/aprs-weather-submit/pull/4), [KR4DIO](https://github.com/KR4DIO)!
* When not using custom comments, the "X" in the comment field is removed. APRS packets rarely, if ever, use the operating system identifier these days, so there is no need to prefix the user agent or comment with it.
* Fixed a bug where [minute values less than ten would result in invalid uncompressed positions](https://github.com/rhymeswithmogul/aprs-weather-submit/issues/9). Thank you, [ploeffler](https://github.com/ploeffler)!
* Fixed a bug where the `--altitude` parameter was not being detected in its short form (`-A`).
* Worked around a bug with [APRS.fi](https://APRS.fi), where [their site would reject packets with the temperature listed before the wind gust speeds](https://github.com/rhymeswithmogul/aprs-weather-submit/issues/6). This was not a bug in this app. Thank you, [Menno](https://github.com/pd9mwo).
* [Replace calls to `strncat()` with calls to `strcat()`.](https://github.com/rhymeswithmogul/aprs-weather-submit/pull/4) This eliminates on-by-default warnings in GCC 8.1., [KR4DIO](https://github.com/KR4DIO)!
* Removed dependency on `<assert.h>`.

## Version 1.5.2
Expand All @@ -19,7 +21,6 @@

* Completely rewrite the build script to have a standard `autogen`, `configure`, and `make`.
* Eliminate compiler errors when using `-Wextra`.
* Fix a bug where [APRS.fi](https://APRS.fi) would not accept wind gust speeds if it was placed before the temperature. This is a bug on their end, but it's a painless change over here. (Thank you, [Menno](https://github.com/pd9mwo)!)

## Version 1.5
<time datetime="2020-09-26T13:19:22-05:00">September 26, 2020</time>
Expand Down
34 changes: 14 additions & 20 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
aprs-weather-submit (1.6-2) unstable; urgency=medium
aprs-weather-submit (1.6-4) unstable; urgency=medium

* Support for compiling with OpenWatcom (with -D_DOS). This will allow us to
target 16-bit targets and retro machines, all the way back to MS-DOS and the
8086 (without APRS-IS support, unless we figure out mTCP). I've only tested
it on FreeDos and an emulated 486 thus far.

* Custom comments can be added to packets! Use --comment to add your own
* Custom comments can be added to packets! Use --comment` to add your own
notes to a packet.
* When not using custom comments, the "X" in the comment field is removed.
APRS packets rarely, if ever, use the operating system identifier these
days, so there is no need to prefix the user agent with it.

* Fix a bug (#9) where minute values less than ten would result in invalid
uncompressed positions. Thank you, ploeffler!
* Fix a bug where the --altitude parameter was not being detected in its
APRS packets rarely, if ever, use the operating system identifier these days,
so there is no need to prefix the user agent or comment with it.
* Fixed GitHub issue #9: minute values less than ten would result in invalid
uncompressed positions. (Thank you, ploeffler!)
* Fixed a bug where the --altitude parameter was not being detected in its
short form (-A).
* Replace calls to strncat() with calls to strcat(). This eliminates on-
by-default warnings in GCC 8.1. Thank you, KR4DIO!

* Fixed GitHub issue #6 (for real this time): Worked around a bug with APRS.fi
where their site would reject packets with the temperature listed before the
wind gust speeds. This was not a bug in this app. Thank you, PD9MWO!
* Fixed GitHub issue #4 where GCC 8.1 would emit spurious warnings. This was
fixed by replacing calls to strncat() with strcat(). Thank you for the report
and the pull request, KR4DIO!
* Removed dependency on <assert.h>.

* 1.6-2 fixes some packaging errors for Debian. The app itself is unchanged
from 1.6-1, and 1.6 upstream.

-- Colin Cogle <[email protected]> Wed, 26 Oct 2022 20:15:33 -0400
-- Colin Cogle <[email protected]> Wed, 26 Oct 2022 22:53:17 -0400
16 changes: 10 additions & 6 deletions src/aprs-wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,19 @@ printAPRSPacket (APRSPacket* restrict const p, char* restrict const ret,
*/
snprintf_verify(snprintf(
result, 48,
/* header_________ timestamp____ pos_wc_s_Tt__*/
"%s>APRS,TCPIP*:@%.2d%.2d%.2dz/%s%s_%c%cCt%s",
/* header_________ timestamp____ pos_wc_s_T*/
"%s>APRS,TCPIP*:@%.2d%.2d%.2dz/%s%s_%c%cC",
p->callsign, now->tm_mday, now->tm_hour, now->tm_min, p->latitude,
p->longitude, p->windDirection[0], p->windSpeed[0], p->temperature
p->longitude, p->windDirection[0], p->windSpeed[0]
));
}
else {
snprintf_verify(snprintf(
result, 61,
/* header_________ timestamp____pos__wc_ s_t__*/
"%s>APRS,TCPIP*:@%.2d%.2d%.2dz%s/%s_%s/%st%s",
/* header_________ timestamp____pos__wc_ s_*/
"%s>APRS,TCPIP*:@%.2d%.2d%.2dz%s/%s_%s/%s",
p->callsign, now->tm_mday, now->tm_hour, now->tm_min, p->latitude,
p->longitude, p->windDirection, p->windSpeed, p->temperature
p->longitude, p->windDirection, p->windSpeed
));
}

Expand All @@ -296,6 +296,10 @@ printAPRSPacket (APRSPacket* restrict const p, char* restrict const ret,
strcat(result, p->gust);
}

/* The temperature field is mandatory. */
strcat(result, "t");
strcat(result, p->temperature);

if (notNull(p->rainfallLastHour))
{
strcat(result, "r");
Expand Down

0 comments on commit 2a16d65

Please sign in to comment.