|
|
|
|
@ -2315,6 +2315,7 @@ void get_tlm_fc() { // FunCube Mode telemetry generation
|
|
|
|
|
|
|
|
|
|
//# define FC_EM
|
|
|
|
|
#define JY_1
|
|
|
|
|
//#define FC_SIM
|
|
|
|
|
|
|
|
|
|
/* create data, stream, and waveform buffers */
|
|
|
|
|
|
|
|
|
|
@ -2339,7 +2340,18 @@ void get_tlm_fc() { // FunCube Mode telemetry generation
|
|
|
|
|
// source_bytes[1] = 0x08 ; // extended Nayify - works per code
|
|
|
|
|
source_bytes[1] = 0x10 ; // extended JY-1 - works, no documentation
|
|
|
|
|
int extended = 1;
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef FC_SIM
|
|
|
|
|
// source_bytes[0] = 0b11000001 ; // Sat Id is extended, Frame 2 (RT2 + WO2)
|
|
|
|
|
source_bytes[0] = 0xE0 | 0x20 | 0x00; // 1; // Sat Id is extended, Frame 34 (RT2 + IMG2)
|
|
|
|
|
|
|
|
|
|
source_bytes[0] = source_bytes[0] | ( 0x01 & (uint8_t)(sequence % 2)); // alternate last bit for RT1, RT2.
|
|
|
|
|
|
|
|
|
|
// source_bytes[1] = 0x08 ; // extended Nayify - works per code
|
|
|
|
|
source_bytes[1] = 0x10 ; // extended JY-1 - works, no documentation
|
|
|
|
|
int extended = 1;
|
|
|
|
|
#endif
|
|
|
|
|
#if defined FC_SIM || JY_1
|
|
|
|
|
// if (sequence > 10) {
|
|
|
|
|
if (image_file == NULL) {
|
|
|
|
|
image_file = fopen("/home/pi/CubeSatSim/image_file.bin", "r");
|
|
|
|
|
@ -2395,7 +2407,7 @@ void get_tlm_fc() { // FunCube Mode telemetry generation
|
|
|
|
|
// printf("X %x Y %x Z %x B %x\n", x, y, z, b);
|
|
|
|
|
// printf("iX %x iY %x iZ %x iB %x iC\n", ix, iy, iz, ib, ic);
|
|
|
|
|
|
|
|
|
|
#ifdef JY_1
|
|
|
|
|
#if defined JY_1 || FC_SIM
|
|
|
|
|
source_bytes[extended + FC_EPS + 0] = 0xff & (x >> 6); // Vx
|
|
|
|
|
source_bytes[extended + FC_EPS + 1] = 0xfc & (x << 2);
|
|
|
|
|
source_bytes[extended + FC_EPS + 1] = source_bytes[extended + FC_EPS + 1] | (0x03 & (y >> 12));
|
|
|
|
|
|