kopia lustrzana https://github.com/bristol-seds/pico-tracker
[ubseds15] update telemetry for ubseds15
rodzic
73d090cb6c
commit
77f29a5f74
|
|
@ -100,10 +100,10 @@ void encode_altitude(char* str, uint32_t altitude_meters) {
|
||||||
void encode_telemetry(char* str, tracker_datapoint* dp)
|
void encode_telemetry(char* str, tracker_datapoint* dp)
|
||||||
{
|
{
|
||||||
base91_encode(str+0, 2, (dp->battery * 1000)); /* Battery never > 8V */
|
base91_encode(str+0, 2, (dp->battery * 1000)); /* Battery never > 8V */
|
||||||
/* base91_encode(str+2, 2, (dp->solar * 1000)); /\* Solar never > 8V *\/ */
|
base91_encode(str+2, 2, (dp->solar * 1000)); /* Solar never > 8V */
|
||||||
base91_encode(str+2, 2, ((dp->thermistor_temperature+273.2)*10)); /* Temp never > 526º! */
|
base91_encode(str+4, 2, ((dp->thermistor_temperature+273.2)*10)); /* Temp never > 526º! */
|
||||||
base91_encode(str+4, 2, ((dp->radio_die_temperature+273.2)*10)); /* Temp never > 526º! */
|
base91_encode(str+6, 2, ((dp->radio_die_temperature+273.2)*10)); /* Temp never > 526º! */
|
||||||
base91_encode(str+6, 2, dp->satillite_count); /* Small! */
|
//base91_encode(str+6, 2, dp->satillite_count); /* Small! */
|
||||||
base91_encode(str+8, 2, dp->time_to_first_fix); /* Small! */
|
base91_encode(str+8, 2, dp->time_to_first_fix); /* Small! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
#include "sequencer.h"
|
#include "sequencer.h"
|
||||||
#include "thermistor.h"
|
#include "thermistor.h"
|
||||||
|
|
||||||
#define CALLSIGN "UBSEDS14"
|
#define CALLSIGN "UBSEDS15"
|
||||||
#define APRS_COMMENT ""
|
#define APRS_COMMENT ""
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -71,15 +71,18 @@ uint16_t format_telemetry_string(char* string, struct tracker_datapoint* dp,
|
||||||
|
|
||||||
/* sprintf - full string (approx 90 chars) */
|
/* sprintf - full string (approx 90 chars) */
|
||||||
len += sprintf(telemetry_string + len,
|
len += sprintf(telemetry_string + len,
|
||||||
"%s,%02u:%02u:%02u,%02u%02u%02u,%02.4f,%03.4f,%ld,%u,%u,%.2f,%.1f,%.1f",
|
// "%s,%02u:%02u:%02u,%02u%02u%02u,%02.4f,%03.4f,%ld,%u,%u,%.2f,%.1f,%.1f",
|
||||||
|
"%s,%02u:%02u:%02u,%02u%02u%02u,%02.4f,%03.4f,%ld,%u,%u,%.2f,%.2f,%.1f,%.1f",
|
||||||
CALLSIGN, /* 2+6+2+1=11 */
|
CALLSIGN, /* 2+6+2+1=11 */
|
||||||
dp->time.hour, dp->time.minute, dp->time.second, /* 2+1+2+1+2+1=9 */
|
dp->time.hour, dp->time.minute, dp->time.second, /* 2+1+2+1+2+1=9 */
|
||||||
dp->time.year%100, dp->time.month, dp->time.day, /* 2+2+2+1=7 */
|
dp->time.year%100, dp->time.month, dp->time.day, /* 2+2+2+1=7 */
|
||||||
lat_fmt, lon_fmt, altitude, dp->satillite_count, /* 3+1+4+1 + 4+1+4+1 + 5+1 + 2+1 = 28 */
|
lat_fmt, lon_fmt, altitude, dp->satillite_count, /* 3+1+4+1 + 4+1+4+1 + 5+1 + 2+1 = 28 */
|
||||||
dp->time_to_first_fix, /* 2+1 = 3 */
|
dp->time_to_first_fix, /* 2+1 = 3 */
|
||||||
dp->battery, dp->thermistor_temperature, /* 1+1+2+1 + 3+1+1+1 = 11 */
|
dp->battery, /* 1+1+2+1 = 5 */
|
||||||
|
dp->solar, /* 1+1+2+1 = 5 */
|
||||||
|
dp->thermistor_temperature, /* 3+1+1+1 = 6 */
|
||||||
dp->radio_die_temperature); /* 3+1+1+1 = 6 */
|
dp->radio_die_temperature); /* 3+1+1+1 = 6 */
|
||||||
/* sum = 75 (must be less than or equal to 114) */
|
/* sum = 80 (must be less than or equal to 114) */
|
||||||
|
|
||||||
if (reduce_char_set) {
|
if (reduce_char_set) {
|
||||||
/* Reduce character set */
|
/* Reduce character set */
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue