-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTiming.h
56 lines (53 loc) · 1.99 KB
/
Timing.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
void TXtiming() // Timing
{
// run additional scripts here to generate data prior to TX if there is a large delay involved.
if ((timeStatus() == timeSet) && (second() == 0) && (minute() >= 0))
{
setGPStime();
if ((minute() % 10 == 0) && (second() <= 0)) // TX WSPR standard message
{
telemetry_set = true;
loc4calc(); // Get position and update 4-char locator, 6-char locator and last 2 chars of 8-char locator
call_telem(); // Update WSPR telemetry callsign based on previous information : position and altitude in meters
loc_dbm_telem(); // Update WSPR telemetry locator and dbm. Get temperature, voltage, speed in knots, GPS status and sats number
GPS_VCC_off(); delay(10);
rf_on();
freq = WSPR_FREQ;
setModeWSPR(); // set WSPR standard mode
encode(); // begin radio transmission
rf_off(); delay(5);
GPS_VCC_on();
}
else if ((minute() % 10 == 2) && (second() <= 0) && (telemetry_set == true)) // TX WSPR telemetry message
{
GPS_VCC_off(); delay(10);
rf_on();
freq = WSPR_FREQ;
setModeWSPR_telem(); // set WSPR telemetry mode
encode(); // begin radio transmission
rf_off(); delay(5);
GPS_VCC_on();
}
else if ((minute() % 10 == 4) && (second() <= 0) && (telemetry_set == true)) // TX WSPR standard message
{
GPS_VCC_off(); delay(10);
rf_on();
freq = WSPR_FREQ;
setModeWSPR(); // set WSPR standard mode
encode(); // begin radio transmission
rf_off(); delay(5);
GPS_VCC_on();
}
else if ((minute() % 10 == 6) && (second() <= 0) && (telemetry_set == true)) // TX WSPR standard message
{
GPS_VCC_off(); delay(10);
rf_on();
freq = WSPR_FREQ;
setModeWSPR(); // set WSPR standard mode
encode(); // begin radio transmission
rf_off(); delay(5);
GPS_VCC_on();
telemetry_set = false;
}
}
}