Skip to content

Commit 1ff0ed6

Browse files
committed
Adusted frequency naming
1 parent 68a257c commit 1ff0ed6

File tree

7 files changed

+86
-92
lines changed

7 files changed

+86
-92
lines changed

tracker/software/source/config/config.c

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ const conf_t conf_flash_default = {
1313
// Primary position app
1414
.pos_pri = {
1515
.beacon = {
16-
.active = false,
17-
.cycle = TIME_S2I(60 * 5),
18-
.init_delay = TIME_S2I(60),
16+
.active = true,
17+
.cycle = TIME_S2I(120),
18+
.init_delay = TIME_S2I(0),
1919
.fixed = false // Add lat, lon, alt fields when enabling fixed
2020
},
2121
.radio_conf = {
22-
.pwr = 0x1F,
23-
.freq = 144800000,
24-
.mod = MOD_2FSK,
25-
.cca = 0x4F,
22+
.pwr = 0x7F,
23+
.freq = FREQ_GEOFENCE,
24+
.mod = MOD_AFSK,
25+
.cca = 0x5F,
2626
},
2727
// App identity
28-
.call = "VK2GJ-12",
28+
.call = "DL7AD-15",
2929
.path = "WIDE1-1",
30-
.symbol = SYM_ANTENNA,
30+
.symbol = SYM_BALLOON,
3131
.aprs_msg = true, // Enable APRS message reception on this app
3232
},
3333

@@ -44,12 +44,12 @@ const conf_t conf_flash_default = {
4444
},
4545
.radio_conf = {
4646
.pwr = 0x7F,
47-
.freq = FREQ_APRS_RECEIVE,
47+
.freq = FREQ_GEOFENCE,
4848
.mod = MOD_AFSK,
4949
.cca = 0x4F
5050
},
5151
// App identity
52-
.call = "VK2GJ-5",
52+
.call = "DL7AD-5",
5353
.path = "WIDE2-1",
5454
.symbol = SYM_DIGIPEATER,
5555
.aprs_msg = false, // Enable APRS message reception on this app
@@ -58,26 +58,26 @@ const conf_t conf_flash_default = {
5858
// Primary image app
5959
.img_pri = {
6060
.svc_conf = {
61-
.active = false,
62-
.cycle = TIME_S2I(60 * 5),
63-
.init_delay = TIME_S2I(60 * 1),
64-
.send_spacing = TIME_S2I(5)
61+
.active = true,
62+
.cycle = CYCLE_CONTINUOUSLY,
63+
.init_delay = TIME_S2I(30),
64+
.send_spacing = TIME_S2I(10)
6565
},
6666
.radio_conf = {
6767
.pwr = 0x7F,
68-
.freq = 144800000,
69-
.mod = MOD_2FSK,
70-
.cca = 0x4F
68+
.freq = FREQ_GEOFENCE,
69+
.mod = MOD_AFSK,
70+
.cca = 0x5F
7171

7272
},
7373
// App identity
74-
.call = "VK2GJ-15",
74+
.call = "DL7AD-15",
7575
.path = "",
7676

7777
// Image settings
78-
.res = RES_VGA,
78+
.res = RES_QVGA,
7979
.quality = 4,
80-
.buf_size = 40 * 1024,
80+
.buf_size = 50 * 1024,
8181
.redundantTx = false
8282
},
8383

@@ -91,12 +91,12 @@ const conf_t conf_flash_default = {
9191
},
9292
.radio_conf = {
9393
.pwr = 0x1F,
94-
.freq = APRS_FREQ_AUSTRALIA,
94+
.freq = FREQ_APRS_AUSTRALIA,
9595
.mod = MOD_AFSK,
9696
.cca = 0x4F
9797
},
9898
// App identity
99-
.call = "VK2GJ-12",
99+
.call = "DL7AD-12",
100100
.path = "",
101101

102102
// Image settings
@@ -115,12 +115,12 @@ const conf_t conf_flash_default = {
115115
},
116116
.radio_conf = {
117117
.pwr = 0x7F,
118-
.freq = FREQ_APRS_DYNAMIC,
118+
.freq = FREQ_GEOFENCE,
119119
.mod = MOD_AFSK,
120120
.cca = 0x4F
121121
},
122122
// Node identity
123-
.call = "VK2GJ-13",
123+
.call = "DL7AD-13",
124124
.path = "WIDE1-1",
125125
.density = 10
126126
},
@@ -132,31 +132,31 @@ const conf_t conf_flash_default = {
132132
.svc_conf = {
133133
// The packet receive service is enabled if true
134134
// Receive is paused and resumed by transmission
135-
.active = true,
135+
.active = false,
136136
.init_delay = TIME_S2I(20)
137137
},
138138
// Receive radio configuration
139139
.radio_conf = {
140-
.freq = FREQ_APRS_DYNAMIC,
140+
.freq = FREQ_GEOFENCE,
141141
.mod = MOD_AFSK,
142142
.rssi = 0x3F
143143
},
144144
// APRS identity used in message responses if digipeat is not enabled
145-
.call = "VK2GJ-4",
145+
.call = "DL7AD-4",
146146
.symbol = SYM_ANTENNA
147147
},
148148
.aprs_msg = false, // Set true to enable messages to be accepted on RX call sign
149-
.digi = true,
149+
.digi = false,
150150
.tx = {
151151
// Transmit radio configuration
152152
.radio_conf = {
153-
.freq = FREQ_APRS_RECEIVE,
153+
.freq = FREQ_RX_APRS,
154154
.pwr = 0x7F,
155155
.mod = MOD_AFSK,
156156
.cca = 0x4F
157157
},
158158
// Digipeat transmission identity
159-
.call = "VK2GJ-5",
159+
.call = "DL7AD-5",
160160
.path = "WIDE2-1",
161161
.symbol = SYM_DIGIPEATER,
162162
// A digipeater beacon can be added using one of the POS apps
@@ -183,13 +183,13 @@ const conf_t conf_flash_default = {
183183
.tel_enc_cycle = TIME_S2I(60 * 60 * 2),
184184

185185
// The default APRS frequency when geofence is not resolved
186-
.freq = APRS_FREQ_AUSTRALIA,
186+
.freq = FREQ_APRS_EUROPE,
187187

188188
// The base station identity.
189189
.base = {
190190
// If enabled tracker initiated APRS messages are addressed to this call sign
191-
.enabled = true,
192-
.call = "VK2GJ-7",
191+
.enabled = false,
192+
.call = "DL7AD-7",
193193
.path = "WIDE2-1",
194194
},
195195

tracker/software/source/config/types.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
#include "ublox.h"
77

88
typedef enum {
9-
FREQ_RADIO_INVALID = 0,
10-
FREQ_APRS_DYNAMIC, /* Geofencing frequency (144.8 default). */
11-
FREQ_APRS_SCAN, /* Frequency last found in RX scan. - TBI */
12-
FREQ_APRS_RECEIVE, /* Active RX frequency - fall back to DYNAMIC. */
13-
FREQ_CMDC_RECEIVE, /* Frequency used for command and control. TBI */
14-
FREQ_APRS_DEFAULT, /* Default frequency specified in configuration */
15-
FREQ_CODES_END
9+
FREQ_INVALID = 0,
10+
FREQ_APRS_GEOFENCE, /* Geofencing frequency (144.8 default). */
11+
FREQ_SCAN, /* Frequency last found in RX scan. - TBI */
12+
FREQ_RX_APRS, /* Active RX frequency - fall back to DYNAMIC. */
13+
FREQ_RX_CMDC, /* Frequency used for command and control. TBI */
14+
FREQ_DEFAULT, /* Default frequency specified in configuration */
15+
FREQ_CODES_END
1616
} freq_codes_t;
1717

18-
#define FREQ_RADIO_INVALID 0
19-
#define FREQ_APRS_DYNAMIC 1 /* Geofencing frequency (144.8 default). */
20-
#define FREQ_APRS_SCAN 2 /* Frequency based on band base + channel scan. */
21-
#define FREQ_APRS_RECEIVE 3 /* Active RX frequency - fall back to DYNAMIC. */
22-
#define FREQ_CMDC_RECEIVE 4 /* Frequency used for command and control. TBI */
23-
#define FREQ_APRS_DEFAULT 5 /* Default frequency specified in configuration */
24-
#define FREQ_CODES_END 6
18+
#define FREQ_INVALID 0
19+
#define FREQ_GEOFENCE 1 /* Geofencing frequency (144.8 default). */
20+
#define FREQ_SCAN 2 /* Frequency based on band base + channel scan. */
21+
#define FREQ_RX_APRS 3 /* Active RX frequency - fall back to DYNAMIC. */
22+
#define FREQ_RX_CMDC 4 /* Frequency used for command and control. TBI */
23+
#define FREQ_DEFAULT 5 /* Default frequency specified in configuration */
24+
#define FREQ_CODES_END 6
2525

2626
#define CYCLE_CONTINUOUSLY 0
2727

tracker/software/source/drivers/si446x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ static bool Si446x_transmit(const radio_unit_t radio,
986986
radio_freq_t op_freq = pktComputeOperatingFrequency(radio, freq,
987987
step, chan, RADIO_TX);
988988

989-
if(op_freq == FREQ_RADIO_INVALID) {
989+
if(op_freq == FREQ_INVALID) {
990990
TRACE_ERROR("SI > Frequency out of range");
991991
TRACE_ERROR("SI > abort transmission");
992992
return false;
@@ -1068,7 +1068,7 @@ bool Si446x_receiveNoLock(const radio_unit_t radio,
10681068
radio_freq_t op_freq = pktComputeOperatingFrequency(radio, freq,
10691069
step, channel,
10701070
RADIO_RX);
1071-
if(op_freq == FREQ_RADIO_INVALID) {
1071+
if(op_freq == FREQ_INVALID) {
10721072
TRACE_ERROR("SI > Frequency out of range");
10731073
TRACE_ERROR("SI > abort transmission");
10741074
return false;

tracker/software/source/math/geofence.c

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -648,55 +648,50 @@ static bool isPointInBrazil(int32_t lat, int32_t lon) {
648648
return isPointInPolygon(brazil, sizeof(brazil)/sizeof(brazil[0]), lat, lon);
649649
}
650650

651-
/**
652-
* Returns APRS region specific frequency determined by GPS location. It will
653-
* use the APRS default frequency set in the config file if no GPS fix has
654-
* been received.
655-
*/
656651
uint32_t getAPRSRegionFrequency() {
657652
dataPoint_t *point = getLastDataPoint();
658653

659654
// Position unknown
660655
if(point == NULL || (point->gps_lat == 0 && point->gps_lon == 0))
661656
// Return code and let pktradio figure out what to do.
662-
return FREQ_APRS_DEFAULT;
657+
return FREQ_INVALID;
663658

664659
// America 144.390 MHz
665660
if(isPointInAmerica(point->gps_lat, point->gps_lon))
666-
return APRS_FREQ_AMERICA;
661+
return FREQ_APRS_AMERICA;
667662

668663
// China 144.640 MHz
669664
if(isPointInChina(point->gps_lat, point->gps_lon))
670-
return APRS_FREQ_CHINA;
665+
return FREQ_APRS_CHINA;
671666

672667
// Japan 144.660 MHz
673668
if(isPointInJapan(point->gps_lat, point->gps_lon))
674-
return APRS_FREQ_JAPAN;
669+
return FREQ_APRS_JAPAN;
675670

676671
// Southkorea 144.620 MHz
677672
if(isPointInSouthkorea(point->gps_lat, point->gps_lon))
678-
return APRS_FREQ_SOUTHKOREA;
673+
return FREQ_APRS_SOUTHKOREA;
679674

680675
// Southkorea 144.620 MHz
681676
if(isPointInSoutheastAsia(point->gps_lat, point->gps_lon))
682-
return APRS_FREQ_SOUTHEASTASIA;
677+
return FREQ_APRS_SOUTHEASTASIA;
683678

684679
// Australia 145.175 MHz
685680
if(isPointInAustralia(point->gps_lat, point->gps_lon))
686-
return APRS_FREQ_AUSTRALIA;
681+
return FREQ_APRS_AUSTRALIA;
687682

688683
// Australia 144.575 MHz
689684
if(isPointInNewZealand(point->gps_lat, point->gps_lon))
690-
return APRS_FREQ_NEWZEALAND;
685+
return FREQ_APRS_NEWZEALAND;
691686

692687
// Argentina/Paraguay/Uruguay 144.930 MHz
693688
if(isPointInArgentina(point->gps_lat, point->gps_lon))
694-
return APRS_FREQ_ARGENTINA;
689+
return FREQ_APRS_ARGENTINA;
695690

696691
// Brazil 145.575 MHz
697692
if(isPointInBrazil(point->gps_lat, point->gps_lon))
698-
return APRS_FREQ_BRAZIL;
693+
return FREQ_APRS_BRAZIL;
699694

700-
return FREQ_APRS_DEFAULT;
695+
return FREQ_INVALID;
701696
}
702697

tracker/software/source/math/geofence.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
#include "types.h"
77

88
// APRS region frequencies
9-
#define APRS_FREQ_OTHER 144800000
10-
#define APRS_FREQ_AMERICA 144390000
11-
#define APRS_FREQ_CHINA 144640000
12-
#define APRS_FREQ_JAPAN 144660000
13-
#define APRS_FREQ_SOUTHKOREA 144620000
14-
#define APRS_FREQ_SOUTHEASTASIA 144390000
15-
#define APRS_FREQ_AUSTRALIA 145175000
16-
#define APRS_FREQ_NEWZEALAND 144575000
17-
#define APRS_FREQ_ARGENTINA 144930000
18-
#define APRS_FREQ_BRAZIL 145575000
9+
#define FREQ_APRS_EUROPE 144800000
10+
#define FREQ_APRS_AMERICA 144390000
11+
#define FREQ_APRS_CHINA 144640000
12+
#define FREQ_APRS_JAPAN 144660000
13+
#define FREQ_APRS_SOUTHKOREA 144620000
14+
#define FREQ_APRS_SOUTHEASTASIA 144390000
15+
#define FREQ_APRS_AUSTRALIA 145175000
16+
#define FREQ_APRS_NEWZEALAND 144575000
17+
#define FREQ_APRS_ARGENTINA 144930000
18+
#define FREQ_APRS_BRAZIL 145575000
1919

2020
typedef struct {
2121
int32_t lat;

0 commit comments

Comments
 (0)