Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app_gps: Code updates and documentation #464

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

app_gps: Code updates and documentation #464

wants to merge 15 commits into from

Conversation

KB4MDD
Copy link
Collaborator

@KB4MDD KB4MDD commented Jan 22, 2025

This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.

@KB4MDD KB4MDD added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 22, 2025
@KB4MDD KB4MDD self-assigned this Jan 22, 2025
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines.
Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table.
Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file
stored in the /tmp directory.  The application previously wrote
to the disk once per second, which included a system call
to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ
to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the
pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt
posts.  This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS
post.

The cli command 'gps status' will allow the user to check the
status of the attached GPS device.  It tells the user if
the GPS device is connected, if it is locked to the
satellites, and the current and default position.

The unlocked warning message is now only printed when it first
occurs. The message is turned back on when we receive a lock on
the satellite.

The gps.conf file now has an entry for icontable.  The default
is '\' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be
enabled.  That option has been added to rtp.conf and commented
out.

There were a number of refinements to the code, along with
fixes for memory leaks.
apps/app_rpt.c Outdated Show resolved Hide resolved
apps/app_rpt.c Outdated Show resolved Hide resolved
apps/app_rpt.c Outdated Show resolved Hide resolved
apps/app_rpt.c Show resolved Hide resolved
apps/app_rpt/rpt_functions.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
Copy link
Collaborator

@mkmer mkmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! This should really help save the memory cards on PI's.
Just a few comments around format stuff.

apps/app_rpt.c Show resolved Hide resolved
apps/app_rpt/rpt_functions.c Show resolved Hide resolved
apps/app_rpt/rpt_functions.c Show resolved Hide resolved
apps/app_rpt/rpt_telemetry.c Outdated Show resolved Hide resolved
apps/app_rpt/rpt_telemetry.c Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
@KB4MDD
Copy link
Collaborator Author

KB4MDD commented Jan 22, 2025

@InterLinked1 @mkmer

Regarding adding warning messages if the new functions cannot be found. I will be glad to add that. I will note that if I don't check for the function and app_gps is not loaded, the core function handler will send a warning message that the function does not exist. (I ran into this and decided to add the check.)

I will note that this is really only an issue if the enables a dtmf command that uses one of the functions. If they are doing that, I would like to think they would have enabled app_gps.

What is the preference - leave as is, add a warning message that the function is not there (preserving my if), or removing my test and allowing the core function handler to report the problem?

apps/app_rpt/rpt_functions.c Outdated Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
configs/rpt/gps.conf Outdated Show resolved Hide resolved
configs/rpt/gps.conf Show resolved Hide resolved
apps/app_rpt/rpt_functions.c Outdated Show resolved Hide resolved
apps/app_rpt.c Outdated Show resolved Hide resolved
channels/chan_echolink.c Outdated Show resolved Hide resolved
@InterLinked1
Copy link
Member

@InterLinked1 @mkmer

Regarding adding warning messages if the new functions cannot be found. I will be glad to add that. I will note that if I don't check for the function and app_gps is not loaded, the core function handler will send a warning message that the function does not exist. (I ran into this and decided to add the check.)

I will note that this is really only an issue if the enables a dtmf command that uses one of the functions. If they are doing that, I would like to think they would have enabled app_gps.

What is the preference - leave as is, add a warning message that the function is not there (preserving my if), or removing my test and allowing the core function handler to report the problem?

In this case, keep as is (checking before call). We don't want to emit spurious warnings either.

apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
@KB4MDD KB4MDD requested a review from InterLinked1 January 23, 2025 14:43
apps/app_rpt.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Show resolved Hide resolved
apps/app_gps.c Show resolved Hide resolved
apps/app_gps.c Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
@KB4MDD KB4MDD requested a review from InterLinked1 January 24, 2025 13:14
apps/app_rpt.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
@KB4MDD KB4MDD requested a review from InterLinked1 January 24, 2025 16:44
configs/rpt/gps.conf Outdated Show resolved Hide resolved
configs/rpt/gps.conf Outdated Show resolved Hide resolved
configs/rpt/gps.conf Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
@KB4MDD KB4MDD requested review from Allan-N and mkmer January 25, 2025 12:32
Copy link
Collaborator

@Allan-N Allan-N left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm making one of my last passes over these changes and, again, want to raise the issue of using a monotonic clock. I have observed a bunch of places in the code where we are still comparing the time returned by the GPS_READ function and comparing that to what's returned by a call to time(&t). In these instances I think we really want to get away fro time(&t).

Here's a thought. When we are saving the current time for future calls to GPS_READ we should store TWO timers (e.g. extend the position_info struct to have both values). One would be epoch based and one would be monotinic. The calls to GPS_READ should return BOTH time values. Then, if the code needs to report when the data was captured it will use the epoch value. But, if the code is checking the elapsed time it would use the monotonic value.

And, as an aside, you might want to think about having a single/shared function to check for the availability of the GPS_READ function, to make the call, and to return the results (or an indication that the data is not available).

apps/app_gps.c Outdated Show resolved Hide resolved
apps/app_gps.c Outdated Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
@KB4MDD KB4MDD requested a review from Allan-N January 26, 2025 23:07
apps/app_rpt.c Outdated Show resolved Hide resolved
apps/app_rpt.c Outdated Show resolved Hide resolved
apps/app_rpt/rpt_telemetry.c Outdated Show resolved Hide resolved
apps/app_rpt/rpt_telemetry.c Outdated Show resolved Hide resolved
channels/chan_echolink.c Outdated Show resolved Hide resolved
This updates app_gps with the following changes:

Update the code to use the asterisk coding guidelines. Added documentation to all functions.
Added documentation to gps.conf.
Added functions: GPS_READ and APRS_SENDTT.
Added the cli command gps status.
Added the ability to select the primary or alternate symbol table. Replaced depreciated ast_gethostbyname.
Addressed issues with module unload not completing timely.

GPS_READ() function replaces the need to create the gps.dat file stored in the /tmp directory. The application previously wrote to the disk once per second, which included a system call to rename a temporary file.

app_rpt and chan_echolink have been updated to use GPS_READ to retrieve the gps data, instead of reading a data file.

APRS_SENDTT(stanza, overlay) = callsign, function replaces the pipe that was used by app_rpt to send APRStt requests to app_gps.

APSTAR is now used as the tocall for both APRS an APRStt posts. This is being registered as the tocall for AllStar Link.

If elevation is available, it is included in the APRS post.

The cli command 'gps status' will allow the user to check the status of the attached GPS device. It tells the user if the GPS device is connected, if it is locked to the satellites, and the current and default position.

The unlocked warning message is now only printed when it first occurs. The message is turned back on when we receive a lock on the satellite.

The gps.conf file now has an entry for icontable. The default is '' primary or '/' for the alternate symbol table.

For APRStt to work, the aprstt entry in app_rpt needs to be enabled. That option has been added to rtp.conf and commented out.

There were a number of refinements to the code, along with fixes for memory leaks.
@KB4MDD KB4MDD requested a review from Allan-N January 28, 2025 13:37
@mkmer mkmer self-requested a review January 28, 2025 14:41
apps/app_rpt.c Show resolved Hide resolved
apps/app_rpt/rpt_telemetry.c Show resolved Hide resolved
apps/app_rpt/rpt_telemetry.c Show resolved Hide resolved
channels/chan_echolink.c Show resolved Hide resolved
@Allan-N Allan-N self-requested a review January 28, 2025 16:39
@KB4MDD KB4MDD mentioned this pull request Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants