most functionality to splashdwon, find neutral and start mission. short timeouts still in code for testing, will adjust to go directly to sit_idle after splashdown

Dependencies:   mbed MODSERIAL FATFileSystem

Committer:
joel_ssc
Date:
Mon May 13 19:25:26 2019 +0000
Revision:
92:52a91656458a
Parent:
91:916ee0fea9ff
version for first flight test, timeouts not yet set correctly

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tnhnrl 73:f6f378311c8d 1 Modified FSG PCB V_1_1
tnhnrl 73:f6f378311c8d 2 - Freezes when doing a dive or any timed sequence (commented out SD card references)
tnhnrl 73:f6f378311c8d 3 - commented out sdLogger().appendLogFile(current_state, 0); //open SD file once
tnhnrl 73:f6f378311c8d 4 - commented out sdLogger().appendLogFile(current_state, 1); //writing data
tnhnrl 73:f6f378311c8d 5 - commented out sdLogger().appendLogFile(current_state, 0); //close log file
tnhnrl 73:f6f378311c8d 6 - reduced timer to 20 seconds for bench testing
tnhnrl 73:f6f378311c8d 7 - modified ConfigFileIO for rudder()
tnhnrl 73:f6f378311c8d 8 - added in getFloatUserInput function from newer code
tnhnrl 73:f6f378311c8d 9 - changed LinearActuator & batt() in StaticDefs to match new pinouts from Bob/Matt/Troy fixes
tnhnrl 73:f6f378311c8d 10 - slowed down battery motor because it's silly fast at 30 volts (bench test)
tnhnrl 73:f6f378311c8d 11 * BCE gain is proportional 0.1 now 0.01
tnhnrl 73:f6f378311c8d 12 - BATT was moving in the wrong direction, gain was P: 0.10, I: 0.0, D: 0.0
tnhnrl 73:f6f378311c8d 13 * change gain to P: -0.10 (gain was flipped, I think the old circuit board had the voltages flipped ? ?)
tnhnrl 73:f6f378311c8d 14 - StateMachine changes for testing
tnhnrl 73:f6f378311c8d 15 * added keyboard_menu_STREAM_STATUS();
tnhnrl 73:f6f378311c8d 16 * added keyboard_menu_RUDDER_SERVO_settings();
tnhnrl 73:f6f378311c8d 17 - modified the zero on the battery position from 610 to 836
tnhnrl 73:f6f378311c8d 18 - BMM (batt) slope may be incorrect, seems low, currently 0.12176
tnhnrl 73:f6f378311c8d 19 - modified the zero on BCE from 253 to 460
tnhnrl 73:f6f378311c8d 20 - Pressure readings are wrong
tnhnrl 73:f6f378311c8d 21 * added readADCCounts() to omegaPX209 class to see channel readings
tnhnrl 73:f6f378311c8d 22 * modified omegaPX209 class to use filtered ADC readings from SpiADC.readCh4()
tnhnrl 73:f6f378311c8d 23 - fixed rudderLoop to headingLoop from newer code
tnhnrl 73:f6f378311c8d 24 Modified FSG PCB V_1_2
tnhnrl 73:f6f378311c8d 25 - added init headingLoop to main
tnhnrl 73:f6f378311c8d 26 - added pitch and heading outputs to STREAM_STATUS
tnhnrl 73:f6f378311c8d 27 NOTE: Flipped motor controller output on connector side with battery mass mover (BMM)
tnhnrl 73:f6f378311c8d 28 - Motor direction was opposite the BCE motor (because of gearing)
tnhnrl 73:f6f378311c8d 29 - BMM P gain is now positive 0.02 (from -0.10)
tnhnrl 73:f6f378311c8d 30 Modified FSG PCB V_1_3
tnhnrl 73:f6f378311c8d 31 - added timing code for interrupt that drives the rudder (testing with o-scope)
tnhnrl 73:f6f378311c8d 32 - PID controller replaced with newer version from 5/29 code branch
tnhnrl 73:f6f378311c8d 33 - StateMachine hanged style of variables to match convention in code
tnhnrl 73:f6f378311c8d 34 Modified FSG PCB V_1_4
tnhnrl 73:f6f378311c8d 35 - adc tests
tnhnrl 73:f6f378311c8d 36 Modified FSG PCB V_1_5
tnhnrl 73:f6f378311c8d 37 - IMU update
tnhnrl 73:f6f378311c8d 38 - Testing print outs
tnhnrl 73:f6f378311c8d 39 Modified FSG PCB V_1_6
tnhnrl 73:f6f378311c8d 40 - new BMM zero count of 240 (confirmed manually)
tnhnrl 73:f6f378311c8d 41 - new BCE zero count of 400 (confirmed manually)
tnhnrl 73:f6f378311c8d 42 - Modified emergency climb to go to position 10 on the BMM, not zero (almost relying on the limit switch)
tnhnrl 73:f6f378311c8d 43 - fixed keyboard input; including typing in the timeout (can enter exact times)
tnhnrl 73:f6f378311c8d 44 Modified FSG PCB V_1_7
tnhnrl 73:f6f378311c8d 45 - removed data logger references
tnhnrl 73:f6f378311c8d 46 - fixed bug where I was logging data twice in the interrupt code and the main file
tnhnrl 73:f6f378311c8d 47 - fixed bug where Multi-Dive sequence wasn't restarting (the counter used to get the current state was not reset)
tnhnrl 73:f6f378311c8d 48 Modified FSG PCB v_1_7C
tnhnrl 73:f6f378311c8d 49 - fixing a bug with the data transmission (output had newline character) because of packet lengths
tnhnrl 73:f6f378311c8d 50 - new version blasts data and Python program requests lost packets, dramatically faster over USB, slightly faster over XBee
tnhnrl 73:f6f378311c8d 51 - fixed some format and terminal errors
tnhnrl 74:d281aaef9766 52 Modified code 2018-08-06
tnhnrl 74:d281aaef9766 53 - fixed bug with heading save feature, wasn't updating deadband properly
tnhnrl 74:d281aaef9766 54 - modified input on servo sub-menu
tnhnrl 74:d281aaef9766 55 Modified code 2018-08-07
tnhnrl 74:d281aaef9766 56 - Float broadcast changed to command rudder to center in that state (whatever center is in the file)
tnhnrl 74:d281aaef9766 57 - Was sending the wrong command to the position dive (BMM)
tnhnrl 74:d281aaef9766 58 Modified code 2018-08-14
tnhnrl 74:d281aaef9766 59 - Fixed the deadband on "case Float_Broadcast" so it exits properly, I was seeing the BCE stop around 317 so I made a fixed deadband of 4.0 (anything 316 or above will exit the state)
tnhnrl 74:d281aaef9766 60 - FIND_NEUTRAL was code was double-checked:
tnhnrl 74:d281aaef9766 61 1) Starts with an offset of 25 mm from the manually found neutral BCE position (still buoyant), BMM starts at that neutral position
tnhnrl 74:d281aaef9766 62 2) case NEUTRAL_SINKING: Every 5 seconds it retracts the BCE 5 mm. When it reaches the input depth setpoint it switches to NEUTRAL_RISING
tnhnrl 74:d281aaef9766 63 3) case NEUTRAL_SLOWLY_RISE: Every 5 seconds it extends the BCE 2 mm. When it starts to rise (depth rate is negative) (depth rate positive is sinking, negative is rising) it will immediately stop
tnhnrl 74:d281aaef9766 64 and go to case NEUTRAL_CHECK_PITCH. Removed an incorrect line of code that was setting BCE position with depthloop output.
tnhnrl 74:d281aaef9766 65 4) case NEUTRAL_CHECK_PITCH: Every 10 seconds the pitch is adjusted +/- 0.5 mm depending on whether the nose is pitched up or pitched down
tnhnrl 75:92e79d23d29a 66 (the timing is because the PV may move around in the water before it stabilizes)
tnhnrl 75:92e79d23d29a 67 - Homing Sequence now moves at -0.5 not -0.1 (was way too slow)
tnhnrl 75:92e79d23d29a 68 Modified code at Carderock (2018-08-15)
tnhnrl 75:92e79d23d29a 69 - Removed -1 multiplier from IMU outputs
tnhnrl 75:92e79d23d29a 70 - Pitch is incorrectly oriented now, pitch down
tnhnrl 75:92e79d23d29a 71 - Heading/Yaw is off by 90 degrees I believe (north is not north)
tnhnrl 75:92e79d23d29a 72 - Did not check roll
tnhnrl 76:c802e1da4179 73 - KNOWN ISSUE of log file not having consistent line length (will throw off python data receiver)
tnhnrl 76:c802e1da4179 74 Modified code at Carderock (2018-08-16)
joel_ssc 84:eccd8e837134 75 - Observations at LASR lead to fixes on the save PID files, zero offsets were saving incorrectly, fixed
joel_ssc 84:eccd8e837134 76 2019 feb 15 Modified code jcw
joel_ssc 84:eccd8e837134 77 - LogOO?.csv name and version number is set with logvers.txt
joel_ssc 84:eccd8e837134 78 - DIAG00?.txt likewise set with logvers.txt
joel_ssc 84:eccd8e837134 79 - diagnostic logging to diagnostics file
joel_ssc 84:eccd8e837134 80 - legfile.txt sets parameters ( max-depth, min_depth, heading, timeout, yo_time) for a dive leg, after which mbed program ends
joel_ssc 84:eccd8e837134 81 to allow monitor computer to access via usb filesystem
joel_ssc 84:eccd8e837134 82 - added states: Leg_position_dive, leg_position_rise, fb_exit to handle above yo-yo leg and exit
joel_ssc 84:eccd8e837134 83 have not yet added these states in menu operations.
joel_ssc 84:eccd8e837134 84 STILL TO DO:
joel_ssc 84:eccd8e837134 85 - test size of log file and set new log file name and update logvers.txt
joel_ssc 84:eccd8e837134 86 - allow for something other than 0=leg in legfile.txt so that state will NOT drop into legfile.txt operations mode
joel_ssc 85:dd8176285b6e 87 - add access to leg_position_dive ( with exit??) to menu operations -maybe
joel_ssc 89:0b8291dbf340 88 25 feb 2019 DONE: jcw
joel_ssc 85:dd8176285b6e 89 - added state ENDLEG_WAIT - will drop to keyboard/FLOAT_BROADCAST if char is read over xbee() while waiting
joel_ssc 85:dd8176285b6e 90 - test time for log file to be cycled - in main.cpp
joel_ssc 89:0b8291dbf340 91 - convert from feet to meters in depth().getposition() calls ( deep inside outerloop() )
joel_ssc 91:916ee0fea9ff 92 07may2019 DONE as of now jcw
joel_ssc 89:0b8291dbf340 93 - fixed version of posvelfilt that can deal with heading variables
joel_ssc 89:0b8291dbf340 94 - state FLYING_IDLE that is to be ended by a pulldown on a DigitalIn line - presently has a timeout for testing
joel_ssc 91:916ee0fea9ff 95 - state START_SWIM that is started automatically at end of FLYING_IDLE and splashdown wait
joel_ssc 89:0b8291dbf340 96 - Find_Neutral will run immediately if splashdown ends with FSG upside down, but START_SWIM will exit the mbed program
joel_ssc 89:0b8291dbf340 97 and return control to Raspberry PI for communications.
joel_ssc 91:916ee0fea9ff 98 I have not yet exercised code that would run if the FSG submerges and does not self -right under water.
joel_ssc 91:916ee0fea9ff 99 It should happen soon. I think I do that on the bench.
joel_ssc 91:916ee0fea9ff 100 - FIND_NEUTRAL will be run if flag and file showing neutral found has not been set - this is important in my view.
joel_ssc 89:0b8291dbf340 101 if find Neutral fails, file is written to warn raspberry PI
joel_ssc 89:0b8291dbf340 102 - lots of flashing leds() to indicate still running.
joel_ssc 91:916ee0fea9ff 103 - runs on bare board. still to be tested with FSG full system, or even pieces - such as imu().
joel_ssc 91:916ee0fea9ff 104
joel_ssc 91:916ee0fea9ff 105