| 1 | /* |
| 2 | * Copyright © 2011 Keith Packard <[email protected]> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but |
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License along |
| 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 16 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
| 17 | */ |
| 18 | |
| 19 | #define _GNU_SOURCEcxx . . $ `ao-tools/ao-telem/ao-telem.c:19:9`! |
| 20 | #include <string.h> |
| 21 | #include <stdio.h> |
| 22 | #include <stdlib.h> |
| 23 | #include <unistd.h> |
| 24 | #include <getopt.h> |
| 25 | #include "cc.h"cxx . . $ `<file>/ao-tools/lib/cc.h`/ |
| 26 | |
| 27 | static const struct optioncxx . . $ option# optionscxx . . $ options.[] = { |
| 28 | { .name = "crc", .has_arg = 0, .val = 'c' }, |
| 29 | { 0, 0, 0, 0}, |
| 30 | }; |
| 31 | |
| 32 | static void usagecxx . . $ usage(fda57c8427c60377).(char *program) |
| 33 | { |
| 34 | fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, "usage: %s [--crc] {flight.telem} ...\n",program); |
| 35 | exitcxx . . $ exit(3ca292c338df9bb3).(1); |
| 36 | } |
| 37 | |
| 38 | #define boolcxx . . $ `ao-tools/ao-telem/ao-telem.c:38:9`!(b) ((b) ? "true" : "false") |
| 39 | |
| 40 | static int ignore_crccxx . . $ ignore_crc.; |
| 41 | |
| 42 | static void |
| 43 | processcxx . . $ process(8d4262d45fc644ab).(FILEcxx . . $ FILE# *file) |
| 44 | { |
| 45 | char line[1024]; |
| 46 | int c; |
| 47 | |
| 48 | while (fgetscxx . . $ fgets(efb0aaba7ac866ae).(line, sizeof (line), file)) { |
| 49 | union ao_telemetry_allcxx . . $ ao_telemetry_all# telem; |
| 50 | char call[AO_MAX_CALLSIGNcxx . . $ `ao-tools/lib/cc-telemetry.h:24:9`!+1]; |
| 51 | char version[AO_MAX_VERSIONcxx . . $ `ao-tools/lib/cc-telemetry.h:25:9`!+1]; |
| 52 | |
| 53 | if (cc_telemetry_parsecxx . . $ cc_telemetry_parse(affaf9a957364d29).(line, &telem)) { |
| 54 | int rssi = (int8_tcxx . . $ int8_t#) telem.genericcxx . . $ ao_telemetry_all#generic..rssicxx . . $ ao_telemetry_generic#rssi. / 2 - 74; |
| 55 | |
| 56 | printfcxx . . $ printf(581fddd72a8db8fc). ("serial %5d rssi %d status %02x tick %5d type %3d ", |
| 57 | telem.genericcxx . . $ ao_telemetry_all#generic..serialcxx . . $ ao_telemetry_generic#serial., rssi, telem.genericcxx . . $ ao_telemetry_all#generic..statuscxx . . $ ao_telemetry_generic#status., |
| 58 | telem.genericcxx . . $ ao_telemetry_all#generic..tickcxx . . $ ao_telemetry_generic#tick., telem.genericcxx . . $ ao_telemetry_all#generic..typecxx . . $ ao_telemetry_generic#type.); |
| 59 | if (!ignore_crccxx . . $ ignore_crc. && (telem.genericcxx . . $ ao_telemetry_all#generic..statuscxx . . $ ao_telemetry_generic#status. & (1 << 7)) == 0) { |
| 60 | printfcxx . . $ printf(581fddd72a8db8fc). ("CRC error\n"); |
| 61 | continue; |
| 62 | } |
| 63 | switch (telem.genericcxx . . $ ao_telemetry_all#generic..typecxx . . $ ao_telemetry_generic#type.) { |
| 64 | case AO_TELEMETRY_SENSOR_TELEMETRUMcxx . . $ `ao-tools/lib/cc-telemetry.h:38:9`!: |
| 65 | case AO_TELEMETRY_SENSOR_TELEMINIcxx . . $ `ao-tools/lib/cc-telemetry.h:39:9`!: |
| 66 | case AO_TELEMETRY_SENSOR_TELENANOcxx . . $ `ao-tools/lib/cc-telemetry.h:40:9`!: |
| 67 | printfcxx . . $ printf(581fddd72a8db8fc). ("state %1d accel %5d pres %5d ", |
| 68 | telem.sensorcxx . . $ ao_telemetry_all#sensor..statecxx . . $ ao_telemetry_sensor#state., telem.sensorcxx . . $ ao_telemetry_all#sensor..accelcxx . . $ ao_telemetry_sensor#accel., telem.sensorcxx . . $ ao_telemetry_all#sensor..prescxx . . $ ao_telemetry_sensor#pres.); |
| 69 | printfcxx . . $ printf(581fddd72a8db8fc). ("accel %6.2f speed %6.2f height %5d ", |
| 70 | telem.sensorcxx . . $ ao_telemetry_all#sensor..accelerationcxx . . $ ao_telemetry_sensor#acceleration. / 16.0, |
| 71 | telem.sensorcxx . . $ ao_telemetry_all#sensor..speedcxx . . $ ao_telemetry_sensor#speed. / 16.0, |
| 72 | telem.sensorcxx . . $ ao_telemetry_all#sensor..heightcxx . . $ ao_telemetry_sensor#height.); |
| 73 | printfcxx . . $ printf(581fddd72a8db8fc). ("ground_pres %5d ground_accel %5d accel_plus %5d accel_minus %5d\n", |
| 74 | telem.sensorcxx . . $ ao_telemetry_all#sensor..ground_prescxx . . $ ao_telemetry_sensor#ground_pres., |
| 75 | telem.sensorcxx . . $ ao_telemetry_all#sensor..ground_accelcxx . . $ ao_telemetry_sensor#ground_accel., |
| 76 | telem.sensorcxx . . $ ao_telemetry_all#sensor..accel_plus_gcxx . . $ ao_telemetry_sensor#accel_plus_g., |
| 77 | telem.sensorcxx . . $ ao_telemetry_all#sensor..accel_minus_gcxx . . $ ao_telemetry_sensor#accel_minus_g.); |
| 78 | break; |
| 79 | case AO_TELEMETRY_CONFIGURATIONcxx . . $ `ao-tools/lib/cc-telemetry.h:66:9`!: |
| 80 | memcpycxx . . $ memcpy(cc817cb175f282d).(call, telem.configurationcxx . . $ ao_telemetry_all#configuration..callsigncxx . . $ ao_telemetry_configuration#callsign., AO_MAX_CALLSIGNcxx . . $ `ao-tools/lib/cc-telemetry.h:24:9`!); |
| 81 | memcpycxx . . $ memcpy(cc817cb175f282d).(version, telem.configurationcxx . . $ ao_telemetry_all#configuration..versioncxx . . $ ao_telemetry_configuration#version., AO_MAX_VERSIONcxx . . $ `ao-tools/lib/cc-telemetry.h:25:9`!); |
| 82 | call[AO_MAX_CALLSIGNcxx . . $ `ao-tools/lib/cc-telemetry.h:24:9`!] = '\0'; |
| 83 | version[AO_MAX_CALLSIGNcxx . . $ `ao-tools/lib/cc-telemetry.h:24:9`!] = '\0'; |
| 84 | printfcxx . . $ printf(581fddd72a8db8fc). ("device %3d flight %5d config %3d.%03d delay %2d main %4d log_max %5d", |
| 85 | telem.configurationcxx . . $ ao_telemetry_all#configuration..devicecxx . . $ ao_telemetry_configuration#device., |
| 86 | telem.configurationcxx . . $ ao_telemetry_all#configuration..flightcxx . . $ ao_telemetry_configuration#flight., |
| 87 | telem.configurationcxx . . $ ao_telemetry_all#configuration..config_majorcxx . . $ ao_telemetry_configuration#config_major., |
| 88 | telem.configurationcxx . . $ ao_telemetry_all#configuration..config_minorcxx . . $ ao_telemetry_configuration#config_minor., |
| 89 | telem.configurationcxx . . $ ao_telemetry_all#configuration..apogee_delaycxx . . $ ao_telemetry_configuration#apogee_delay., |
| 90 | telem.configurationcxx . . $ ao_telemetry_all#configuration..main_deploycxx . . $ ao_telemetry_configuration#main_deploy., |
| 91 | telem.configurationcxx . . $ ao_telemetry_all#configuration..flight_log_maxcxx . . $ ao_telemetry_configuration#flight_log_max.); |
| 92 | printfcxx . . $ printf(581fddd72a8db8fc). (" call %8s version %8s\n", call, version); |
| 93 | break; |
| 94 | case AO_TELEMETRY_LOCATIONcxx . . $ `ao-tools/lib/cc-telemetry.h:85:9`!: |
| 95 | printfcxx . . $ printf(581fddd72a8db8fc). ("sats %d flags %s%s%s%s", |
| 96 | telem.locationcxx . . $ ao_telemetry_all#location..flagscxx . . $ ao_telemetry_location#flags. & 0xf, |
| 97 | (telem.locationcxx . . $ ao_telemetry_all#location..flagscxx . . $ ao_telemetry_location#flags. & (1 << 4)) ? "valid" : "invalid", |
| 98 | (telem.locationcxx . . $ ao_telemetry_all#location..flagscxx . . $ ao_telemetry_location#flags. & (1 << 5)) ? ",running" : "", |
| 99 | (telem.locationcxx . . $ ao_telemetry_all#location..flagscxx . . $ ao_telemetry_location#flags. & (1 << 6)) ? ",date" : "", |
| 100 | (telem.locationcxx . . $ ao_telemetry_all#location..flagscxx . . $ ao_telemetry_location#flags. & (1 << 7)) ? ",course" : ""); |
| 101 | printfcxx . . $ printf(581fddd72a8db8fc). (" alt %5d lat %12.7f lon %12.7f", |
| 102 | AO_TELEMETRY_LOCATION_ALTITUDEcxx . . $ `ao-tools/lib/cc-telemetry.h:123:9`!(&telem.location), |
| 103 | telem.locationcxx . . $ ao_telemetry_all#location..latitudecxx . . $ ao_telemetry_location#latitude. / 1e7, |
| 104 | telem.locationcxx . . $ ao_telemetry_all#location..longitudecxx . . $ ao_telemetry_location#longitude. / 1e7); |
| 105 | if ((telem.locationcxx . . $ ao_telemetry_all#location..flagscxx . . $ ao_telemetry_location#flags. & (1 << 6)) != 0) { |
| 106 | printfcxx . . $ printf(581fddd72a8db8fc). (" year %2d month %2d day %2d", |
| 107 | telem.locationcxx . . $ ao_telemetry_all#location..yearcxx . . $ ao_telemetry_location#year., |
| 108 | telem.locationcxx . . $ ao_telemetry_all#location..monthcxx . . $ ao_telemetry_location#month., |
| 109 | telem.locationcxx . . $ ao_telemetry_all#location..daycxx . . $ ao_telemetry_location#day.); |
| 110 | printfcxx . . $ printf(581fddd72a8db8fc). (" hour %2d minute %2d second %2d", |
| 111 | telem.locationcxx . . $ ao_telemetry_all#location..hourcxx . . $ ao_telemetry_location#hour., |
| 112 | telem.locationcxx . . $ ao_telemetry_all#location..minutecxx . . $ ao_telemetry_location#minute., |
| 113 | telem.locationcxx . . $ ao_telemetry_all#location..secondcxx . . $ ao_telemetry_location#second.); |
| 114 | } |
| 115 | printfcxx . . $ printf(581fddd72a8db8fc). (" pdop %3.1f hdop %3.1f vdop %3.1f mode %d", |
| 116 | telem.locationcxx . . $ ao_telemetry_all#location..pdopcxx . . $ ao_telemetry_location#pdop. / 5.0, |
| 117 | telem.locationcxx . . $ ao_telemetry_all#location..hdopcxx . . $ ao_telemetry_location#hdop. / 5.0, |
| 118 | telem.locationcxx . . $ ao_telemetry_all#location..vdopcxx . . $ ao_telemetry_location#vdop. / 5.0, |
| 119 | telem.locationcxx . . $ ao_telemetry_all#location..modecxx . . $ ao_telemetry_location#mode.); |
| 120 | if ((telem.locationcxx . . $ ao_telemetry_all#location..flagscxx . . $ ao_telemetry_location#flags. & (1 << 7)) != 0) |
| 121 | printfcxx . . $ printf(581fddd72a8db8fc). (" ground_speed %6.2f climb_rate %6.2f course %d", |
| 122 | telem.locationcxx . . $ ao_telemetry_all#location..ground_speedcxx . . $ ao_telemetry_location#ground_speed. / 100.0, |
| 123 | telem.locationcxx . . $ ao_telemetry_all#location..climb_ratecxx . . $ ao_telemetry_location#climb_rate. / 100.0, |
| 124 | telem.locationcxx . . $ ao_telemetry_all#location..coursecxx . . $ ao_telemetry_location#course. * 2); |
| 125 | printfcxx . . $ printf(581fddd72a8db8fc). ("\n"); |
| 126 | break; |
| 127 | case AO_TELEMETRY_SATELLITEcxx . . $ `ao-tools/lib/cc-telemetry.h:127:9`!: |
| 128 | printfcxx . . $ printf(581fddd72a8db8fc). ("sats %d", telem.satellitecxx . . $ ao_telemetry_all#satellite..channelscxx . . $ ao_telemetry_satellite#channels.); |
| 129 | for (c = 0; c < 12 && c < telem.satellitecxx . . $ ao_telemetry_all#satellite..channelscxx . . $ ao_telemetry_satellite#channels.; c++) { |
| 130 | printfcxx . . $ printf(581fddd72a8db8fc). (" sat %d svid %d c_n_1 %d", |
| 131 | c, |
| 132 | telem.satellitecxx . . $ ao_telemetry_all#satellite..satscxx . . $ ao_telemetry_satellite#sats.[c].svidcxx . . $ ao_telemetry_satellite_info#svid., |
| 133 | telem.satellitecxx . . $ ao_telemetry_all#satellite..satscxx . . $ ao_telemetry_satellite#sats.[c].c_n_1cxx . . $ ao_telemetry_satellite_info#c_n_1.); |
| 134 | } |
| 135 | printfcxx . . $ printf(581fddd72a8db8fc). ("\n"); |
| 136 | break; |
| 137 | case AO_TELEMETRY_MEGA_SENSOR_MPUcxx . . $ `ao-tools/lib/cc-telemetry.h:164:9`!: |
| 138 | case AO_TELEMETRY_MEGA_SENSOR_BMX160cxx . . $ `ao-tools/lib/cc-telemetry.h:165:9`!: |
| 139 | printfcxx . . $ printf(581fddd72a8db8fc). ("orient %3d accel %5d pres %9d temp %5d accel_x %5d accel_y %5d accel_z %5d gyro_x %5d gyro_y %5d gyro_z %5d mag_x %5d mag_y %5d mag_z %5d\n", |
| 140 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..orientcxx . . $ ao_telemetry_mega_sensor#orient., |
| 141 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..accelcxx . . $ ao_telemetry_mega_sensor#accel., |
| 142 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..prescxx . . $ ao_telemetry_mega_sensor#pres., |
| 143 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..tempcxx . . $ ao_telemetry_mega_sensor#temp., |
| 144 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..accel_xcxx . . $ ao_telemetry_mega_sensor#accel_x., |
| 145 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..accel_ycxx . . $ ao_telemetry_mega_sensor#accel_y., |
| 146 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..accel_zcxx . . $ ao_telemetry_mega_sensor#accel_z., |
| 147 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..gyro_xcxx . . $ ao_telemetry_mega_sensor#gyro_x., |
| 148 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..gyro_ycxx . . $ ao_telemetry_mega_sensor#gyro_y., |
| 149 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..gyro_zcxx . . $ ao_telemetry_mega_sensor#gyro_z., |
| 150 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..mag_xcxx . . $ ao_telemetry_mega_sensor#mag_x., |
| 151 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..mag_ycxx . . $ ao_telemetry_mega_sensor#mag_y., |
| 152 | telem.mega_sensorcxx . . $ ao_telemetry_all#mega_sensor..mag_zcxx . . $ ao_telemetry_mega_sensor#mag_z.); |
| 153 | break; |
| 154 | case AO_TELEMETRY_COMPANIONcxx . . $ `ao-tools/lib/cc-telemetry.h:148:9`!: |
| 155 | printfcxx . . $ printf(581fddd72a8db8fc).("board_id %3d update_period %3d channels %2d", |
| 156 | telem.companioncxx . . $ ao_telemetry_all#companion..board_idcxx . . $ ao_telemetry_companion#board_id., |
| 157 | telem.companioncxx . . $ ao_telemetry_all#companion..update_periodcxx . . $ ao_telemetry_companion#update_period., |
| 158 | telem.companioncxx . . $ ao_telemetry_all#companion..channelscxx . . $ ao_telemetry_companion#channels.); |
| 159 | for (c = 0; c < telem.companioncxx . . $ ao_telemetry_all#companion..channelscxx . . $ ao_telemetry_companion#channels.; c++) |
| 160 | printfcxx . . $ printf(581fddd72a8db8fc).(" %6d", telem.companioncxx . . $ ao_telemetry_all#companion..companion_datacxx . . $ ao_telemetry_companion#companion_data.[c]); |
| 161 | printfcxx . . $ printf(581fddd72a8db8fc).("\n"); |
| 162 | break; |
| 163 | case AO_TELEMETRY_MEGA_DATAcxx . . $ `ao-tools/lib/cc-telemetry.h:192:9`!: |
| 164 | printfcxx . . $ printf(581fddd72a8db8fc). ("state %1d v_batt %5d v_pyro %5d ", |
| 165 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..statecxx . . $ ao_telemetry_mega_data#state., |
| 166 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..v_battcxx . . $ ao_telemetry_mega_data#v_batt., |
| 167 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..v_pyrocxx . . $ ao_telemetry_mega_data#v_pyro.); |
| 168 | for (c = 0; c < 6; c++) |
| 169 | printfcxx . . $ printf(581fddd72a8db8fc). ("s%1d %5d ", c, |
| 170 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..sensecxx . . $ ao_telemetry_mega_data#sense.[c] | |
| 171 | (telem.mega_datacxx . . $ ao_telemetry_all#mega_data..sensecxx . . $ ao_telemetry_mega_data#sense.[c] << 8)); |
| 172 | |
| 173 | printfcxx . . $ printf(581fddd72a8db8fc). ("ground_pres %5d ground_accel %5d accel_plus %5d accel_minus %5d ", |
| 174 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..ground_prescxx . . $ ao_telemetry_mega_data#ground_pres., |
| 175 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..ground_accelcxx . . $ ao_telemetry_mega_data#ground_accel., |
| 176 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..accel_plus_gcxx . . $ ao_telemetry_mega_data#accel_plus_g., |
| 177 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..accel_minus_gcxx . . $ ao_telemetry_mega_data#accel_minus_g.); |
| 178 | |
| 179 | printfcxx . . $ printf(581fddd72a8db8fc). ("accel %6.2f speed %6.2f height %5d\n", |
| 180 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..accelerationcxx . . $ ao_telemetry_mega_data#acceleration. / 16.0, |
| 181 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..speedcxx . . $ ao_telemetry_mega_data#speed. / 16.0, |
| 182 | telem.mega_datacxx . . $ ao_telemetry_all#mega_data..heightcxx . . $ ao_telemetry_mega_data#height.); |
| 183 | |
| 184 | break; |
| 185 | case AO_TELEMETRY_METRUM_SENSORcxx . . $ `ao-tools/lib/cc-telemetry.h:216:9`!: |
| 186 | printfcxx . . $ printf(581fddd72a8db8fc). ("state %1d accel %5d pres %9d temp %6.2f acceleration %6.2f speed %6.2f height %5d v_batt %5d sense_a %5d sense_m %5d\n", |
| 187 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..statecxx . . $ ao_telemetry_metrum_sensor#state., |
| 188 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..accelcxx . . $ ao_telemetry_metrum_sensor#accel., |
| 189 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..prescxx . . $ ao_telemetry_metrum_sensor#pres., |
| 190 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..tempcxx . . $ ao_telemetry_metrum_sensor#temp. / 100.0, |
| 191 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..accelerationcxx . . $ ao_telemetry_metrum_sensor#acceleration. / 16.0, |
| 192 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..speedcxx . . $ ao_telemetry_metrum_sensor#speed. / 16.0, |
| 193 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..heightcxx . . $ ao_telemetry_metrum_sensor#height., |
| 194 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..v_battcxx . . $ ao_telemetry_metrum_sensor#v_batt., |
| 195 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..sense_acxx . . $ ao_telemetry_metrum_sensor#sense_a., |
| 196 | telem.metrum_sensorcxx . . $ ao_telemetry_all#metrum_sensor..sense_mcxx . . $ ao_telemetry_metrum_sensor#sense_m.); |
| 197 | break; |
| 198 | case AO_TELEMETRY_METRUM_DATAcxx . . $ `ao-tools/lib/cc-telemetry.h:241:9`!: |
| 199 | printfcxx . . $ printf(581fddd72a8db8fc). ("ground_pres %9d ground_accel %5d accel_plus %5d accel_minus %5d\n", |
| 200 | telem.metrum_datacxx . . $ ao_telemetry_all#metrum_data..ground_prescxx . . $ ao_telemetry_metrum_data#ground_pres., |
| 201 | telem.metrum_datacxx . . $ ao_telemetry_all#metrum_data..ground_accelcxx . . $ ao_telemetry_metrum_data#ground_accel., |
| 202 | telem.metrum_datacxx . . $ ao_telemetry_all#metrum_data..accel_plus_gcxx . . $ ao_telemetry_metrum_data#accel_plus_g., |
| 203 | telem.metrum_datacxx . . $ ao_telemetry_all#metrum_data..accel_minus_gcxx . . $ ao_telemetry_metrum_data#accel_minus_g.); |
| 204 | break; |
| 205 | case AO_TELEMETRY_MINIcxx . . $ `ao-tools/lib/cc-telemetry.h:258:9`!: |
| 206 | printfcxx . . $ printf(581fddd72a8db8fc). ("state %1d v_batt %5d sense_a %5d sense_m %5d pres %9d temp %6.2f acceleration %6.2f speed %6.2f height %5d ground_pres %9d\n", |
| 207 | telem.minicxx . . $ ao_telemetry_all#mini..statecxx . . $ ao_telemetry_mini#state., |
| 208 | telem.minicxx . . $ ao_telemetry_all#mini..v_battcxx . . $ ao_telemetry_mini#v_batt., |
| 209 | telem.minicxx . . $ ao_telemetry_all#mini..sense_acxx . . $ ao_telemetry_mini#sense_a., |
| 210 | telem.minicxx . . $ ao_telemetry_all#mini..sense_mcxx . . $ ao_telemetry_mini#sense_m., |
| 211 | telem.minicxx . . $ ao_telemetry_all#mini..prescxx . . $ ao_telemetry_mini#pres., |
| 212 | telem.minicxx . . $ ao_telemetry_all#mini..tempcxx . . $ ao_telemetry_mini#temp. / 100.0, |
| 213 | telem.minicxx . . $ ao_telemetry_all#mini..accelerationcxx . . $ ao_telemetry_mini#acceleration. / 16.0, |
| 214 | telem.minicxx . . $ ao_telemetry_all#mini..speedcxx . . $ ao_telemetry_mini#speed. / 16.0, |
| 215 | telem.minicxx . . $ ao_telemetry_all#mini..heightcxx . . $ ao_telemetry_mini#height., |
| 216 | telem.minicxx . . $ ao_telemetry_all#mini..ground_prescxx . . $ ao_telemetry_mini#ground_pres.); |
| 217 | break; |
| 218 | default: |
| 219 | printfcxx . . $ printf(581fddd72a8db8fc).("\n"); |
| 220 | } |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | int |
| 226 | maincxx . . $ main(afcd3168fc1188a4). (int argc, char **argv) |
| 227 | { |
| 228 | int c, i, ret = 0; |
| 229 | FILEcxx . . $ FILE# *file; |
| 230 | while ((c = getopt_longcxx . . $ getopt_long(41f665c090816971).(argc, argv, "c", optionscxx . . $ options., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) != -1) { |
| 231 | switch (c) { |
| 232 | case 'c': |
| 233 | ignore_crccxx . . $ ignore_crc. = 1; |
| 234 | break; |
| 235 | default: |
| 236 | usagecxx . . $ usage(fda57c8427c60377).(argv[0]); |
| 237 | break; |
| 238 | } |
| 239 | } |
| 240 | if (optindcxx . . $ optind. < argc) { |
| 241 | for (i = optindcxx . . $ optind.; i < argc; i++) { |
| 242 | file = fopencxx . . $ fopen(82ec0787cd37e0a3).(argv[i], "r"); |
| 243 | if (!file) { |
| 244 | perrorcxx . . $ perror(85c52e162fed56f9).(argv[i]); |
| 245 | ret++; |
| 246 | continue; |
| 247 | } |
| 248 | processcxx . . $ process(8d4262d45fc644ab).(file); |
| 249 | fclosecxx . . $ fclose(89bc1efcdac0ca22). (file); |
| 250 | |
| 251 | } |
| 252 | } else |
| 253 | processcxx . . $ process(8d4262d45fc644ab).(stdincxx . . $ `<external>/232824719582829767/stdio.h:153:9`!); |
| 254 | return ret; |
| 255 | } |