|
K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
|
Data Structures | |
| struct | kfsw_gpredict_profile |
Macros | |
| #define | KFSW_GPREDICT_PROFILE_NAME_MAX 16U |
| #define | KFSW_COMMAND_ID_GPREDICT_SELECT 40U |
| #define | KFSW_COMMAND_ID_GPREDICT_ENABLE 41U |
| #define | KFSW_COMMAND_ID_GPREDICT_PARK 42U |
| #define | KFSW_COMMAND_ID_GPREDICT_CLEAR 43U |
Enumerations | |
| enum | kfsw_gpredict_frequency_policy { KFSW_GPREDICT_FREQUENCY_FOLLOW = 0 , KFSW_GPREDICT_FREQUENCY_HOLD = 1 , KFSW_GPREDICT_FREQUENCY_IGNORE = 2 } |
Functions | |
| int | kfsw_gpredict_profile_define (uint8_t index, const struct kfsw_gpredict_profile *profile) |
| int | kfsw_gpredict_profile_select (uint8_t index) |
| int | kfsw_gpredict_profile_enable (uint8_t index, bool enabled) |
| int | kfsw_gpredict_profile_get (uint8_t index, struct kfsw_gpredict_profile *profile) |
| int | kfsw_gpredict_profile_selected (void) |
| int | kfsw_gpredict_profile_bearing (const struct kfsw_gpredict_bearing *bearing) |
| int | kfsw_gpredict_profile_frequency (uint64_t offered, uint64_t *send) |
Variables | |
| const struct kfsw_command_definition_set | kfsw_gpredict_command_definitions |
The ground proxy stands where the rotator and radio daemons stand and sees every bearing and frequency Gpredict sends.
What it cannot know is which spacecraft they are for: the hamlib protocols carry angles and a frequency and nothing else. So the spacecraft is chosen here, by hand, and its profile decides what the proxy is allowed to forward.
The profiles live in the node rather than in the proxy because this is where the commands, the parameters and the operator already are. A ground tool that kept its own copy would be a second place to change them, and the two would disagree the first time somebody edited one.
| #define KFSW_COMMAND_ID_GPREDICT_SELECT 40U |
#include <gpredict.h>
Wire identifiers of this module's commands.
Never reused.
| #define KFSW_GPREDICT_PROFILE_NAME_MAX 16U |
#include <gpredict.h>
Longest profile name, including the terminator.
#include <gpredict.h>
What the node does with the frequency Gpredict sends.
| int kfsw_gpredict_profile_bearing | ( | const struct kfsw_gpredict_bearing * | bearing | ) |
#include <gpredict.h>
Judge a bearing against the selected profile.
This is what the proxy asks before forwarding. It applies the profile's travel on top of the rotator's own limits, so a profile can narrow the travel and never widen it.
| 0 | Allowed, and the tracker has taken it. |
| -ENOENT | No profile is selected. |
| -EINVAL | Outside the profile's travel or the rotator's. |
| -EPERM | The tracker is in fault. |
| int kfsw_gpredict_profile_define | ( | uint8_t | index, |
| const struct kfsw_gpredict_profile * | profile | ||
| ) |
#include <gpredict.h>
Define a profile at an index, replacing whatever was there.
| 0 | Defined. |
| -EINVAL | A NULL, an empty name, a travel outside the rotator's own limits, an unknown policy, or HOLD with no frequency to hold. |
| -ENOSPC | index is past the compiled profile count. |
| int kfsw_gpredict_profile_enable | ( | uint8_t | index, |
| bool | enabled | ||
| ) |
#include <gpredict.h>
Enable or disable a profile.
Disabling the selected one refuses with -EBUSY.
| int kfsw_gpredict_profile_frequency | ( | uint64_t | offered, |
| uint64_t * | send | ||
| ) |
#include <gpredict.h>
Ask what to send the radio for a frequency Gpredict offered.
| [in] | offered | What Gpredict sent, in hertz. |
| [out] | send | What to forward, in hertz. Zero means forward nothing. |
| 0 | Decided. |
| -ENOENT | No profile is selected. |
| -EINVAL | A NULL destination, or a zero offer. |
| int kfsw_gpredict_profile_get | ( | uint8_t | index, |
| struct kfsw_gpredict_profile * | profile | ||
| ) |
#include <gpredict.h>
Read one profile.
Returns -ENOENT for an index that holds nothing.
| int kfsw_gpredict_profile_select | ( | uint8_t | index | ) |
#include <gpredict.h>
Choose the profile whose rules apply.
Selecting does not move the antenna: it changes what the next bearing is judged against, and a pass already running keeps its state.
| 0 | Selected. |
| -ENOENT | No profile is defined at index. |
| -EPERM | The profile is defined but not enabled. |
| int kfsw_gpredict_profile_selected | ( | void | ) |
#include <gpredict.h>
Index of the selected profile, or -ENOENT when none is.
|
extern |
#include <gpredict.h>
The module's commands, for a composition to register.