Code Monkey home page Code Monkey logo

Comments (1)

kb1lqd avatar kb1lqd commented on June 18, 2024

@kb1lqc This is false, REV D schematics show ADC_6 pin connected to VCC telemetry:

image

ADC_7 is the internal temperature sensor.

I've changed the ADC_6 telemetry parsing dictionary name to VCC.

Before
image

After
image

Running the telemetry parsing tutorial clearly shows that there is an error in the parsing of the packet. Board test should be 21C and VCC should be 0. There is an off by one bug on first pass.

{'ADC0': 0,
 'ADC1': 2143,
 'ADC2': 1925,
 'ADC3': 1879,
 'ADC4': 1938,
 'ADC5': 1820,
 'ADC8': 21,
 'BOARDTEMP': 0,
 'DESTINATIONCALLSIGN': 'KB1LQD',
 'DESTINATIONID': 1,
 'EPOCH': 1483690306.881,
 'GPIOSTATE': 192,
 'GPSALTITUDE': '-3.10000',
 'GPSALTITUDEUNITS': 'M',
 'GPSFIX': '1',
 'GPSHDOP': '1.15',
 'GPSLATITUDE': '3359.6954',
 'GPSLATITUDEDIR': 'N',
 'GPSLONGITUDE': '11826.9433',
 'GPSLONGITUDEDIR': 'W',
 'GPSSPEED': '0.560',
 'HABCUTDOWNSTATE': 0,
 'HABTIMER': 0,
 'HABTIMERSTATE': 0,
 'HABTRIGGERTIME': 7200,
 'RFSTATE': 7,
 'RTCDAY': 6,
 'RTCDOW': 5,
 'RTCHOUR': 7,
 'RTCMIN': 58,
 'RTCMONTH': 1,
 'RTCSEC': 36,
 'RTCYEAR': 57607,
 'SOURCECALLSIGN': 'KB1LQD',
 'SOURCEID': 1,
 'VCC': 1735}

Post-Fix
I removed the deletion of several parsed structure data fields and also found that the parsed indexes were also offset incorrectly causing wrong telemetry values. IOSTATE was missing and I added that to the dictionary. All data looks correct and VCC shows 0 and a highish value when a battery is providing external power.

No External Power

Note the VCC value.

--- Telemetry Packet #3 ---
Source Callsign KB1LQD
Source Callsign Length 6
Source Callsign ID 1
Destination Callsign KB1LQD
Destination Callsign Length 6
Destination Callsign ID 1
RTC Second 28
RTC Minute 52
RTC Hour 8
RTC Day 6
RTC Day Of Week 5
RTC Month 1
Year 57607
GPS Lattitude 3359.6935
GPS Lattitude Direction N
GPS Longitude 11826.9402
GPS Longitude Direction W
GPS Altitude 7.200000
GPS Altitude Units M
GPS Speed 0.690
GPS Fix 1
GPS HDOP 1.78
GPIO State Telemetry 192
IO State Telemetry 7
RF State Telemetry 0
ADC 0 2241
ADC 1 2026
ADC 2 2268
ADC 3 2024
ADC 4 1935
ADC 5 1902
VCC 0
CC430 Temperature 22
ADC 8 2836
HAB Automatic Cutdown Timer State Machine State 0
HAB Cutdown Event State Machine State 0
HAB Automatic Cutdown Timer Trigger Time 7200
HAB Automatic Cutdown Timer Current Time 0
EPOCH 1483692967.07
Parsed packet dictionary: {'RFSTATE': 0, 'GPIOSTATE': 192, 'VCC': 0, 'RTCMIN': 52, 'SOURCECALLSIGN': 'KB1LQD', 'GPSLONGITUDE': '11826.9402', 'SOURCEID': 1, 'RTCYEAR': 57607, 'ADC1': 2026, 'BOARDTEMP': 22, 'DESTINATIONID': 1, 'EPOCH': 1483692967.073, 'RTCSEC': 28, 'GPSLATITUDE': '3359.6935', 'IOSTATE': 7, 'GPSSPEED': '0.690', 'RTCDAY': 6, 'RTCMONTH': 1, 'GPSFIX': '1', 'RTCHOUR': 8, 'HABTIMER': 0, 'GPSHDOP': '1.78', 'ADC3': 2024, 'HABTRIGGERTIME': 7200, 'DESTINATIONCALLSIGNLEN': 6, 'GPSLONGITUDEDIR': 'W', 'DESTINATIONCALLSIGN': 'KB1LQD', 'ADC4': 1935, 'ADC5': 1902, 'SOURCECALLSIGNLEN': '6', 'GPSALTITUDE': '7.200000', 'ADC0': 2241, 'GPSLATITUDEDIR': 'N', 'ADC2': 2268, 'HABTIMERSTATE': 0, 'RTCDOW': 5, 'HABCUTDOWNSTATE': 0, 'ADC8': 2836, 'GPSALTITUDEUNITS': 'M'}

External Power

Note the VCC value.

--- Telemetry Packet #3 ---
Source Callsign KB1LQD
Source Callsign Length 6
Source Callsign ID 1
Destination Callsign KB1LQD
Destination Callsign Length 6
Destination Callsign ID 1
RTC Second 36
RTC Minute 50
RTC Hour 8
RTC Day 6
RTC Day Of Week 5
RTC Month 1
Year 57607
GPS Lattitude 3359.7068
GPS Lattitude Direction N
GPS Longitude 11826.9349
GPS Longitude Direction W
GPS Altitude 8.310000
GPS Altitude Units M
GPS Speed 0.270
GPS Fix 1
GPS HDOP 2.10
GPIO State Telemetry 192
IO State Telemetry 7
RF State Telemetry 0
ADC 0 2241
ADC 1 2015
ADC 2 2249
ADC 3 1999
ADC 4 1914
ADC 5 1919
VCC 1132
CC430 Temperature 22
ADC 8 2842
HAB Automatic Cutdown Timer State Machine State 0
HAB Cutdown Event State Machine State 0
HAB Automatic Cutdown Timer Trigger Time 7200
HAB Automatic Cutdown Timer Current Time 0
EPOCH 1483692854.47
Parsed packet dictionary: {'RFSTATE': 0, 'GPIOSTATE': 192, 'VCC': 1132, 'RTCMIN': 50, 'SOURCECALLSIGN': 'KB1LQD', 'GPSLONGITUDE': '11826.9349', 'SOURCEID': 1, 'RTCYEAR': 57607, 'ADC1': 2015, 'BOARDTEMP': 22, 'DESTINATIONID': 1, 'EPOCH': 1483692854.469, 'RTCSEC': 36, 'GPSLATITUDE': '3359.7068', 'IOSTATE': 7, 'GPSSPEED': '0.270', 'RTCDAY': 6, 'RTCMONTH': 1, 'GPSFIX': '1', 'RTCHOUR': 8, 'HABTIMER': 0, 'GPSHDOP': '2.10', 'ADC3': 1999, 'HABTRIGGERTIME': 7200, 'DESTINATIONCALLSIGNLEN': 6, 'GPSLONGITUDEDIR': 'W', 'DESTINATIONCALLSIGN': 'KB1LQD', 'ADC4': 1914, 'ADC5': 1919, 'SOURCECALLSIGNLEN': '6', 'GPSALTITUDE': '8.310000', 'ADC0': 2241, 'GPSLATITUDEDIR': 'N', 'ADC2': 2249, 'HABTIMERSTATE': 0, 'RTCDOW': 5, 'HABCUTDOWNSTATE': 0, 'ADC8': 2842, 'GPSALTITUDEUNITS': 'M'}

from faraday-software.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.