Index: auv/altex/onboard/CARL/CARLServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/CARLServer.cc,v retrieving revision 1.9.2.8 retrieving revision 1.9.2.2 diff -r1.9.2.8 -r1.9.2.2 21d20 < #include "NavigationIF.h" 41c40 < : _attributes(CARL_IFServerName), _aja_online(False), _navIF(NULL) --- > : _attributes(CARL_IFServerName), _aja_online(False) 48,50d46 < _attributes.add(new IntegerAttribute("InitPower", "Initial Power State", < &_init_power, 1L)); < 67,80d62 < < try { < _navIF = new NavigationIF("navigation", 2); < } < catch (SharedObjectClient::MissingServer e) { < Syslog::write("CARLServer - Missing server: %s\n", < e.msg); < _navIF = NULL; < } < catch (...) { < Syslog::write("CARLServer - caught something!\n"); < throw; < } < 87c69 < --- > 108,118d89 < // Use light level of zero to turn auto-iris function off. < // < DeviceIF::Status CARLServer::auto_iris(float target_light_level) < { < ModtronixMsg::Message msg(ModtronixMsg::EZAutoFS); < msg._float = target_light_level; < _msgQ->write(&msg); < triggerEvent(CARL_IF::MessagesWaiting); < return DeviceIF::Ok; < } < 255,257c226,228 < (1*_mod_output->data.light_power[0] + < 2*_mod_output->data.light_power[1] + < 4*_mod_output->data.light_power[2] + --- > (1*_mod_output->data.light_power[0] + > 2*_mod_output->data.light_power[1] + > 4*_mod_output->data.light_power[2] + 295d265 < char* on = _init_power ? "-o" : ""; 300c270 < --- > 305,307c275,277 < Syslog::write("CARLServer::spawnAuxTasks() - modtronix %s -h %s -p %s -m %s", < on, _mod_ip, _mod_port, buf); < execlp("modtronix", "modtronix", on, "-h", _mod_ip, "-p", _mod_port, --- > Syslog::write("CARLServer::spawnAuxTasks() - modtronix -h %s -p %s -m %s", > _mod_ip, _mod_port, buf); > execlp("modtronix", "modtronix", "-h", _mod_ip, "-p", _mod_port, 353a324 > Syslog::write("CARLServer::set_clipname()"); 358,359d328 < msg._int = _navIF? (int)_navIF->depth() : 1; < 362,363d330 < Syslog::write("CARLServer::set_clipname() - using depth: %d from _navIF? %d", < msg._int, (_navIF != NULL)); 399c366 < Boolean debug = True; --- > Boolean debug = False; Index: auv/altex/onboard/CARL/CARLServer.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/CARLServer.h,v retrieving revision 1.7.2.7 retrieving revision 1.7.2.2 diff -r1.7.2.7 -r1.7.2.2 24a25 > class ModtronixMsg; 38d38 < class NavigationIF; 40,41d39 < class ModtronixMsg; < 49c47 < --- > 82,84d79 < // Use light level of zero to turn auto-iris function off. < // < virtual DeviceIF::Status auto_iris(float target_light_level); 88c83 < --- > 91d85 < long _init_power; 102d95 < NavigationIF *_navIF; Index: auv/altex/onboard/CARL/EZ17.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/EZ17.cc,v retrieving revision 1.4.2.4 retrieving revision 1.4.2.2 diff -r1.4.2.4 -r1.4.2.2 124,126d123 < < #define EZ17_MIN_BYTES 8 < 131c128 < int EZ17::read_position(char ntries) --- > int EZ17::read_position() 135a133,134 > send_msg("/1?8"); > nbytes = read_msg(); 137,139c136,138 < // Multiple attempts are often necessary to receive a valid response < // < for (char i = 0; i < ntries; i++) --- > // Got to be a minimum of 8 bytes > // > if (nbytes > 7) 141,144c140 < send_msg("/1?8"); < nbytes = read_msg(); < < // Got to be a minimum of 8 bytes --- > // Ensure the packet has the correct structure 146c142 < if (nbytes >= 8) --- > if (_inbuf[3] == '`' || _inbuf[3] == '@') 148,161c144,147 < // Ensure the packet has the correct structure < // < if (_inbuf[3] == '`' || _inbuf[3] == '@') < { < _inbuf[nbytes-3] = '\0'; < sscanf(_inbuf+4, "%d", &_position); < dprintf("EZ17::read_position() - position is %d", _position); < return _position; < } < } < else < { < dprintf("EZ17::read_position() - %d bytes read from EZ17, expecting %d", < nbytes, EZ17_MIN_BYTES); --- > _inbuf[nbytes-3] = '\0'; > sscanf(_inbuf+4, "%d", &_position); > dprintf("EZ17::read_position() - position is %d", _position); > return _position; 163a150,153 > else > { > dprintf("EZ17::read_position() - insufficient bytes read from EZ17"); > } 246d235 < read_position(); Index: auv/altex/onboard/CARL/EZ17.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/EZ17.h,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.2 diff -r1.1.2.4 -r1.1.2.2 52c52 < int read_position(char ntries = 5); --- > int read_position(); Index: auv/altex/onboard/CARL/EZMod.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/EZMod.cc,v retrieving revision 1.11.2.7 retrieving revision 1.11.2.2 diff -r1.11.2.7 -r1.11.2.2 40c40 < if (NULL == modmsg) // Handle on-going move, if applicable --- > if (NULL == modmsg) 45,46c45 < // Is the motor moving? < // --- > _output->data.motor_action = 1; 50,60d48 < // < _ezMove = False; < < // Has the motor stopped at the expected location? < // < if (_expectedPos != _ezPos) < Syslog::write("EZMod - Move finished, position is not %d.", _expectedPos); < < < // Special if this was a move to the home position < // 63,71c51,53 < _ezHome = False; // Done, no longer homing < < if (0 !=_ezPos) < Syslog::write("EZMod - homing finished, position is not 0"); < < _ez17->set_position(660); // Set EZ17 stepper count < _ezPos = 660; // and Modtronix position < < _irisClosed = True; // Home position is virtually a closed iris --- > // If the move was to home, set the position > _ez17->set_position(660); > _ezMove = False; _output->data.motor_action = 0; 74,75c56,57 < // Always save the position in the EZ Stepper to use when it powers-up < // --- > dprintf("Modtronix::EZ17Handler() - motor stopped\n"); > // Save the position to the startup script 77,79c59 < < dprintf("Modtronix::EZ17Handler() - motor stopped. Iris closed? %d\n", < _irisClosed); --- > _ezMove = False; _output->data.motor_action = 0; 83,86d62 < // Motor is still moving < // < _ezMove = True; < _irisClosed = False; 93,104c69 < Syslog::write("Modtronix::EZ17Handler() - got message %d %d %f", < modmsg->_msg, modmsg->_int, modmsg->_float); < < // Check to see if the EZ17 is 'ready' for a move. < // These function calls introduce a small delay that seems < // to be required before executing move commands in quick < // succession. A negative return value indicates the EZ17 is not < // ready. Readiness is not required to attempt the command. < // < if (_ez17->read_position(10) < 0) < Syslog::write("Modtronix::EZ17Handler() - EZ17 not ready for a move?"); < --- > Syslog::write("Modtronix::EZ17Handler() - got message %d", modmsg->_msg); 109,111c74,75 < _ezMove = _ezHome = True; < _expectedPos = 0; < _ez17->home(); --- > _ezMove = _ezHome = True; _output->data.motor_action = 1; > _ez17->home(); _ez17->home(); 117,119c81,82 < _ezMove = True; _ezHome = False; < _expectedPos = EZ17FS2Steps(modmsg->_int); < _ez17->goto_steps(_expectedPos); --- > _ezMove = True; _ezHome = False; _output->data.motor_action = 1; > _ez17->goto_steps(EZ17FS2Steps(modmsg->_int)); 135d97 < _output->data.motor_action = _ezMove; 138,139c100,101 < < return _ezMove; --- > > return 0; 142,161d103 < #define FS31 15 < #define FS32 25 < #define FS33 60 < #define FS41 90 < #define FS42 130 < #define FS43 165 < #define FS561 200 < #define FS562 240 < #define FS563 280 < #define FS81 320 < #define FS82 360 < #define FS83 400 < #define FS111 435 < #define FS112 475 < #define FS113 515 < #define FS161 555 < #define FS162 595 < #define FS163 630 < #define FS221 660 < 169c111 < return FS31; --- > return 15; 171c113 < return FS32; --- > return 25; 173c115 < return FS33; --- > return 60; 175c117 < return FS41; --- > return 90; 177c119 < return FS42; --- > return 130; 179c121 < return FS43; --- > return 165; 181c123 < return FS561; --- > return 200; 183c125 < return FS562; --- > return 240; 185c127 < return FS563; --- > return 280; 187c129 < return FS81; --- > return 320; 189c131 < return FS82; --- > return 360; 191c133 < return FS83; --- > return 400; 193c135 < return FS111; --- > return 435; 195c137 < return FS112; --- > return 475; 197c139 < return FS113; --- > return 515; 199c141 < return FS161; --- > return 555; 201c143 < return FS162; --- > return 595; 203c145 < return FS163; --- > return 630; 205c147 < return FS221; --- > return 660; 211c153,154 < // Just check on the motor position. Return non-zero if position is changing. --- > // Just check on the motor position > // If the position is not changing set _ezHome to False Index: auv/altex/onboard/CARL/KiPro.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/KiPro.cc,v retrieving revision 1.8.2.6 retrieving revision 1.8.2.2 diff -r1.8.2.6 -r1.8.2.2 93,104c93,100 < rem.tv_nsec = 100L; < while (rem.tv_sec > 0L && rem.tv_nsec > 0L) < { < clock_gettime(CLOCK_REALTIME, &ts); < //printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); < ts.tv_sec = 60 - (ts.tv_sec % 60); < ts.tv_nsec = 1000000000L - ts.tv_nsec; < < Syslog::write("%s KiPro::time_sync() - delaying %ld:%ld seconds", _name, < ts.tv_sec, ts.tv_nsec); < nanosleep(&ts, &rem); < } --- > clock_gettime(CLOCK_REALTIME, &ts); > //printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); > ts.tv_sec = 59 - (ts.tv_sec % 60); > ts.tv_nsec = 1000000000L - ts.tv_nsec; > > Syslog::write("%s KiPro::time_sync() - delaying %ld seconds", _name, ts.tv_sec); > nanosleep(&ts, &rem); > 181d176 < _timecode = 0.0; 193c188,203 < if (strstr(KiPro::_response, "InputTimecode")) --- > if (!strstr("not found", KiPro::_response) && > !strstr("404", KiPro::_response)) > { > found = True; > break; // Success! > } > } > > _timecode = 0.0; > if (found) > { > // Find the substring 'str_value:' and read the result > // > float result, hr, min, sec, csec; > char *value = strstr(KiPro::_response, "InputTimecode"); > if (value) 195,197c205 < float result, hr, min, sec, csec; < char *value = strstr(KiPro::_response, "InputTimecode"); < if (value) --- > if (value = strstr(value, "str_value")) 199,210c207,211 < if (value = strstr(value, "str_value")) < { < dprintf("KiPro::get_timecode() - connectionid = %d/value string %s\n", id, value); < sscanf(value, "str_value\":\"%f:%f:%f:%f\"", &hr, &min, &sec, &csec); < _timecode = hr*3600 + min*60 + sec + csec/100.; < dprintf("KiPro::get_timecode() - value: %d:%d:%d:%d => %f\n", < (int)hr, (int)min, (int)sec, (int)csec, _timecode); < } < else < { < dprintf("KiPro::get_timecode() - \"str_value\" not found in response\n"); < } --- > dprintf("KiPro::get_timecode() - connectionid = %d/value string %s\n", id, value); > sscanf(value, "str_value\":\"%f:%f:%f:%f\"", &hr, &min, &sec, &csec); > _timecode = hr*3600 + min*60 + sec + csec/100.; > dprintf("KiPro::get_timecode() - value: %d:%d:%d:%d => %f\n", > (int)hr, (int)min, (int)sec, (int)csec, _timecode); 214c215 < Syslog::write("KiPro::get_timecode() - \"InputTimecode\" not found in response\n"); --- > dprintf("KiPro::get_timecode() - \"str_value\" not found in response\n"); 216,218c217,221 < found = True; < break; // Success! < } --- > } > else > { > dprintf("KiPro::get_timecode() - \"InputTimecode\" not found in response\n"); > } 234,272d236 < void KiPro::connect() < { < Boolean debug = False; < < sprintf(_buf, "http://%s/config?action=connect", _server_ip); < Syslog::write("KiPro::connect() url - %s", _buf); < < curl_setup(); < curl_easy_setopt(_curl, CURLOPT_URL, _buf); < int c = curl_execute(); curl_cleanup(); < < dprintf("KiPro::connect() response - %s, return %d", < KiPro::_response, c); < < } < < int KiPro::transport_state() < { < Boolean debug = False; < < sprintf(_buf, "http://%s/config?action=get¶mid=eParamID_TransportState", < _server_ip); < dprintf("KiPro::transport_state() url - %s", _buf); < < curl_setup(); < curl_easy_setopt(_curl, CURLOPT_URL, _buf); < int c = curl_execute(); curl_cleanup(); < < dprintf("KiPro::transport_state() response - %s, return %d", < KiPro::_response, c); < < if (strstr(KiPro::_response, "Recording")) < _recording = 1; < else < _recording = 0; < < return _recording; < } < 279,283d242 < if (-1 == state) < { < return transport_state(); < } < 285d243 < 295,296c253 < Syslog::write("KiPro::record_button(%d) response - %s, return %d", < state, KiPro::_response, c); --- > Syslog::write("KiPro::data_mode(%d) response - %s", state, KiPro::_response); 298,305c255 < if (c != CURLE_OK) < { < _recording = 0; < } < else < { < _recording = (state > 0); < } --- > _recording = (state > 0); 308c258 < return _recording; --- > return c; 318,319c268 < #if 0 < // Use a default name based on the time if none is provided --- > // Use default vamue is none is provided 337,360d285 < #endif < // Use a default name based on the time if none is provided < // < char postfix[32]; < char time_buf[62]; < if (name == NULL || strlen(name) < 1) < postfix[0] = '\0'; < else < sprintf(postfix, "-%s", name); < < long now; < time(&now); < struct tm *default_time = localtime(&now); < sprintf(time_buf+strlen(time_buf), "%4d%02d%02dT%02d:%02d:%02dZ", < default_time->tm_year + 1900, < default_time->tm_mon+1, < default_time->tm_mday, < default_time->tm_hour, < default_time->tm_min, < default_time->tm_sec < ); < name = time_buf; < < if (strlen(postfix) > 0) strcat(time_buf, postfix); Index: auv/altex/onboard/CARL/KiPro.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/KiPro.h,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.2 diff -r1.6.2.3 -r1.6.2.2 55,58d54 < // Initialize connection to KiPro < // < void connect(); < 76,77d71 < int transport_state(); < Index: auv/altex/onboard/CARL/Modtronix.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/Modtronix.cc,v retrieving revision 1.15.2.14 retrieving revision 1.15.2.2 diff -r1.15.2.14 -r1.15.2.2 37,40d36 < #define ROUNDF(f) ( (f) < 0.0 ? (f) - 0.5 : (f) + 0.5 ) < #define COUNTS_2_VOLTS(c) ( ((c) * 5.0) / 1024.0 ) < < 62,63c58 < #define BOOTTIME 50 // in seconds < #define MAX_POWER_INTERRUPTS 3 // before power cycling camera and recorder --- > #define BOOTTIME 50 //seconds 83,84c78 < _clipnameReq(False), _target_light_level(0), _irisClosed(False), < _savedMsg(NULL), _fStop(0), _powerInterrupts(0) --- > _clipnameReq(False) 94a89,90 > _output = new ModtronixOutput(); > 114,116c110,112 < _msgQ = new ModtronixMsg(); < _output = new ModtronixOutput(); < _log = new ModtronixLog(this, DataLog::BinaryFormat, "ModtronixLog"); --- > _msgQ = new ModtronixMsg(); > _output = new ModtronixOutput(); > _log = new ModtronixLog(this, DataLog::BinaryFormat, "ModtronixLog"); 123,131c119,121 < if (_mod_ip) delete _mod_ip; < if (_name) delete _name; < if (_output) delete _output; < if (_carlIF) delete _carlIF; < if (_layeredControl) delete _layeredControl; < if (_msgQ) delete _msgQ; < if (_log) delete _log; < if (_ez17) delete _ez17; < if (_aja) delete _aja; --- > if (_mod_ip) delete _mod_ip; > if (_name) delete _name; > if (_output) delete _output; 288,289c278 < // Auto-iris function uses the lights and fstop controls to converge < // on a target mean light level --- > // check for CTD data on ctd port 291,292c280 < #define MARGIN 0.1 < int Modtronix::auto_iris() --- > int Modtronix::get_ctd_data() 294,295c282 < Boolean debug = True; < int delta = 0; // Motor position delta --- > Boolean debug = FILE_DEBUG || True; 297,306c284,285 < // Return if iris motor already moving < // < if (_ezMove) < return 0; < < // Open or close the iris depending on the light levels < // Lowest level when camera is off or booting is 24.4 < // < if ( _output->data.video_mean >= 1.25 && < MARGIN < fabs((_output->data.video_mean - (float)_target_light_level)) ) --- > int nbytes = read_msg(CTDX); > if (nbytes > 0) 308,331c287,288 < // Get the current motor position < // < EZ17Watch(); < < if (_auto_iris_done) < { < // Required Iris adjustment just detected < dprintf("Modtronix::auto_iris() triggered - measured:%f target:%d", < _output->data.video_mean, _target_light_level); < } < < _auto_iris_done = False; < if (_output->data.video_mean > _target_light_level) < { < if (_ezPos < 620) delta = 20; // increment/decrement by 20 motor counts < // else lower the lights? < } < else < { < if (_ezPos > 40) delta = -20; < // else raise the lights? < } < dprintf("Modtronix::auto_iris() measured:%f target:%d, adjusting by %d", < _output->data.video_mean, _target_light_level, delta); --- > // Parse CTD data into output structure > dprintf("Modtronix::mod_callback - %d bytes of CTD data: %s\n", nbytes, _mod_bufs[CTDX]); 334,340c291 < { < if (!_auto_iris_done) < { < // Required Iris adjustment finished < dprintf("Modtronix::auto_iris() satisfied - measured:%f target:%d", < _output->data.video_mean, _target_light_level); < } --- > dprintf("Modtronix::mod_callback - no CTD data pending\n"); 342,347c293 < _auto_iris_done = True; < } < < // Adjust iris if necessary < // < if (delta != 0) _ez17->goto_steps(_ezPos + delta); --- > send_msg(CTDX, "TS\r\n"); 349c295 < return delta; --- > return nbytes; 398,426c344 < // Faults and switches < // < send_msg(MODX, "%n25"); // Pin F0 < read_msg(MODX); < _output->data.sw0 = atof(MOD_BUF); < dprintf("Modtronix::mod_callback - \t\t\t\tSWO = %fV\n", < _output->data.sw0); < < send_msg(MODX, "%n26"); // Pin F1 < read_msg(MODX); < _output->data.sw1 = atof(MOD_BUF); < dprintf("Modtronix::mod_callback - \t\t\t\tSW1 = %fV\n", < _output->data.sw1); < < send_msg(MODX, "%n27"); // Pin F2 < read_msg(MODX); < _output->data.sw2 = atof(MOD_BUF); < dprintf("Modtronix::mod_callback - \t\t\t\tSW2 = %fV\n", < _output->data.sw2); < < < // Intermediate A/D values < // < float v, ft; < int it; < < // Temperature and Humidity < // < send_msg(MODX, "%n12"); // Pin A2 --- > send_msg(MODX, "%n22"); // Pin A2 429,454c347,348 < v = COUNTS_2_VOLTS(atoi(MOD_BUF)); < _output->data.humidity = (v - 0.5) * 50.0; < dprintf("Modtronix::mod_callback - \t\tHumidity = %.2f\n", _output->data.humidity); < < send_msg(MODX, "%n13"); // Pin A3 < read_msg(MODX); < // voltage = 0.537V + 0.01V * degrees C < // temp = (voltage - 0,537)/0.01 < // < v = COUNTS_2_VOLTS(atoi(MOD_BUF)); < ft = (v - 0.537) / 0.01; < it = ROUNDF(ft); //ft < 0.0 ? (int)(ft - 0.5) : (int)(ft + 0.5); < _output->data.temp = it; < dprintf("Modtronix::mod_callback - \t\t\tBuf = %s, V = %.3f, Temp = %.2f\n", < MOD_BUF, v, _output->data.temp); < < // Video light levels in percentage of the 5V max < // < send_msg(MODX, "%n10"); // Pin A0 < read_msg(MODX); < // 0 to 100% in range 0v to 5v < it = atoi(MOD_BUF); < v = COUNTS_2_VOLTS(it); < _output->data.video_max = (int)(v*100. / 5.); < dprintf("Modtronix::mod_callback - \t\tPeak Video = %.2f (%d counts)\n", < _output->data.video_max, it); --- > _output->data.humidity = (atof(MOD_BUF) - 0.5) * 50.0; > dprintf("Modtronix::mod_callback - \t\tHumidity = %f\n", _output->data.humidity); 456c350 < send_msg(MODX, "%n11"); // Pin A1 --- > send_msg(MODX, "%n23"); // Pin A3 458,463c352,354 < // 0 to 100% in range 0v to 5v < it = atoi(MOD_BUF); < v = COUNTS_2_VOLTS(it); < _output->data.video_mean = (int)(v*100. / 5.); < dprintf("Modtronix::mod_callback - \t\tMean Video = %.2f (%d counts)\n", < _output->data.video_mean, it); --- > // Temp voltage = 0.5V + 0.01V * degrees C > _output->data.temp = (atof(MOD_BUF) - 0.5) / 0.01; > dprintf("Modtronix::mod_callback - \t\t\tTemp = %f\n", _output->data.temp); 465,468d355 < < < // Forward and Aft water alarms < // 483d369 < 502c388 < --- > 505a392,394 > // check for CTD data on ctd port > // > //get_ctd_data(); 511c400 < for (int j = 0; j < 4; j++) light_state(j, 1); --- > for (int j = LT_FIRST; j <= LT_LAST; j++) light_state(j, 1); 513,530c402 < // Look in on iris motor < // < if (0 == EZ17Handler(NULL) && _savedMsg) < { < // Motor done with previous move. Execute saved move if there is one. < // < Syslog::write("Modtronix - There is a saved msg for the EZ17"); < auto_iris_off(); < EZ17Handler(_savedMsg); < _output->data.motor_action = 1; < < // Reset _savedMsg < // < delete _savedMsg; < _savedMsg = NULL; < } < < if (_output->data.camera_power != 0 && _target_light_level > 0) auto_iris(); --- > EZ17Handler(NULL); 532,533c404 < _output->data.motor_action = _ezMove; < --- > _output->data.motor_action = _ezMove; 535,536c406 < < // Log AJA information --- > // Get AJA information 539,583c409,411 < { < _output->data.recorder_power = 1; < _powerInterrupts = 0; < < timecode(); < available_media(); < _output->data.recording = _aja->record_button(); < } < else < { < // Oh-oh. Recorder power switch is on, but the recorder < // is not responding. Flag for now. < // Not a problem when the recorder is booting-up < // < if (_bootTimer == 0 && _output->data.recorder_power == 1 && < _command.recorder_power == 1) < { < Syslog::write("Modtronix - AJA power yanked? (power:%d ready:%d)", < _output->data.recorder_power, _output->data.recorder_ready); < _powerInterrupts++; < } < else < { < _powerInterrupts = 0; < } < } < < // Recorder has likely powered-down unexpectedly. < // Let's cycle power to camera and recorder. < // < if (MAX_POWER_INTERRUPTS < _powerInterrupts) < { < _powerInterrupts = 0; < Syslog::write("Modtronix - Power interruption! Cycle power..."); < Syslog::write("Modtronix - Recorder power off..."); < recorder_switch(OFF); < Syslog::write("Modtronix - Camera power off..."); < power_switch(OFF); < sleep(1); < Syslog::write("Modtronix - Camera power on..."); < power_switch(ON); < sleep(2); < Syslog::write("Modtronix - Recorder power on..."); < recorder_switch(ON); < } --- > _output->data.recorder_power = 1; > timecode(); //_output->data.timecode = _aja->get_timecode(); > available_media(); //_output->data.available_media = _aja->get_available_media(); 596c424 < connect_aja(); --- > _bootTimer = 0; // reset 604d431 < _bootTimer = 0; // reset 614,616c441 < < < // Output and Log all data --- > // Log all data, even output pins and pwms 621,723d445 < // Check the output state against the commanded state < // < consistency_check(); < < // Close the iris unless the recorder is on < // Temporarily disabling this feature. < // < if ( False && (0 == _output->data.recorder_power) && (_output->data.camera_power == 1) ) < { < // Iris is open and we're not already homing... < // close the iris < // < if (!_irisClosed && !_ezHome) < { < Syslog::write("Modtronix - recorder off and iris open, so I am closing iris..."); < ModtronixMsg::Message msg; < msg._msg = ModtronixMsg::EZHome; < EZ17Handler(&msg); < } < } < } < < // Check the output state against the commanded state < // < void Modtronix::consistency_check() < { < int corrections = 0; < if (_output->data.camera_power == OFF && _command.camera_power == ON) < { < Syslog::write("Modtronix::consistency_check() - camera_power: %d != desired state of %d", < _output->data.camera_power, _command.camera_power); < // Attempt to correct < power_switch(_command.camera_power); < corrections++; < } < < if (_bootTimer == 0 && < _output->data.recorder_power == OFF && _command.recorder_power == ON) < { < Syslog::write("Modtronix::consistency_check() - recorder_power: %d != desired state of %d", < _output->data.recorder_power, _command.recorder_power); < // Attempt to correct < recorder_switch(_command.recorder_power); < corrections++; < } < < if (_output->data.ctd_power == OFF && _command.ctd_power == ON) < { < Syslog::write("Modtronix::consistency_check() - ctd_power: %d != desired state of %d", < _output->data.ctd_power, _command.ctd_power); < // Attempt to correct < ctd_switch(_command.ctd_power); < corrections++; < } < < // Check the light switches. Use the light_switch function to correct the states. < // < int ls = 0; < for (int i = 0; i < 4; i++) < if ( !(ls = light_state(i, _command.light_power[i])) ) < { < Syslog::write("Modtronix::consistency_check() - light_power[%d] is %d: state is %d", < i, _command.light_power[i], _output->data.light_power[i]); < // Attempt to correct. Any one mismatched is enough to trigger this < //light_switch(_command.light_power[i]); < corrections++; < break; < } < < // Check light level after possibly fixing the light switches since < // the light_switch command automatically sets the light level to 50% < // < if (_output->data.light_level < _command.light_level) < { < Syslog::write("Modtronix::consistency_check() - light_level: %d != desired state of %d", < _output->data.light_level, _command.light_level); < // Attempt to correct < light_level((char)_command.light_level); < corrections++; < } < < if (_output->data.recording == 0 && _command.recording != 0) < { < Syslog::write("Modtronix::consistency_check() - recording: %d != desired state of %d", < _output->data.recording, _command.recording); < < if (_command.recording) < and_action(); < else < cut(); < } < < #if 0 < if (_output->data.mode != _command.mode) < { < Syslog::write("Modtronix::consistency_check() - mode: %d != %d", < _output->data.mode, _command.mode); < } < #endif < < if (corrections > 0) _output->write(); < < return; 726d447 < 732d452 < char postfix[32]; 755d474 < auto_iris_off(); 761d479 < Syslog::write("Modtronix::action() - recorder is booting..."); 773d490 < Syslog::write("Modtronix::action() - cut"); 798,806c515 < if (strlen(msg._str) > 0) < { < strcpy(postfix, msg._str); < } < else < { < sprintf(postfix, "%04dm-F%03d", msg._int, _fStop); < } < clipname(postfix); --- > clipname(msg._str); 810d518 < auto_iris_off(); 815d522 < auto_iris_off(); 820,822d526 < // Track the commanded state < _command.light_level = msg._int; < 834,861d537 < case ModtronixMsg::EZAutoFS: < Syslog::write("Modtronix::action() - auto-iris level:%.2f", < msg._float); < if (msg._float < 0.2) < { < auto_iris_off(); < } < else if (msg._float <= 3.8) < { < _target_light_level = 3.8; < _fStop = 777; < } < else < { < _target_light_level = msg._float; < _fStop = 777; < } < < break; < < case ModtronixMsg::EZFStop: < _fStop = msg._int; // save the most recent fstop setting < if (False && !_aja->ready()) < { < Syslog::write("Modtronix::action() - iris remains closed unless recorder is on"); < break; < } < // Fall through to next case 863,877c539,541 < if (_ezMove) < { < // Save the command to use when the current move is finished < // < Syslog::write("Modtronix::action() - saving EZ17 message"); < if (!_savedMsg) _savedMsg = new ModtronixMsg::Message(); < < _savedMsg->_msg = msg._msg; < _savedMsg->_int = msg._int; < _savedMsg->_float = msg._float; < break; < } < Syslog::write("Modtronix::action() - EZ17 message: %d %d %f", < msg._msg, msg._int, msg._float); < auto_iris_off(); --- > case ModtronixMsg::EZFStop: > case ModtronixMsg::EZAutoFS: > Syslog::write("Modtronix::action() - EZ17 message: %d", msg._msg); 890c554 < // Output and Log updated state and data --- > // Log all data 932a597 > dprintf("Modtronix::check_pin() %s ...", buf); 949d613 < dprintf("Modtronix::check_pin() %s ... %s", buf, MOD_BUF); 961,963d624 < // Track the commanded state < _command.ctd_power = state; < 996,997c657,658 < // recorder_switch(1) => turn on the recorder < // recorder_switch(0) => turn off the recorder --- > // recorder_switch(1) => turn on the recroder > // recorder_switch(0) => turn off the recroder 1001,1003d661 < // Track the commanded state < _command.recorder_power = state; < 1007c665 < Boolean debug = FILE_DEBUG || False; --- > Boolean debug = FILE_DEBUG || True; 1022c680 < sleep_time = 2; //200; // Turn recorder on with just a momentary --- > sleep_time = 2; //200; // Turn recorder on with just a momentary 1058,1059c716 < _output->data.recorder_power = state; < --- > _output->data.recorder_power = on; 1083,1085d739 < // Track the commanded state < _command.camera_power = state; < 1125c779,780 < if (level > 90) level = 90; --- > if (level > 100) level = 100; > 1137d791 < // 1144c798 < Boolean debug = FILE_DEBUG || False; --- > Boolean debug = FILE_DEBUG || True; 1162,1165c816 < //if (on) light_level(on*50); // Set level to 50% if turning on, else 0. < < // Track the commanded state < _command.light_power[0] = _command.light_power[1] = _command.light_power[2] = _command.light_power[3] = on; --- > light_level(on*50); // Set level to 50% if turning on, else 0. 1172c823,826 < set_pin(LT_BANK, i, state); --- > if (set_pin(LT_BANK, i, state)) > _output->data.light_power[i-LT_FIRST] = on; > else > _output->data.light_power[i-LT_FIRST] = 1 - on; 1175c829 < i-LT_FIRST, on); --- > i-LT_FIRST, _output->data.light_power[i-LT_FIRST]); 1189,1190c843,844 < // E.g., return 1 if light_state(0, OFF) is 0 (the state of the first light) < // E.g., return 0 if light_state(4, ON) is 0 (the state of the last light) --- > // E.g., return 1 if light_state(2, OFF) is 0 > // E.g., return 0 if light_state(3, ON) is 0 1199c853,854 < int inverted = 1 - state; // check against the inverted value --- > dprintf("Modtronix::light_state(%d, %d)...", light, state); > if (state != OFF) state = OFF; // inverted 1201c856 < if (check_pin(LT_BANK, light+LT_FIRST, inverted)) --- > if (check_pin(LT_BANK, light, state)) 1203,1204c858 < _output->data.light_power[light] = state; < dprintf("Modtronix::light_state(%d, %d) == %d (%s)", light, state, 1, _mod_bufs[MODX]); --- > _output->data.light_power[light] = 1 - state; 1208,1209c862 < _output->data.light_power[light] = inverted; < dprintf("Modtronix::light_state(%d, %d) == %d (%s)", light, state, 0, _mod_bufs[MODX]); --- > _output->data.light_power[light] = state; 1217c870,876 < if (_bootTimer > 0) --- > if (_output->data.recorder_ready) > { > Syslog::write("Modtronix::action() - "); > _aja->record_button(1); > _recordReq = False; > } > else if (_bootTimer > 0) 1226,1239c885 < { < Syslog::write("Modtronix::action() - "); < _aja->record_button(1); < < // Track the commanded state < _command.recording = 1; < < _recordReq = False; < } < if (!_aja->record_button()) < { < Syslog::write("Modtronix::action() - Aja not recording! Press record again"); < _aja->record_button(1); < } --- > Syslog::write("Modtronix - recorder not on"); 1244c890,895 < if (_bootTimer > 0) --- > if (_output->data.recorder_ready) > { > Syslog::write("Modtronix::cut() - "); > _aja->record_button(0); > } > else if (_bootTimer > 0) 1253,1260c904 < { < Syslog::write("Modtronix::cut() - "); < _aja->record_button(0); < < // Track the commanded state < _command.recording = 0; < System::milliSleep(1500); < } --- > Syslog::write("Modtronix - recorder not ready"); 1265,1267c909,916 < Syslog::write("Modtronix::record_mode(%d) - ", mode); < if (mode != 0) < _aja->record_mode(); --- > if (_output->data.recorder_ready) > { > Syslog::write("Modtronix::record_mode(%d) - ", mode); > if (mode != 0) > _aja->record_mode(); > else > _aja->data_mode(); > } 1269,1277c918 < _aja->data_mode(); < < // Track the commanded state < _command.mode = mode; < } < < void Modtronix::connect_aja() < { < _aja->connect(); --- > Syslog::write("Modtronix - recorder not ready"); 1283,1286c924,929 < _output->data.timecode = _aja->get_timecode(); < dprintf("Modtronix::timecode() - %f\n", _output->data.timecode); < < if (!_output->data.recorder_ready) --- > if (_output->data.recorder_ready) > { > _output->data.timecode = _aja->get_timecode(); > dprintf("Modtronix::timecode() - %f\n", _output->data.timecode); > } > else 1293,1296c936,941 < _output->data.available_media = _aja->get_available_media(); < dprintf("Modtronix::available_media() - %d", _output->data.available_media); < < if (!_output->data.recorder_ready) --- > if (_output->data.recorder_ready) > { > _output->data.available_media = _aja->get_available_media(); > dprintf("Modtronix::available_media() - %d", _output->data.available_media); > } > else 1308c953 < Syslog::write("Modtronix sync - recorder not ready"); --- > Syslog::write("Modtronix - recorder not ready"); 1313c958,964 < if (_bootTimer > 0) --- > if (_output->data.recorder_ready) > { > Syslog::write("Modtronix::clipname(%s) - ", str); > _aja->set_clip_name(str); > _clipnameReq = False; > } > else if (_bootTimer > 0) 1322,1339c973 < { < // If we're recording, stop first < // < Boolean stop_start = _aja->record_button(); < if (stop_start) cut(); < < Syslog::write("Modtronix::clipname(%s) - ", str); < _aja->set_clip_name(str); < System::milliSleep(500); < _clipnameReq = False; < < // If we were recording, then continue < // < if (stop_start) and_action(); < } < < if (!_output->data.recorder_ready) < Syslog::write("Modtronix clipname - recorder not ready"); --- > Syslog::write("Modtronix - recorder not ready"); Index: auv/altex/onboard/CARL/Modtronix.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/Modtronix.h,v retrieving revision 1.10.2.8 retrieving revision 1.10.2.2 diff -r1.10.2.8 -r1.10.2.2 35d34 < #include "ModtronixOutput.h" 36a36 > class ModtronixOutput; 65,67c65,66 < < void init_power(int state) { _command.camera_power = (state != 0); _command.recorder_power = (state != 0); } < --- > int get_ctd_data(); > 87d85 < void connect_aja(); 92c90 < --- > 97,102d94 < // Check the output state against the commanded state < // < void Modtronix::consistency_check(); < < // Trigger mission abort < // 108,111d99 < // Auto-iris functions < int auto_iris(); < void auto_iris_off() { _target_light_level = 0; } < 141,142d128 < ModtronixOutput::Data _command; // Track commanded states here for comparison < 146d131 < ModtronixMsg::Message *_savedMsg; 160,162d144 < // EZServo and Iris stuff < float _target_light_level; // > 0 ? auto-iris function is on < Boolean _auto_iris_done; 166d147 < Boolean _irisClosed; 168,169d148 < int _expectedPos; < char _powerInterrupts; 171d149 < int _fStop; // Cache the most recent fstop request Index: auv/altex/onboard/CARL/ModtronixLog.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/ModtronixLog.cc,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.2 diff -r1.7.2.3 -r1.7.2.2 82,87d81 < sprintf(dname, "%s.sw0", name()); < addField((_mod_sw1 = new FloatData(dname))); < sprintf(dname, "%s.sw1", name()); < addField((_mod_sw0 = new FloatData(dname))); < sprintf(dname, "%s.sw2", name()); < addField((_mod_sw2 = new FloatData(dname))); 136,138d129 < _mod_sw0->setValue(o->data.sw0); < _mod_sw1->setValue(o->data.sw1); < _mod_sw2->setValue(o->data.sw2); Index: auv/altex/onboard/CARL/ModtronixLog.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/ModtronixLog.h,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.2 diff -r1.7.2.3 -r1.7.2.2 106d105 < FloatData *_mod_sw0, *_mod_sw1, *_mod_sw2; Index: auv/altex/onboard/CARL/ModtronixOutput.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/ModtronixOutput.h,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.2 diff -r1.7.2.3 -r1.7.2.2 61d60 < float sw0, sw1, sw2; 77d75 < int recording; Index: auv/altex/onboard/CARL/_carlTest.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/_carlTest.cc,v retrieving revision 1.7.2.4 retrieving revision 1.7.2.2 diff -r1.7.2.4 -r1.7.2.2 51d50 < EZAUTOFS, 65c64 < {"Exit (No, really. It works now.)", EXIT}, {"Camera on", CAMERA_ON}, \ --- > {"Exit", EXIT}, {"Camera on", CAMERA_ON}, \ 78c77 < {"Auto Iris", EZAUTOFS}, {"Get Env Data", ENVDATA} --- > {"Get Env Data", ENVDATA} 82c81 < int menu_choice(char menu = 0); --- > int menu_choice(); 89c88 < // KiPro and Modtronix driver --- > // KiPro and Modtronix drivers 123,124c122 < int menu = 1; < int cmd = menu_choice(menu); --- > 130c128 < int ans; --- > int ans, cmd = menu_choice(); 138d135 < menu = 0; 142,144c139 < printf("\nExiting...\n\n"); < kill(pid_c, SIGKILL); < return 0; --- > printf("\nUse Ctrl-C to exit\n\n"); 279,291d273 < case EZAUTOFS: < printf("| Set Light level... \n"); < printf("|\n| Enter a level (0, or a value from 1.25 to 3.80) > " ); < gets(clipname); < printf("%s\n", clipname); < temp = atof(clipname); < if (temp >= 0.0 && temp <= 3.8) < carl->auto_iris(temp); < else < printf("|\n| Invalid level: %.2f\n ", temp ); < < break; < 307,310d288 < case -2: < menu = 1; < break; < 315d292 < cmd = menu_choice(menu); 355c332 < int menu_choice(char menu) --- > int menu_choice() 357,359c334,336 < // Print the menu if instructed < // < if (menu) --- > printf("| Choose from the following: \n"); > > for (int jj = 0; jj < sizeof(cmds)/sizeof(struct cmd_s); jj++) 361,365c338 < printf("| Choose from the following: \n"); < for (int jj = 0; jj < sizeof(cmds)/sizeof(struct cmd_s); jj++) < { < printf("| %2d) %s\n", jj+1, cmds[jj].name); < } --- > printf("| %2d) %s\n", jj+1, cmds[jj].name); 383,384d355 < else < return -2; Index: auv/altex/onboard/CARL/_modtronix.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/_modtronix.cc,v retrieving revision 1.5.2.3 retrieving revision 1.5.2.2 diff -r1.5.2.3 -r1.5.2.2 40,41c40,41 < int c, on = 0; < while ( (c = getopt(argc, argv, "oh:p:m:")) != EOF ) --- > int c; > while ( (c = getopt(argc, argv, "h:p:m:")) != EOF ) 44,47d43 < case 'o': < on = 1; < break; < 78,80d73 < Syslog::write("Setting power to %d...", on); < mod->init_power(on); < Index: auv/altex/onboard/CARL/carl.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/carl.cfg,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.2 diff -r1.1.2.3 -r1.1.2.2 2d1 < InitPower = 1; Index: auv/altex/onboard/CARL/ezTalk.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/CARL/ezTalk.cc,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.2 diff -r1.4.2.3 -r1.4.2.2 42c42 < mod_tv.tv_sec = 1L; --- > mod_tv.tv_sec = 0L; 60a61 > sprintf(buf, "%s\r", msg); 62,71d62 < if (strcmp("\r\n", msg)) < { < sprintf(buf, "%s\r", msg); < cl = strlen(buf); < } < else < { < sprintf(buf, "%s", msg); < cl = strlen(buf) + 1; < } 75,76c66 < //int sl = send(fd, buf, cl, 0); < int sl = write(fd, buf, cl); --- > int sl = send(fd, buf, cl, 0); 87,88c77 < //while ((sl = recv(fd, msg+nbytes, 32-nbytes, 0)) > 0) < while ((sl = read(fd, msg+nbytes, 32-nbytes)) > 0) --- > while ((sl = recv(fd, msg+nbytes, 32-nbytes, 0)) > 0) 132c121 < int port = 54125; --- > int port = 54126; 153c142 < char response[3200]; --- > char response[32]; 158,164c147 < //if (strlen(response) == 0) continue; < if (!strcmp(response, "crlf")) < { < send_msg(fd, "\r\n"); < read_msg(fd, response); < printf("response to CRLF: %s\n", response); < } --- > if (strlen(response) == 0) continue; 166c149 < else if (!strcmp(response, "in_move")) --- > if (!strcmp(response, "in_move")) 219c202 < if (strlen(response) > 0) ez->send_msg(response); --- > ez->send_msg(response); 221d203 < //printf("%s\n", response); Index: auv/altex/onboard/DataLog/DataLog.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/DataLog/DataLog.cc,v retrieving revision 1.3 retrieving revision 1.3.10.1 diff -r1.3 -r1.3.10.1 94,95c94,95 < printf("logfile already exists!\n"); < printf("I will try to append a %d to your file\n", numtries); --- > // printf("logfile already exists!\n"); > // printf("I will try to append a %d to your file\n", numtries); Index: auv/altex/onboard/DynamicControl/DynamicControlLog.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/DynamicControl/DynamicControlLog.cc,v retrieving revision 1.15 retrieving revision 1.15.4.1 diff -r1.15 -r1.15.4.1 17a18 > #include "DynamicControl.h" 83a85 > _dynamicControlInstance=NULL; 85a88,151 > DynamicControlLog::DynamicControlLog(DynamicControl *dynamicControl, > DataLog::FileFormat fileFormat) > : DataLogWriter(DynamicControlLogName, fileFormat, AutoTimeStamp) > { > > setMnemonic("dataDC"); > > addField(_myTimeStamp = new DoubleData("myTime")); > > addField(_xte = new DoubleData("xTrackError")); > addField(_xteWay = new DoubleData("xTrackErrorWay")); > addField(_heading = new DoubleData("cPsi")); > addField(_rudder = new DoubleData("cDeltaR")); > addField(mT_Psi = new DoubleData("tPsi")); > addField(mPsiProp = new DoubleData("psiProp")); > addField(mPsiInt = new DoubleData("psiInt")); > addField(mPsiRate = new DoubleData("psiRate")); > addField(_xteInt = new DoubleData("xteIntegral")); > addField(_kxte = new DoubleData("kxte")); > addField(_dPsi = new DoubleData("dPsi")); > > addField(_speed = new DoubleData("speedCmd")); > addField(_propOmega = new DoubleData("omegaCmd")); > > addField(mDepth = new DoubleData("cDepth")); > addField(mT_depth = new DoubleData("tDepth")); > addField(_depthError = new DoubleData("DepthError")); > addField(mDepthIntegral = new DoubleData("dIntegral")); > addField(mDepthRateTerm = new DoubleData("mDepthRateTerm")); > addField(mcTheta = new DoubleData("cTheta")); > addField(_pitchProportional = new DoubleData("pitchProp")); > addField(_pitchIntegral = new DoubleData("pitchInt")); > addField(_pitchRate = new DoubleData("pitchRate")); > addField(_p_dbg = new DoubleData("pitchIntInp")); > addField(_elevBefLim = new DoubleData("cDeltaEBL")); > addField(_elevator = new DoubleData("cDeltaE")); > addField(_thetaFF = new DoubleData("thetaFF")); > > #ifdef DOCKING > addField((_targetNorthing = new DoubleData("targetNorthing"))); > addField((_targetEasting = new DoubleData("targetEasting"))); > _targetNorthing->setAsciiFormat("%13.2f"); > _targetEasting->setAsciiFormat("%13.2f"); //Necessary for large UTM values. > > addField((_newBearing = new DoubleData("newBearing"))); > addField((_newNorthing = new DoubleData("newNorthing"))); > addField((_newEasting = new DoubleData("newEasting"))); > addField((_first = new ShortData("first"))); > _newNorthing->setAsciiFormat("%13.2f"); > _newEasting->setAsciiFormat("%13.2f"); //Necessary for large UTM values. > #endif > > #ifdef WALLFOLLOWING > addField((_beamIndx = new IntegerData("SideBeamIndex"))); > addField((_rangeToWall = new DoubleData("rangeToWall"))); > addField(_wallBearing = new DoubleData("wallBearing")); > addField((_hCmdDot = new DoubleData("headingCmdDot"))); > #endif > > _myTimeStamp->setAsciiFormat("%.2f"); > > _dynamicControlInstance = dynamicControl; > _dynamicControl=NULL; > } 136d201 < 139,168c204,235 < _myTimeStamp->setValue(_dynamicControl->_navLoopTimeDC); < < _xte ->setValue(_dynamicControl->_xte); < _xteWay ->setValue(_dynamicControl->_xteWay); < _heading ->setValue(_dynamicControl->_command.horizontal); < _rudder ->setValue(_dynamicControl->_rudder); < mT_Psi ->setValue(_dynamicControl->mT_Psi); < mPsiProp ->setValue(_dynamicControl->mPsiProp); < mPsiInt ->setValue(_dynamicControl->_headingIntegral); < mPsiRate ->setValue(_dynamicControl->mPsiRate); < < _speed ->setValue(_dynamicControl->_command.speed); < _propOmega ->setValue(_dynamicControl->_propOmega); < < mDepth ->setValue(_dynamicControl->_command.vertical); < mT_depth ->setValue(_dynamicControl->_des_depth); < _depthError ->setValue(_dynamicControl->_err_depth); < mDepthIntegral ->setValue(_dynamicControl->_depthIntegral); < mDepthRateTerm ->setValue(_dynamicControl->_kdZdot); < mcTheta ->setValue(_dynamicControl->mDes_pitch); < _pitchProportional->setValue(_dynamicControl->_pitchProportional); < _pitchIntegral ->setValue(_dynamicControl->_pitchIntegral); < _pitchRate ->setValue(_dynamicControl->_pitchRate); < _p_dbg ->setValue(_dynamicControl->_p_dbg); < _elevBefLim ->setValue(_dynamicControl->_elevBefLim); < _elevator ->setValue(_dynamicControl->_elevator); < _thetaFF ->setValue(_dynamicControl->_thetaFF); < _xteInt ->setValue(_dynamicControl->_xteIntegral); < _kxte ->setValue(_dynamicControl->_kxte); < _dPsi ->setValue(_dynamicControl->_dPsi); --- > Boolean debug=True; > if (_dynamicControl) { > _myTimeStamp->setValue(_dynamicControl->_navLoopTimeDC); > > _xte ->setValue(_dynamicControl->_xte); > _xteWay ->setValue(_dynamicControl->_xteWay); > _heading ->setValue(_dynamicControl->_command.horizontal); > _rudder ->setValue(_dynamicControl->_rudder); > mT_Psi ->setValue(_dynamicControl->mT_Psi); > mPsiProp ->setValue(_dynamicControl->mPsiProp); > mPsiInt ->setValue(_dynamicControl->_headingIntegral); > mPsiRate ->setValue(_dynamicControl->mPsiRate); > > _speed ->setValue(_dynamicControl->_command.speed); > _propOmega ->setValue(_dynamicControl->_propOmega); > > mDepth ->setValue(_dynamicControl->_command.vertical); > mT_depth ->setValue(_dynamicControl->_des_depth); > _depthError ->setValue(_dynamicControl->_err_depth); > mDepthIntegral ->setValue(_dynamicControl->_depthIntegral); > mDepthRateTerm ->setValue(_dynamicControl->_kdZdot); > mcTheta ->setValue(_dynamicControl->mDes_pitch); > _pitchProportional->setValue(_dynamicControl->_pitchProportional); > _pitchIntegral ->setValue(_dynamicControl->_pitchIntegral); > _pitchRate ->setValue(_dynamicControl->_pitchRate); > _p_dbg ->setValue(_dynamicControl->_p_dbg); > _elevBefLim ->setValue(_dynamicControl->_elevBefLim); > _elevator ->setValue(_dynamicControl->_elevator); > _thetaFF ->setValue(_dynamicControl->_thetaFF); > _xteInt ->setValue(_dynamicControl->_xteIntegral); > _kxte ->setValue(_dynamicControl->_kxte); > _dPsi ->setValue(_dynamicControl->_dPsi); 170,175c237,249 < _targetNorthing ->setValue(_dynamicControl->_command.north); < _targetEasting ->setValue(_dynamicControl->_command.east); < _newBearing ->setValue(_dynamicControl->_command.newBearing); < _newNorthing ->setValue(_dynamicControl->_command.newNorthing); < _newEasting ->setValue(_dynamicControl->_command.newEasting); < _first ->setValue(_dynamicControl->_command.first); --- > _targetNorthing ->setValue(_dynamicControl->_command.north); > _targetEasting ->setValue(_dynamicControl->_command.east); > _newBearing ->setValue(_dynamicControl->_command.newBearing); > _newNorthing ->setValue(_dynamicControl->_command.newNorthing); > _newEasting ->setValue(_dynamicControl->_command.newEasting); > _first ->setValue(_dynamicControl->_command.first); > #endif > > #ifdef WALLFOLLOWING > _beamIndx ->setValue(_dynamicControl->_command.beamIndx); > _rangeToWall ->setValue(_dynamicControl->_command.rangeToWall); > _wallBearing ->setValue(_dynamicControl->_wallBearing); > _hCmdDot ->setValue(_dynamicControl->_headingTraj.xdot); 177a252,291 > }else if(_dynamicControlInstance){ > _myTimeStamp->setValue(_dynamicControlInstance->_navLoopTimeDC); > > _xte ->setValue(_dynamicControlInstance->_xte); > _xteWay ->setValue(_dynamicControlInstance->_xteWay); > _heading ->setValue(_dynamicControlInstance->_command.horizontal); > _rudder ->setValue(_dynamicControlInstance->_rudder); > mT_Psi ->setValue(_dynamicControlInstance->mT_Psi); > mPsiProp ->setValue(_dynamicControlInstance->mPsiProp); > mPsiInt ->setValue(_dynamicControlInstance->_headingIntegral); > mPsiRate ->setValue(_dynamicControlInstance->mPsiRate); > > _speed ->setValue(_dynamicControlInstance->_command.speed); > _propOmega ->setValue(_dynamicControlInstance->_propOmega); > > mDepth ->setValue(_dynamicControlInstance->_command.vertical); > mT_depth ->setValue(_dynamicControlInstance->_des_depth); > _depthError ->setValue(_dynamicControlInstance->_err_depth); > mDepthIntegral ->setValue(_dynamicControlInstance->_depthIntegral); > mDepthRateTerm ->setValue(_dynamicControlInstance->_kdZdot); > mcTheta ->setValue(_dynamicControlInstance->mDes_pitch); > _pitchProportional->setValue(_dynamicControlInstance->_pitchProportional); > _pitchIntegral ->setValue(_dynamicControlInstance->_pitchIntegral); > _pitchRate ->setValue(_dynamicControlInstance->_pitchRate); > _p_dbg ->setValue(_dynamicControlInstance->_p_dbg); > _elevBefLim ->setValue(_dynamicControlInstance->_elevBefLim); > _elevator ->setValue(_dynamicControlInstance->_elevator); > _thetaFF ->setValue(_dynamicControlInstance->_thetaFF); > _xteInt ->setValue(_dynamicControlInstance->_xteIntegral); > _kxte ->setValue(_dynamicControlInstance->_kxte); > _dPsi ->setValue(_dynamicControlInstance->_dPsi); > #ifdef DOCKING > _targetNorthing ->setValue(_dynamicControlInstance->_command.north); > _targetEasting ->setValue(_dynamicControlInstance->_command.east); > _newBearing ->setValue(_dynamicControlInstance->_command.newBearing); > _newNorthing ->setValue(_dynamicControlInstance->_command.newNorthing); > _newEasting ->setValue(_dynamicControlInstance->_command.newEasting); > _first ->setValue(_dynamicControlInstance->_command.first); > #endif > 179,182c293,296 < _beamIndx ->setValue(_dynamicControl->_command.beamIndx); < _rangeToWall ->setValue(_dynamicControl->_command.rangeToWall); < _wallBearing ->setValue(_dynamicControl->_wallBearing); < _hCmdDot ->setValue(_dynamicControl->_headingTraj.xdot); --- > _beamIndx ->setValue(_dynamicControlInstance->_command.beamIndx); > _rangeToWall ->setValue(_dynamicControlInstance->_command.rangeToWall); > _wallBearing ->setValue(_dynamicControlInstance->_wallBearing); > _hCmdDot ->setValue(_dynamicControlInstance->_headingTraj.xdot); 183a298,301 > > }else{ > dprintf("DynamicControlLog::setFields - ERROR both dynamicControl references are NULL\n"); > } Index: auv/altex/onboard/DynamicControl/DynamicControlLog.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/DynamicControl/DynamicControlLog.h,v retrieving revision 1.14 retrieving revision 1.14.4.1 diff -r1.14 -r1.14.4.1 29c29 < --- > class DynamicControl; 64,65c64,68 < DynamicControlLog(DynamicControlServer *dynamicControl, < DataLog::FileFormat fileFormat); --- > DynamicControlLog(DynamicControlServer *dynamicControl, > DataLog::FileFormat fileFormat); > > DynamicControlLog(DynamicControl *dynamicControl, > DataLog::FileFormat fileFormat); 120c123,124 < DynamicControlServer *_dynamicControl; --- > DynamicControlServer *_dynamicControl; > DynamicControl *_dynamicControlInstance; Index: auv/altex/onboard/DynamicControl/DynamicControlServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/DynamicControl/DynamicControlServer.cc,v retrieving revision 1.47.2.9 retrieving revision 1.47.2.8.2.3 diff -r1.47.2.9 -r1.47.2.8.2.3 28a29,30 > Boolean debug=True; > dprintf("DynamicControlServer - ctor"); 39c41 < _log = new DynamicControlLog(this, DataLog::BinaryFormat); --- > // _log = new DynamicControlLog(this, DataLog::BinaryFormat); 153,154d154 < _lastWallBearing = 0.; < _lastWallTime = 0.; 184d183 < 197d195 < 199a198,199 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::setCommand [SHOULD NOT BE HERE]\n"); 210a211,212 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::revertGains [SHOULD NOT BE HERE]\n"); 272c274,276 < if( _gainsChanged ) return True; --- > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer.newGains [SHOULD NOT BE HERE]\n"); > if( _gainsChanged ) return True; 278a283,284 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer.setGains [SHOULD NOT BE HERE]\n"); 383a390,391 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::setMaxHeadingRate [SHOULD NOT BE HERE]\n"); 389a398,399 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::maxHeadingRate [SHOULD NOT BE HERE]\n"); 395a406,407 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::setMaxDepthRate [SHOULD NOT BE HERE]\n"); 401a414,415 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::maxDepthRate [SHOULD NOT BE HERE]\n"); 407a422,423 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::setTau [SHOULD NOT BE HERE]\n"); 414c430,432 < return _tau; --- > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::tau [SHOULD NOT BE HERE]\n"); > return _tau; 421a440,441 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::setPitchServoGains [SHOULD NOT BE HERE]\n"); 432a453,454 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::pitchServoGains [SHOULD NOT BE HERE]\n"); 444c466,468 < _headingGains.p = proportional; --- > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::setHeadingServoGains [SHOULD NOT BE HERE]\n"); > _headingGains.p = proportional; 454a479,480 > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::headingServoGains [SHOULD NOT BE HERE]\n"); 463c489,491 < DynamicControlOutput::Data output; --- > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::getLogData [SHOULD NOT BE HERE]\n"); > DynamicControlOutput::Data output; 470d497 < 473,474c500,503 < *lastWallTime = _lastWallTime; < *wallBearing = _lastWallBearing; --- > Boolean debug = True; > dprintf("*** DynamicControlServer::getWallData() [SHOULD NOT BE HERE]\n"); > *lastWallTime = _lastWallTime; > *wallBearing = _lastWallBearing; 477d505 < 480c508,510 < return 0; --- > Boolean debug = True; > dprintf("*** DynamicControlServer::spawnAuxTasks() [NOOP - returning]\n"); > return 0; 487c517,519 < Boolean debug = False; --- > Boolean debug=True; > dprintf(">>>>>>>DynamicControlServer::process [SHOULD NOT BE HERE]\n"); > debug = False; 980,987d1011 < // < // LHT or RHT are only set if the wall is present, thus < // psiWallwrtoVeh will be valid. _wallBearing and < // _lastWallBearing then need to be set incase the wall goes < // absent before RHT/LHT are unset. < // < // lastWallBearing is equated to the current wallBearing here in < // case there is only one good hit. 990,993d1013 < _wallBearing = < Math::modPi(_attitude.yaw + psiWallwrtoVeh); < _lastWallBearing = _wallBearing; < _lastWallTime = _clockTime; 1003,1006d1022 < _wallBearing = < Math::modPi(_attitude.yaw + psiWallwrtoVeh); < _lastWallBearing = _wallBearing; < _lastWallTime = _clockTime; 1066,1067d1081 < _lastWallBearing = _wallBearing; < _lastWallTime = _clockTime; 1069c1083 < // Greater than 90 degree turn from _wallBearing. --- > // 1075,1076d1088 < // < // Not currently used. 1088,1089d1099 < // < // If LHT or RHT: 1107,1118c1117,1120 < else < // < // The wall is absent, or has become absent. For < // waypointPriority > 0 fly the waypoints. if < // waypointPriority = 0, and the wall is initially absent, < // also fly the waypoint. But, if the wall was present and < // has become absent, WaypointWall sets _command.horizontal < // to the last good wall bearing, effectivly latching the < // integrator. It also sets xte to zero, which opens the < // cross-track error loop and turns this into a setpoint. < // < _wallBearing = Math::modPi(_command.horizontal); --- > // > // Else, do nothing. This latches _wallBearing at its last > // value until the wall reappears. > // 1122,1123d1123 < // < // Not using the bearing estimator. 1250c1250 < dprintf(" DynamicControl: Write to tailcone and terminate:\n"); --- > dprintf(" DynamicControlServer: Write to tailcone and terminate:\n"); 1493a1494,1495 > Boolean debug = True; > dprintf("*** DynamicControlServer::tailConeCallback() [SHOULD NOT BE HERE]\n"); 1502,1503c1504,1505 < Boolean debug = False; < dprintf("*** DynamicControlServer::missionStartCallback()"); --- > Boolean debug = True; > dprintf("*** DynamicControlServer::missionStartCallback() [SHOULD NOT BE HERE]\n"); 1513a1516,1517 > Boolean debug = True; > dprintf("*** DynamicControlServer::newNavDataCallback() [SHOULD NOT BE HERE]\n"); 1525c1529 < Boolean debug = False; --- > debug = False; Index: auv/altex/onboard/DynamicControl/DynamicControlServer.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/DynamicControl/DynamicControlServer.h,v retrieving revision 1.23.2.3 retrieving revision 1.23.2.3.2.3 diff -r1.23.2.3 -r1.23.2.3.2.3 161d160 < 225c224,266 < --- > /* > DynamicControlIF::Command command; > Trajectory headingTraj; > double _xte; > double _xteWay; > [command.horizontal] > double _rudder; > double mT_Psi; > double mPsiProp; > double mPsiRate; > double _propOmega; > double _headingIntegral; > [command.vertical] > double _des_depth; > double _err_depth; > double _depthIntegral; > double _kdZdot; > double mDes_pitch; > double _pitchProportional; > double _pitchIntegral; > double _pitchRate; > double _p_dbg; > double _elevBefLim; > double _elevator; > double _thetaFF; > double _xteIntegral; > double _kxte; > double _dPsi; > #ifdef DOCKING > [command.north] > [command.east] > [command.newBearing] > [command.newNorthing] > [command.newEasting] > [command.first] > #endif > #ifdef WALLFOLLOWING > [command.beamIndx] > [command.rangeToWall] > #endif > double _wallBearing; > [headingTraj.xdot] > */ 238,239d278 < < double _lastWallBearing, _lastWallTime; 240a280 > double _lastWallBearing, _lastWallTime; 301d340 < Index: auv/altex/onboard/DynamicControl/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/DynamicControl/Makefile,v retrieving revision 1.14 retrieving revision 1.14.4.1 diff -r1.14 -r1.14.4.1 14c14 < # $Header: /home/cvs/auv-qnx/auv/altex/onboard/DynamicControl/Makefile,v 1.14 2012/12/04 15:49:58 rob Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/altex/onboard/DynamicControl/Makefile,v 1.14.4.1 2016/04/14 22:50:04 headley Exp $ 56c56,57 < DynamicControlLog.o --- > DynamicControl.o \ > DynamicControlLog.o 58c59 < TARGETS = dynamicControlServer --- > TARGETS = dynamicControlServer dynamicControl dynamicControl.lib 69a71,76 > dynamicControl: _dynamicControl.o $(OBJS) $(LIBS) > $(LD) $(LDFLAGS) _dynamicControl.o $(OBJS) $(LIBS) -o $@ > > dynamicControl.lib: $(OBJS) > $(AR) -n dynamicControl.lib +- $(OBJS) > Index: auv/altex/onboard/ExternalComms/_externalComms.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/ExternalComms/_externalComms.cc,v retrieving revision 1.1 retrieving revision 1.1.10.1 diff -r1.1 -r1.1.10.1 18a19 > #include "Exception.h" 30,32c31,36 < catch (...) { < Syslog::write("externalComms - caught exception!\n"); < } --- > // catch (...) { > // Syslog::write("externalComms - caught exception!\n"); > // } > catch (Exception e) { > Syslog::write("externalComms - caught exception [%s]\n",e.msg); > } Index: auv/altex/onboard/FuelCell/FuelCellOutput.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/FuelCell/FuelCellOutput.cc,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -r1.2 -r1.2.10.1 27c27 < data.fcc_status.fc_control_state = 0; --- > data.fcc_status.fc_control_state = FuelCellIF::FC_STATE_NONE; Index: auv/altex/onboard/FuelCell/SimulatedFuelCell.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/FuelCell/SimulatedFuelCell.cc,v retrieving revision 1.1 retrieving revision 1.1.10.1 diff -r1.1 -r1.1.10.1 29c29 < _fcc_status.fc_control_state = FC_STATE_OFFLINE; --- > _fcc_status.fc_control_state = SimulatedFuelCellIF::FC_STATE_OFFLINE; Index: auv/altex/onboard/G2TerrainNav/Octree.cpp =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/G2TerrainNav/Octree.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 1435,1474d1434 < < template < void < Octree:: < FillSmallestResolutionLeafAtPointIfEmpty(const Vector& point, ValueType fillValue) < { < if(ContainsPoint(point)) < { < int depth; < Path path = FindPathToPoint(point); < OctreeNode* nodePointer = GetPointerToLeafOnPath(depth, path); < if(nodePointer->value == EmptyValue) < { < unsigned int bitmask = 1 << (MaxDepth - depth - 1); < for(; depth < MaxDepth; depth ++) < { < unsigned int childNumber = < ((0 != (path.x & bitmask)) << 2) < | ((0 != (path.y & bitmask)) << 1) < | (0 != (path.z & bitmask)); < bitmask >>= 1; < //just in case < if(nodePointer->children != NULL) < { < for(int index = 0; index < 8; index ++) < { < delete nodePointer->children[index]; < } < delete[] nodePointer->children; < } < nodePointer->children = new OctreeNode*[8]; < for(int index = 0; index < 8; index++){ < nodePointer->children[index] = new OctreeNode(EmptyValue); < } < nodePointer = nodePointer->children[childNumber]; < } < nodePointer->value = fillValue; < } < } < } Index: auv/altex/onboard/G2TerrainNav/Octree.hpp =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/G2TerrainNav/Octree.hpp,v retrieving revision 1.2.2.1 retrieving revision 1.2 diff -r1.2.2.1 -r1.2 166,169c166 < < void FillSmallestResolutionLeafAtPointIfEmpty(const Vector& point, ValueType fillValue); < < --- > Index: auv/altex/onboard/G2TerrainNav/TerrainNav.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/G2TerrainNav/TerrainNav.h,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.2 diff -r1.7.2.3 -r1.7.2.2 373,384d372 < /* Helper Function: reinitFilter < * Usage: reinitFilter() < * -------------------------------------------------------------------------*/ < /*! This function reinitializes the filter. It will copy relevant information < * from the current filter object, delete that object, then re-create the < * filter. < * < * 23-Aug-2016 RGH : Exposing for use with TerrainAid and TerrainNavClient < */ < //old state machine version: void reinitFilter(int newState, bool lowInfoTransition); < void reinitFilter(bool lowInfoTransition); < 533a522,531 > /* Helper Function: reinitFilter > * Usage: reinitFilter() > * -------------------------------------------------------------------------*/ > /*! This function reinitializes the filter. It will copy relevant information > * from the current filter object, delete that object, then re-create the > * filter. > */ > //old state machine version: void reinitFilter(int newState, bool lowInfoTransition); > void reinitFilter(bool lowInfoTransition); > Index: auv/altex/onboard/G2TerrainNav/TerrainNavClient.cpp =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/G2TerrainNav/TerrainNavClient.cpp,v retrieving revision 1.4.2.1 retrieving revision 1.4 diff -r1.4.2.1 -r1.4 575,585d574 < void TerrainNavClient::reinitFilter(const bool lowInfoTransition) < { < commsT reinit(TRN_FILT_REINIT); < //printf("%s\n", reinits.to_s(_comms_buf, TRN_MSG_SIZE)); < reinit.serialize(_comms_buf); < < if(!requestAndConfirm(reinit, TRN_ACK)) { < printf("TerrainNavClient::reinitFilter() - comms failure\n"); < } < } < Index: auv/altex/onboard/G2TerrainNav/TerrainNavClient.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/G2TerrainNav/TerrainNavClient.h,v retrieving revision 1.3.2.1 retrieving revision 1.3 diff -r1.3.2.1 -r1.3 256,262d255 < /* Function: reinitFilter(bool lowInfoTransition) < * Usage: filterType = tercom->reinitFilter(true); < * ------------------------------------------------------------------------*/ < /*! Reinitializes the TRN filter. < */ < virtual void reinitFilter(const bool lowInfoTransition); < Index: auv/altex/onboard/G2TerrainNav/structDefs.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/G2TerrainNav/structDefs.h,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.1 diff -r1.5.2.2 -r1.5.2.1 386,390d385 < #define TRN_FILT_REINIT 'r' < < // Server instruct TRN to reinitialize its filter < // < Index: auv/altex/onboard/G2TerrainNav/trn_server.cpp =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/G2TerrainNav/trn_server.cpp,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.1 diff -r1.4.2.3 -r1.4.2.1 807,814d806 < case TRN_FILT_REINIT: < _tercom->reinitFilter(true); < sprintf(logbuf, "Filter Reinitialized.:%c", _ct.msg_type); < printf("%s\n", logbuf); < trn_log(logbuf); < send_msg(_ack); < break; < Index: auv/altex/onboard/LayeredControl/Behavior.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/Behavior.cc,v retrieving revision 1.35.2.4 retrieving revision 1.35.2.3.2.1 diff -r1.35.2.4 -r1.35.2.3.2.1 44d43 < TerrainAidIF *Behavior::_terrainAid = 0; 49c48 < : attributes(name) --- > : attributes(name) 51,67c50,66 < _name = strdup(name); < < setState(Suspended); < _sequential = sequential; < _abortMission = False; < < attributes.add(new MissionTimeAttribute("startTime", "start time", < &_startTime, 0.0)); < < attributes.add(new MissionTimeAttribute("endTime", "end time", < &_endTime, -1.0)); < < attributes.add(new MissionTimeAttribute("duration", "duration", < &_duration, -1.0) ); < < attributes.add(new IntegerAttribute("id", "optional integer id", < &_id, -1) ); --- > _name = strdup(name); > > setState(Suspended); > _sequential = sequential; > _abortMission = False; > > attributes.add(new MissionTimeAttribute("startTime", "start time", > &_startTime, 0.0)); > > attributes.add(new MissionTimeAttribute("endTime", "end time", > &_endTime, -1.0)); > > attributes.add(new MissionTimeAttribute("duration", "duration", > &_duration, -1.0) ); > > attributes.add(new IntegerAttribute("id", "optional integer id", > &_id, -1) ); 73,79c72,78 < // for (int i = 0; i < attributes.list.size(); i++) { < // Attribute *attribute; < // attributes.list.get(i, &attribute); < // delete attribute; < // } < < //attributes created above are deleted in Attributes class destructor --- > // for (int i = 0; i < attributes.list.size(); i++) { > // Attribute *attribute; > // attributes.list.get(i, &attribute); > // delete attribute; > // } > > //attributes created above are deleted in Attributes class destructor 86c85 < Syslog::write("%s: %s\n", name(), msg); --- > Syslog::write("%s: %s\n", name(), msg); 93,95c92,94 < _output.verticalMode = DynamicControlIF::VmInitial; < _output.horizontalMode = DynamicControlIF::HmInitial; < _output.speedMode = DynamicControlIF::SmInitial; --- > _output.verticalMode = DynamicControlIF::VmInitial; > _output.horizontalMode = DynamicControlIF::HmInitial; > _output.speedMode = DynamicControlIF::SmInitial; 101,102c100,101 < memcpy((void *)cmd, (void *)&_output, < sizeof(DynamicControlIF::Command)); --- > memcpy((void *)cmd, (void *)&_output, > sizeof(DynamicControlIF::Command)); 107,108c106,107 < memcpy( (void *)&_output, (void *)cmd, < sizeof(DynamicControlIF::Command)); --- > memcpy( (void *)&_output, (void *)cmd, > sizeof(DynamicControlIF::Command)); 113,130c112,129 < Boolean debug = False; < dprintf("Behavior::verifyBaseAttributes()...\n"); < < if (_startTime >= _endTime) { < printError("Start time is after end time\n"); < return -1; < } < else if( (_endTime < 0) && (_duration < 0) ) { < printError("Neither end time nor duration specified\n"); < return -1; < } < else if( (_endTime > 0) && (_duration > 0) ) { < printError("Both end time and duration and end time specified\n"); < return -1; < } < else { < return 0; < } --- > Boolean debug = False; > dprintf("Behavior::verifyBaseAttributes()...\n"); > > if (_startTime >= _endTime) { > printError("Start time is after end time\n"); > return -1; > } > else if( (_endTime < 0) && (_duration < 0) ) { > printError("Neither end time nor duration specified\n"); > return -1; > } > else if( (_endTime > 0) && (_duration > 0) ) { > printError("Both end time and duration and end time specified\n"); > return -1; > } > else { > return 0; > } 137,139c136,138 < Boolean debug = True; < dprintf("Behavior::verify()...\n"); < return verifyBaseAttributes(); --- > Boolean debug = True; > dprintf("Behavior::verify()...\n"); > return verifyBaseAttributes(); 143,150c142,149 < void Behavior::setVertical(DynamicControlIF::VerticalMode mode, < double vertical, double maxLowerPitch) { < _output.verticalMode = mode; < _output.vertical = vertical; < _output.maxLowerPitch = maxLowerPitch; < _output.thetaFF = 0.; < _output.beamIndx = 60; < _output.rangeToWall = 0.; --- > void Behavior::setVertical(DynamicControlIF::VerticalMode mode, > double vertical, double maxLowerPitch) { > _output.verticalMode = mode; > _output.vertical = vertical; > _output.maxLowerPitch = maxLowerPitch; > _output.thetaFF = 0.; > _output.beamIndx = 60; > _output.rangeToWall = 0.; 153,154c152,153 < void Behavior::setVertical(DynamicControlIF::VerticalMode mode, < double vertical, double maxLowerPitch, --- > void Behavior::setVertical(DynamicControlIF::VerticalMode mode, > double vertical, double maxLowerPitch, 156,161c155,160 < _output.verticalMode = mode; < _output.vertical = vertical; < _output.maxLowerPitch = maxLowerPitch; < _output.thetaFF = thetaFF; < _output.beamIndx = 60; < _output.rangeToWall = 0.; --- > _output.verticalMode = mode; > _output.vertical = vertical; > _output.maxLowerPitch = maxLowerPitch; > _output.thetaFF = thetaFF; > _output.beamIndx = 60; > _output.rangeToWall = 0.; 165,235c164,234 < double maxLowerPitch, < double thetaFF, < long beamIndx, < double rangeToWall) < { < _output.verticalMode = mode; < _output.vertical = vertical; < _output.maxLowerPitch = maxLowerPitch; < _output.thetaFF = thetaFF; < _output.beamIndx = beamIndx; < _output.rangeToWall = rangeToWall; < } < < < void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, < double horizontal) < { < _output.horizontalMode = mode; < _output.horizontal = horizontal; < _output.radius = 0.; < _output.north = _output.east = 0.; < _output.newBearing = 0.; < _output.newNorthing = 0.; _output.newEasting = 0.; < _output.xTrkOffset = 0.; < } < < < void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, < double horizontal, double north, < double east) < { < _output.horizontalMode = mode; < _output.horizontal = horizontal; < _output.radius = 0.; < _output.north = north; < _output.east = east; < _output.newBearing = 0.; < _output.newNorthing = 0.; _output.newEasting = 0.; < _output.xTrkOffset = 0.; < } < < void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, < double horizontal, double north, < double east, double radius) < { < _output.horizontalMode = mode; < _output.horizontal = horizontal; < _output.radius = radius; < _output.north = north; < _output.east = east; < _output.newBearing = 0.; < _output.newNorthing = 0.; _output.newEasting = 0.; < _output.xTrkOffset = 0.; < } < < void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, < double horizontal, double north, < double east, double newBearing, < double newNorthing, double newEasting, < Boolean first, double xTrkOffset) < { < _output.horizontalMode = mode; < _output.horizontal = horizontal; < _output.radius = 0.; < _output.north = north; < _output.east = east; < _output.newBearing = newBearing; < _output.newNorthing = newNorthing; < _output.newEasting = newEasting; < _output.xTrkOffset = xTrkOffset; < _output.first = first; --- > double maxLowerPitch, > double thetaFF, > long beamIndx, > double rangeToWall) > { > _output.verticalMode = mode; > _output.vertical = vertical; > _output.maxLowerPitch = maxLowerPitch; > _output.thetaFF = thetaFF; > _output.beamIndx = beamIndx; > _output.rangeToWall = rangeToWall; > } > > > void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, > double horizontal) > { > _output.horizontalMode = mode; > _output.horizontal = horizontal; > _output.radius = 0.; > _output.north = _output.east = 0.; > _output.newBearing = 0.; > _output.newNorthing = 0.; _output.newEasting = 0.; > _output.xTrkOffset = 0.; > } > > > void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, > double horizontal, double north, > double east) > { > _output.horizontalMode = mode; > _output.horizontal = horizontal; > _output.radius = 0.; > _output.north = north; > _output.east = east; > _output.newBearing = 0.; > _output.newNorthing = 0.; _output.newEasting = 0.; > _output.xTrkOffset = 0.; > } > > void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, > double horizontal, double north, > double east, double radius) > { > _output.horizontalMode = mode; > _output.horizontal = horizontal; > _output.radius = radius; > _output.north = north; > _output.east = east; > _output.newBearing = 0.; > _output.newNorthing = 0.; _output.newEasting = 0.; > _output.xTrkOffset = 0.; > } > > void Behavior::setHorizontal(DynamicControlIF::HorizontalMode mode, > double horizontal, double north, > double east, double newBearing, > double newNorthing, double newEasting, > Boolean first, double xTrkOffset) > { > _output.horizontalMode = mode; > _output.horizontal = horizontal; > _output.radius = 0.; > _output.north = north; > _output.east = east; > _output.newBearing = newBearing; > _output.newNorthing = newNorthing; > _output.newEasting = newEasting; > _output.xTrkOffset = xTrkOffset; > _output.first = first; 240c239 < return _lowAltitudeFlightEnabled; --- > return _lowAltitudeFlightEnabled; 245c244 < _lowAltitudeFlightEnabled = val; --- > _lowAltitudeFlightEnabled = val; 251,311c250,310 < double currentTime; < < // A wrapper around the behavior-specific "meat" < < // If the behavior is finished, forget it < if( _state == Behavior::Finished ) < return; < < try { < currentTime = _missionClock->seconds(); < } < catch (SharedObject::Error e) { < Syslog::write("Behavior %s - caught " < "SharedObject::Error %s", _name, e.msg); < } < catch (Task::Error e) { < Syslog::write("Behavior %s - caught Task::Error %s", _name, e.msg); < } < catch (...) { < Syslog::write("Behavior %s - caught exception!\n", _name); < } < < // Some checks which only need to be run once < if( _state == Behavior::Suspended ) { < < // Assume start time < 0.0 means leave it up to the behavior < if( _startTime < 0.0 ) { < if( currentTime < _startTime ) { < setState( Behavior::Suspended ); < return; < } < } else { < if( !shouldBehaviorStart() ) { < setState( Behavior::Suspended); < return; < } < } < < // If we've made it this far, the behavior is active < < setState( Behavior::Active ); < _startTime = currentTime; < < if( _endTime < 0.0 ) < _endTime = _startTime + _duration; < } < < // At this point, the behavior a) is known to be active < // b) _startTime is set < // c) _endTime is set < < if( currentTime > _endTime ) < { < Syslog::write("Behavior %s - Timed out!", _name); < setState( Behavior::Finished ); < return; < } < < < execute(); < --- > double currentTime; > > // A wrapper around the behavior-specific "meat" > > // If the behavior is finished, forget it > if( _state == Behavior::Finished ) > return; > > try { > currentTime = _missionClock->seconds(); > } > catch (SharedObject::Error e) { > Syslog::write("Behavior %s - caught " > "SharedObject::Error %s", _name, e.msg); > } > catch (Task::Error e) { > Syslog::write("Behavior %s - caught Task::Error %s", _name, e.msg); > } > catch (...) { > Syslog::write("Behavior %s - caught exception!\n", _name); > } > > // Some checks which only need to be run once > if( _state == Behavior::Suspended ) { > > // Assume start time < 0.0 means leave it up to the behavior > if( _startTime < 0.0 ) { > if( currentTime < _startTime ) { > setState( Behavior::Suspended ); > return; > } > } else { > if( !shouldBehaviorStart() ) { > setState( Behavior::Suspended); > return; > } > } > > // If we've made it this far, the behavior is active > > setState( Behavior::Active ); > _startTime = currentTime; > > if( _endTime < 0.0 ) > _endTime = _startTime + _duration; > } > > // At this point, the behavior a) is known to be active > // b) _startTime is set > // c) _endTime is set > > if( currentTime > _endTime ) > { > Syslog::write("Behavior %s - Timed out!", _name); > setState( Behavior::Finished ); > return; > } > > > execute(); > 316c315 < Syslog::write("Calling default Behavior::execute -- This shouldn't happen"); --- > Syslog::write("Calling default Behavior::execute -- This shouldn't happen"); 319c318 < Boolean Behavior::shouldBehaviorStart( void ) --- > Boolean Behavior::shouldBehaviorStart( void ) 321,334c320,333 < Boolean debug = False; < < dprintf("Behavior::shouldBehaviorStart -- Checking to see if %s should run",_name); < < if( sequential() && < !isOutputEmpty() ) < { < dprintf(" -- it shouldn't\n"); < return False; < } < < dprintf(" -- it should\n"); < return True; < --- > Boolean debug = False; > > dprintf("Behavior::shouldBehaviorStart -- Checking to see if %s should run",_name); > > if( sequential() && > !isOutputEmpty() ) > { > dprintf(" -- it shouldn't\n"); > return False; > } > > dprintf(" -- it should\n"); > return True; > 338,339c337,340 < _output.speedMode = mode; < _output.speed = speed; --- > // Boolean debug = True; > // dprintf("Behavior::setSpeed -- speed[%.2lf] m[%d]\n",speed,mode); > _output.speedMode = mode; > _output.speed = speed; 344c345 < const char *Behavior::stateMnem() --- > const char *Behavior::stateMnem() 346c347 < return stateMnem( _state ); --- > return stateMnem( _state ); 351,366c352,367 < switch (theState) { < case Active: < return "Active"; < break; < < case Suspended: < return "Suspended"; < break; < < case Finished: < return "Finished"; < break; < < default: < return "Unknown"; < } --- > switch (theState) { > case Active: > return "Active"; > break; > > case Suspended: > return "Suspended"; > break; > > case Finished: > return "Finished"; > break; > > default: > return "Unknown"; > } 373,375c374,376 < return ( isHorizontalEmpty( cmd ) && < isVerticalEmpty( cmd ) && < isSpeedEmpty( cmd ) ); --- > return ( isHorizontalEmpty( cmd ) && > isVerticalEmpty( cmd ) && > isSpeedEmpty( cmd ) ); 390,391c391,392 < _abortMission = True; < Syslog::write("Abort request issued by behavior \"%s\"\n", name()); --- > _abortMission = True; > Syslog::write("Abort request issued by behavior \"%s\"\n", name()); 397,402c398,403 < _missionClock = layeredControl->missionClock(); < _navigation = layeredControl->navigation(); < _vehicleConfig = layeredControl->vehicleConfig(); < _gps = layeredControl->gps(); < _ins = layeredControl->ins(); < --- > _missionClock = layeredControl->missionClock(); > _navigation = layeredControl->navigation(); > _vehicleConfig = layeredControl->vehicleConfig(); > _gps = layeredControl->gps(); > _ins = layeredControl->ins(); > 404,406c405,407 < _modem = layeredControl->modem(); < _reson = layeredControl->reson(); < _ctd = layeredControl->ctd(); --- > _modem = layeredControl->modem(); > _reson = layeredControl->reson(); > _ctd = layeredControl->ctd(); 408c409 < --- > Index: auv/altex/onboard/LayeredControl/Behavior.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/Behavior.h,v retrieving revision 1.34.2.2 retrieving revision 1.34.2.1.2.1 diff -r1.34.2.2 -r1.34.2.1.2.1 20a21 > #include "GncIF.h" 39d39 < #include "TerrainAidIF.h" 388,390d387 < // All Behaviors should reference the same AcousticModemIF < static TerrainAidIF *_terrainAid; < Index: auv/altex/onboard/LayeredControl/CARL.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/CARL.cc,v retrieving revision 1.13.2.10 retrieving revision 1.13.2.5 diff -r1.13.2.10 -r1.13.2.5 81,87d80 < < // Target light level for auto-iris function < attributes.add(new FloatAttribute("autoIris", < "Auto Iris target light level. Valid values are " < "0.0 => Off; 1.25 to 3.80 on", < &_autoIris, -1.0)); < 159,160c152 < "lightSwitch:%d, brightness:%d, record:%d, homeIris:%d, fstop:%d, " < "auto-iris:%.2f \n", --- > "lightSwitch:%d, brightness:%d, record:%d, homeIris:%d, fstop:%d\n", 162c154 < _brightness, _record, _homeIris, _fstop, _autoIris); --- > _brightness, _record, _homeIris, _fstop); 170,174c162,166 < Syslog::write("CARL - Id:%d, Duration:%f, cameraSwitch:%d, recorderSwitch:%d, " < "lightSwitch:%d, brightness:%d, record:%d, homeIris:%d, fstop:%d, " < "auto-iris:%.2f \n", < _id, _duration, _cameraSwitch, _recorderSwitch, _lightSwitch, < _brightness, _record, _homeIris, _fstop, _autoIris); --- > Syslog::write("CARL - Duration:%f, cameraSwitch:%d, recorderSwitch:%d, " > "lightSwitch:%d, brightness:%d, record:%d, homeIris:%d, fstop:%d", > _duration, _cameraSwitch, _recorderSwitch, _lightSwitch, > _brightness, _record, _homeIris, _fstop); > 193,201c185,192 < if (_recorderSwitch < 0 && < _cameraSwitch < 0 && < _ctdSwitch < 0 && < _lightSwitch < 0 && < _brightness < 0 && < _fstop < 0 && < _autoIris < 0.0 && < _homeIris < 0 && < _clipname < 0 && --- > if (_recorderSwitch < 0 && > _cameraSwitch < 0 && > _ctdSwitch < 0 && > _lightSwitch < 0 && > _brightness < 0 && > _fstop < 0 && > _homeIris < 0 && > _clipname < 0 && 246a238,245 > // Reset clipname > // > if (_clipname != -1) { > Syslog::write("CARL Behavior %d: Setting clipname", _id); > _server->set_clipname(""); > _clipname = -1; > } > 268c267 < if (_brightness > 90) _brightness = 90; --- > if (_brightness > 80) _brightness = 80; 275,309d273 < // Home < // < if (_homeIris > 0) < { < Syslog::write("CARL Behavior %d: Home the iris motor", _id); < _server->iris_control(CARL_IF::Home, 0); < _homeIris = -1; // Reset after usage < } < < // FStop < // < if (_fstop > -1) < { < Syslog::write("CARL Behavior %d: set the fstop to %d", _id, _fstop); < _server->iris_control(CARL_IF::FStop, _fstop); < _fstop = -1; // Reset after usage < } < < // Auto Iris < // < if (_autoIris > -1.0) < { < Syslog::write("CARL Behavior %d: set the auto-iris value to %.2f", _id, _autoIris); < _server->auto_iris(_autoIris); < _autoIris = -1.0; // Reset after usage < } < < // Reset clipname < // < if (_clipname != -1) { < Syslog::write("CARL Behavior %d: Setting clipname", _id); < _server->set_clipname(""); < _clipname = -1; < } < 327a292,309 > // Home > // > if (_homeIris > 0) > { > Syslog::write("CARL Behavior %d: Home the iris motor", _id); > _server->iris_control(CARL_IF::Home, 0); > _homeIris = -1; // Reset after usage > } > > // FStop > // > if (_fstop > -1) > { > Syslog::write("CARL Behavior %d: set the fstop to %d", _id, _fstop); > _server->iris_control(CARL_IF::FStop, _fstop); > _fstop = -1; // Reset after usage > } > 367,369c349,351 < (_fstop > 33 && _fstop < 41) || < (_fstop > 43 && _fstop < 81) || < (_fstop > 83 && _fstop < 111) || --- > (_fstop > 33 && _fstop < 41) || > (_fstop > 43 && _fstop < 81) || > (_fstop > 83 && _fstop < 111) || 382,392d363 < if ( _autoIris == 0.0 || _autoIris == -1.0 || (_autoIris >= 1.25 && _autoIris <= 3.8) ) < { < // We're good < } < else < { < Syslog::write("CARL Behavior %d: invalid value for autoIris: %.2f", < _id, _autoIris); < valid = False; < } < Index: auv/altex/onboard/LayeredControl/CARL.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/CARL.h,v retrieving revision 1.5.2.7 retrieving revision 1.5.2.5 diff -r1.5.2.7 -r1.5.2.5 61c61 < void done(); // Wrap up loose ends when complete --- > void done(); // Wrap up loose ends when complete 65,71c65,70 < long _cameraSwitch; // On or Off < long _recorderSwitch; // On or Off < long _ctdSwitch; // On or Off < long _lightSwitch; // On or Off < long _brightness; // 0 to 100 < long _fstop; // coded fstop position < double _autoIris; // used for auto-iris, 0=>off --- > long _cameraSwitch; // On or Off > long _recorderSwitch; // On or Off > long _ctdSwitch; // On or Off > long _lightSwitch; // On or Off > long _brightness; // 0 to 100 > long _fstop; // coded fstop position 75c74 < long _record; // 1 => start, 0 => stop --- > long _record; // 1 => start, 0 => stop Index: auv/altex/onboard/LayeredControl/DepthEnvelope.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/DepthEnvelope.cc,v retrieving revision 1.25 retrieving revision 1.25.4.1 diff -r1.25 -r1.25.4.1 29c29 < : Behavior(DepthEnvelopeBehaviorName, NonSequential) --- > : Behavior(DepthEnvelopeBehaviorName, NonSequential) 31,93c31,93 < Attribute::Input *input; < < attributes.add(new FloatAttribute("minDepth", "Minimum depth", < &_minDepth )); < < attributes.add(new FloatAttribute("maxDepth", "Maximum depth", < &_maxDepth )); < < attributes.add(new FloatAttribute("abortLockoutDepth", < "Altitude aborts are ignored when shallower than this depth", < &_hardDeck, NoHardDeck)); < < attributes.add(new FloatAttribute("minAltitude", "Minimum altitude", < &_minAltitude, NoMinimumAltitude )); < < attributes.add(new FloatAttribute("abortDepth", < "Abort when below this depth", < &_abortDepth, NoAbortDepth )); < < attributes.add(new FloatAttribute("abortAltitude", < "Abort when below this altitude", < &_abortAltitude, NoAbortAltitude )); < < attributes.add(new FloatAttribute("deltaDepthRestart", < "Restart when depth has decreased this much", < &_deltaDepth, NoDeltaDepth )); < < attributes.add(new AngleAttribute("maxLowerPitch", < "Lower pitch limit when near bottom.", < &_maxLowerPitch, NoMaxLowerPitch )); < < attributes.add(new FloatAttribute("pitchLimitAltitude", < "Altitude below which lower pitch limits", < &_pitchLimitAlt, NoPitchLimitAlt )); < < attributes.add(new FloatAttribute("minObstacleRange", < "Abort when an obstacle is too close", < &_minFlsHorzRange, 50. )); < < attributes.add(new BooleanAttribute("altSuspendDepthControl", < "Use depth control while altitude is invalid", < &_altSuspendDepthControl, False )); < < attributes.add(new AngleAttribute("altSuspendPitch", < "Use pitch control while altitude is invalid", < &_altSuspendPitch, NoAltSuspendPitch )); < < attributes.add(new FloatAttribute("altTimeOut", < "Suspend prop if altitude invalid too long", < &_altTimeOut, NoAltTimeOut )); < < // Depth envelope should be default run forever < input = new Attribute::Input("endTime", NoTimeLimitMnem); < attributes.parse(input); < delete input; < _altitudeStop = False; < _depthStop = False; < < // Elevator angle during deltaDepth shutoff period. < _elevator = -3.*Math::RadsPerDeg; < _lastDepth = 5.; < _latchData = True; < _indirectAltCntrl = False; --- > Attribute::Input *input; > > attributes.add(new FloatAttribute("minDepth", "Minimum depth", > &_minDepth )); > > attributes.add(new FloatAttribute("maxDepth", "Maximum depth", > &_maxDepth )); > > attributes.add(new FloatAttribute("abortLockoutDepth", > "Altitude aborts are ignored when shallower than this depth", > &_hardDeck, NoHardDeck)); > > attributes.add(new FloatAttribute("minAltitude", "Minimum altitude", > &_minAltitude, NoMinimumAltitude )); > > attributes.add(new FloatAttribute("abortDepth", > "Abort when below this depth", > &_abortDepth, NoAbortDepth )); > > attributes.add(new FloatAttribute("abortAltitude", > "Abort when below this altitude", > &_abortAltitude, NoAbortAltitude )); > > attributes.add(new FloatAttribute("deltaDepthRestart", > "Restart when depth has decreased this much", > &_deltaDepth, NoDeltaDepth )); > > attributes.add(new AngleAttribute("maxLowerPitch", > "Lower pitch limit when near bottom.", > &_maxLowerPitch, NoMaxLowerPitch )); > > attributes.add(new FloatAttribute("pitchLimitAltitude", > "Altitude below which lower pitch limits", > &_pitchLimitAlt, NoPitchLimitAlt )); > > attributes.add(new FloatAttribute("minObstacleRange", > "Abort when an obstacle is too close", > &_minFlsHorzRange, 50. )); > > attributes.add(new BooleanAttribute("altSuspendDepthControl", > "Use depth control while altitude is invalid", > &_altSuspendDepthControl, False )); > > attributes.add(new AngleAttribute("altSuspendPitch", > "Use pitch control while altitude is invalid", > &_altSuspendPitch, NoAltSuspendPitch )); > > attributes.add(new FloatAttribute("altTimeOut", > "Suspend prop if altitude invalid too long", > &_altTimeOut, NoAltTimeOut )); > > // Depth envelope should be default run forever > input = new Attribute::Input("endTime", NoTimeLimitMnem); > attributes.parse(input); > delete input; > _altitudeStop = False; > _depthStop = False; > > // Elevator angle during deltaDepth shutoff period. > _elevator = -3.*Math::RadsPerDeg; > _lastDepth = 5.; > _latchData = True; > _indirectAltCntrl = False; 99c99 < --- > 105,121c105,121 < Boolean valid = True; < < if (_maxDepth < _minDepth) { < printError("maxDepth is less than minDepth"); < valid = False; < } < < if( _maxLowerPitch < 0. && (_maxLowerPitch != NoMaxLowerPitch*Math::RadsPerDeg)) < { < Syslog::write("DepthEnvelope - Error. maxLowerPitch must be a postive " < "number.\n" < "Flipping the sign now."); < _maxLowerPitch *= -1; < Syslog::write("maxLowerPitch = %.2f", _maxLowerPitch); < } < < if( _maxLowerPitch == NoMaxLowerPitch*Math::RadsPerDeg && --- > Boolean valid = True; > > if (_maxDepth < _minDepth) { > printError("maxDepth is less than minDepth"); > valid = False; > } > > if( _maxLowerPitch < 0. && (_maxLowerPitch != NoMaxLowerPitch*Math::RadsPerDeg)) > { > Syslog::write("DepthEnvelope - Error. maxLowerPitch must be a postive " > "number.\n" > "Flipping the sign now."); > _maxLowerPitch *= -1; > Syslog::write("maxLowerPitch = %.2f", _maxLowerPitch); > } > > if( _maxLowerPitch == NoMaxLowerPitch*Math::RadsPerDeg && 123,129c123,129 < { < Syslog::write("DepthEnvelope - Error. Since pitchLimitAlt is specified, \n" < "you must also specify maxLowerPitch."); < valid = False; < } < < if( _maxLowerPitch != NoMaxLowerPitch*Math::RadsPerDeg && --- > { > Syslog::write("DepthEnvelope - Error. Since pitchLimitAlt is specified, \n" > "you must also specify maxLowerPitch."); > valid = False; > } > > if( _maxLowerPitch != NoMaxLowerPitch*Math::RadsPerDeg && 131,144c131,144 < { < Syslog::write("DepthEnvelope - Error. Since maxLowerPitch is specified, \n" < "you must also specify pitchLimitAlt."); < valid = False; < } < < if( _altSuspendDepthControl && _altSuspendPitch != NoAltSuspendPitch*Math::RadsPerDeg ) < { < Syslog::write("DepthEnvelope - Error. You cannot specify both \n" < "altSuspendDepthControl and altSuspendPitch."); < valid = False; < } < < if( _altTimeOut == NoAltTimeOut && --- > { > Syslog::write("DepthEnvelope - Error. Since maxLowerPitch is specified, \n" > "you must also specify pitchLimitAlt."); > valid = False; > } > > if( _altSuspendDepthControl && _altSuspendPitch != NoAltSuspendPitch*Math::RadsPerDeg ) > { > Syslog::write("DepthEnvelope - Error. You cannot specify both \n" > "altSuspendDepthControl and altSuspendPitch."); > valid = False; > } > > if( _altTimeOut == NoAltTimeOut && 146,151c146,151 < { < Syslog::write("DepthEnvelope - Error. You must specify altTimeOut."); < valid = False; < } < < return valid; --- > { > Syslog::write("DepthEnvelope - Error. You must specify altTimeOut."); > valid = False; > } > > return valid; 157,345c157,345 < Boolean debug = False; < Boolean abortDepthSpecified = (_abortDepth != NoAbortDepth); < Boolean abortAltitudeSpecified = (_abortAltitude != NoAbortAltitude ); < Boolean minAltitudeSpecified = (_minAltitude != NoMinimumAltitude); < Boolean hardDeckSpecified = (_hardDeck != NoHardDeck); < Boolean deltaDepthSpecified = (_deltaDepth != NoDeltaDepth); < Boolean maxLowerPitchSpecified = (_maxLowerPitch != NoMaxLowerPitch*Math::RadsPerDeg); < Boolean pitchLimitAltSpecified = (_pitchLimitAlt != NoPitchLimitAlt); < < double maxDepth = _maxDepth, minDepth = _minDepth, hardDeck = _hardDeck; < double depth = _navigation->depth(); < double altitude = _navigation->altitude(); < < double flsVertRange, flsHorzRange; < Boolean useFls; < < _navigation->getFlsData( &flsVertRange, &flsHorzRange, &useFls ); < < < //make sure minAltitude is reasonable, since the prop is stopped at < //the abort altitude and restarted at the minimum altitude < if (!minAltitudeSpecified) _minAltitude = _abortAltitude; < < //** First, confirm vehicle is not outside of abort depth < if (abortDepthSpecified && (depth > _abortDepth)) { < Syslog::write("DepthEnvelope -- Measured depth %lf over allowable " < "depth %lf at t= %.2f. Stopping!", < depth, _abortDepth, _missionClock->seconds() ); < _depthStop = True; < } < < //if we've floated shallower than the max depth, then clear the depth stop flag < if (depth <= maxDepth) { < if (_depthStop) Syslog::write("DepthEnvelope -- Measured depth %lf shallower than %lf. Restarting!", depth, maxDepth); < _depthStop = False; < } < < // check the altitude,stop or restart the prop as appropriate < if (abortAltitudeSpecified && altitude != INVALID_ALTITUDE) { < //Too close to the bottom. Latch the prop off. < if (altitude < _abortAltitude && !useFls) { < if( !_altitudeStop ) < { < Syslog::write("DepthEnvelope -- Measured altitude = %lf. Allowable " < "altitude = %lf. t= %.2f. Stopping!", < altitude, _abortAltitude, _missionClock->seconds()); < _restartDepth = depth - _deltaDepth; < } < _altitudeStop = True; < } < //The FLS has detected something in our path ahead. Latch the prop off. < if (altitude < _abortAltitude && useFls && flsHorzRange<_minFlsHorzRange ) { < if( !_altitudeStop ) < { < Syslog::write("DepthEnvelope -- Obstacle detected at altitude = %lf " < "and range %lf.\n Allowable " < "altitude = %lf. t= %.2f. Stopping!", < altitude, flsHorzRange, _abortAltitude, < _missionClock->seconds()); < _restartDepth = depth - _deltaDepth; < } < _altitudeStop = True; < } < //restart prop when we are higher than the minimum altitude < if (!deltaDepthSpecified && _altitudeStop && (altitude>_minAltitude)) { < Syslog::write("DepthEnvelope -- Measured altitude = %lf. Abort altitude " < "= %lf. t= %.2f, starting prop!", < altitude, _abortAltitude, _missionClock->seconds()); < _altitudeStop = False; < } < if (deltaDepthSpecified && (altitude>_minAltitude) && _altitudeStop && < (depth < _restartDepth)) { < Syslog::write("DepthEnvelope -- Depth %lf shallower than restart " < "depth %lf \nand altitude %lf greater than abort altitude " < "%lf at t= %.2f. Starting prop!", < depth, _restartDepth, altitude, _abortAltitude, < _missionClock->seconds()); < _altitudeStop = False; < } < } < < if ((altitude==INVALID_ALTITUDE) && < (hardDeckSpecified && (depth < hardDeck)) && < _altitudeStop) { < Syslog::write("DepthEnvelope -- Depth %lf shallow enough to restart " < "prop at t= %.2f!", < depth, _missionClock->seconds()); < _altitudeStop = False; < } < < // (this is new from Ody) if the stack is empty, then pass it through < // (that is, if all behaviors above are inactive, then be inactive also < if( isOutputEmpty() ) { < dprintf("DepthEnvelope::execute() - Received empty stack, passing it through\n"); < return; < } < < if ( altitude==INVALID_ALTITUDE ) < { < if (getVerticalMode() == DynamicControlIF::Altitude ) < { < if( _latchData ) < { < Syslog::write("DepthEnvelope -- Direct Altitude Control: " < "Invalid Altitude at t= %.2f!. " < "Latching depth %lf.", _missionClock->seconds(), depth ); < _lastDepth = depth; < if( deltaDepthSpecified ) _restartDepth = depth - _deltaDepth; < _lastTime = _missionClock->seconds(); < _latchData = False; < if( _altSuspendDepthControl ) < { < Syslog::write("DepthEnvelope -- Direct Altitude Control: " < "Maintaining constant depth."); < } < if( _altSuspendPitch != NoAltSuspendPitch*Math::RadsPerDeg ) < { < Syslog::write("DepthEnvelope -- Direct Altitude Control: " < "Maintaining constant pitch."); < } < } < if( _altSuspendDepthControl ) < { < setVertical(DynamicControlIF::DepthImmediate, _lastDepth); < } < else if( _altSuspendPitch != NoAltSuspendPitch*Math::RadsPerDeg ) < { < setVertical(DynamicControlIF::Pitch, _altSuspendPitch); < } < else < { < // The vehicle won't restart unless both the abort and minimum < // altitudes are specified. < if( !_altitudeStop ) < { < Syslog::write("DepthEnvelope -- Direct Altitude Control: " < "Altitude invalid at t= %.2f!. " < "Suspending propulsion.", _missionClock->seconds()); < } < _altitudeStop = True; < } < if( _missionClock->seconds() - _lastTime > _altTimeOut ) < { < if( !_altitudeStop ) < { < Syslog::write("DepthEnvelope -- Direct Altitude Control: " < "Altitude still invalid at t= %.2f!. " < "Suspending propulsion.", _missionClock->seconds()); < } < _altitudeStop = True; < //abortMission(); < } < } < } < else if( !_latchData ) < { < Syslog::write("DepthEnvelope -- Obtained valid altitude at %.2f.", < _missionClock->seconds()); < < if( _missionClock->seconds() - _lastTime < _altTimeOut && < getVerticalMode() == DynamicControlIF::Altitude ) < { < Syslog::write("DepthEnvelope -- Direct Altitude Control: %.2f seconds left until timeout.", < _altTimeOut- (_missionClock->seconds() - _lastTime)); < } < _latchData = True; < } < < if( minAltitudeSpecified ) < { < double depthToMinAltitude = depth + altitude - _minAltitude; < // < // < _maxLowerPitchDepth = depth + altitude - _pitchLimitAlt; < < if (depthToMinAltitude < _maxDepth) < // "Clip" maximum depth < maxDepth = depthToMinAltitude; < } < < if (_altitudeStop || _depthStop) { //if _altitudeStop flag is set, then turn off the prop < setSpeed(DynamicControlIF::Speed, 0.0); < if( deltaDepthSpecified ) < setVertical(DynamicControlIF::Elevator, _elevator); < } < < // Commanded too deep < if( ( (getVerticalMode()==DynamicControlIF::Depth) || < (getVerticalMode()==DynamicControlIF::DepthImmediate)) && --- > Boolean debug = True; > Boolean abortDepthSpecified = (_abortDepth != NoAbortDepth); > Boolean abortAltitudeSpecified = (_abortAltitude != NoAbortAltitude ); > Boolean minAltitudeSpecified = (_minAltitude != NoMinimumAltitude); > Boolean hardDeckSpecified = (_hardDeck != NoHardDeck); > Boolean deltaDepthSpecified = (_deltaDepth != NoDeltaDepth); > Boolean maxLowerPitchSpecified = (_maxLowerPitch != NoMaxLowerPitch*Math::RadsPerDeg); > Boolean pitchLimitAltSpecified = (_pitchLimitAlt != NoPitchLimitAlt); > > double maxDepth = _maxDepth, minDepth = _minDepth, hardDeck = _hardDeck; > double depth = _navigation->depth(); > double altitude = _navigation->altitude(); > > double flsVertRange, flsHorzRange; > Boolean useFls; > > _navigation->getFlsData( &flsVertRange, &flsHorzRange, &useFls ); > > > //make sure minAltitude is reasonable, since the prop is stopped at > //the abort altitude and restarted at the minimum altitude > if (!minAltitudeSpecified) _minAltitude = _abortAltitude; > > //** First, confirm vehicle is not outside of abort depth > if (abortDepthSpecified && (depth > _abortDepth)) { > Syslog::write("DepthEnvelope -- Measured depth %lf over allowable " > "depth %lf at t= %.2f. Stopping!", > depth, _abortDepth, _missionClock->seconds() ); > _depthStop = True; > } > > //if we've floated shallower than the max depth, then clear the depth stop flag > if (depth <= maxDepth) { > if (_depthStop) Syslog::write("DepthEnvelope -- Measured depth %lf shallower than %lf. Restarting!", depth, maxDepth); > _depthStop = False; > } > > // check the altitude,stop or restart the prop as appropriate > if (abortAltitudeSpecified && altitude != INVALID_ALTITUDE) { > //Too close to the bottom. Latch the prop off. > if (altitude < _abortAltitude && !useFls) { > if( !_altitudeStop ) > { > Syslog::write("DepthEnvelope -- Measured altitude = %lf. Allowable " > "altitude = %lf. t= %.2f. Stopping!", > altitude, _abortAltitude, _missionClock->seconds()); > _restartDepth = depth - _deltaDepth; > } > _altitudeStop = True; > } > //The FLS has detected something in our path ahead. Latch the prop off. > if (altitude < _abortAltitude && useFls && flsHorzRange<_minFlsHorzRange ) { > if( !_altitudeStop ) > { > Syslog::write("DepthEnvelope -- Obstacle detected at altitude = %lf " > "and range %lf.\n Allowable " > "altitude = %lf. t= %.2f. Stopping!", > altitude, flsHorzRange, _abortAltitude, > _missionClock->seconds()); > _restartDepth = depth - _deltaDepth; > } > _altitudeStop = True; > } > //restart prop when we are higher than the minimum altitude > if (!deltaDepthSpecified && _altitudeStop && (altitude>_minAltitude)) { > Syslog::write("DepthEnvelope -- Measured altitude = %lf. Abort altitude " > "= %lf. t= %.2f, starting prop!", > altitude, _abortAltitude, _missionClock->seconds()); > _altitudeStop = False; > } > if (deltaDepthSpecified && (altitude>_minAltitude) && _altitudeStop && > (depth < _restartDepth)) { > Syslog::write("DepthEnvelope -- Depth %lf shallower than restart " > "depth %lf \nand altitude %lf greater than abort altitude " > "%lf at t= %.2f. Starting prop!", > depth, _restartDepth, altitude, _abortAltitude, > _missionClock->seconds()); > _altitudeStop = False; > } > } > > if ((altitude==INVALID_ALTITUDE) && > (hardDeckSpecified && (depth < hardDeck)) && > _altitudeStop) { > Syslog::write("DepthEnvelope -- Depth %lf shallow enough to restart " > "prop at t= %.2f!", > depth, _missionClock->seconds()); > _altitudeStop = False; > } > > // (this is new from Ody) if the stack is empty, then pass it through > // (that is, if all behaviors above are inactive, then be inactive also > if( isOutputEmpty() ) { > dprintf("DepthEnvelope::execute() - Received empty stack, passing it through\n"); > return; > } > > if ( altitude==INVALID_ALTITUDE ) > { > if (getVerticalMode() == DynamicControlIF::Altitude ) > { > if( _latchData ) > { > Syslog::write("DepthEnvelope -- Direct Altitude Control: " > "Invalid Altitude at t= %.2f!. " > "Latching depth %lf.", _missionClock->seconds(), depth ); > _lastDepth = depth; > if( deltaDepthSpecified ) _restartDepth = depth - _deltaDepth; > _lastTime = _missionClock->seconds(); > _latchData = False; > if( _altSuspendDepthControl ) > { > Syslog::write("DepthEnvelope -- Direct Altitude Control: " > "Maintaining constant depth."); > } > if( _altSuspendPitch != NoAltSuspendPitch*Math::RadsPerDeg ) > { > Syslog::write("DepthEnvelope -- Direct Altitude Control: " > "Maintaining constant pitch."); > } > } > if( _altSuspendDepthControl ) > { > setVertical(DynamicControlIF::DepthImmediate, _lastDepth); > } > else if( _altSuspendPitch != NoAltSuspendPitch*Math::RadsPerDeg ) > { > setVertical(DynamicControlIF::Pitch, _altSuspendPitch); > } > else > { > // The vehicle won't restart unless both the abort and minimum > // altitudes are specified. > if( !_altitudeStop ) > { > Syslog::write("DepthEnvelope -- Direct Altitude Control: " > "Altitude invalid at t= %.2f!. " > "Suspending propulsion.", _missionClock->seconds()); > } > _altitudeStop = True; > } > if( _missionClock->seconds() - _lastTime > _altTimeOut ) > { > if( !_altitudeStop ) > { > Syslog::write("DepthEnvelope -- Direct Altitude Control: " > "Altitude still invalid at t= %.2f!. " > "Suspending propulsion.", _missionClock->seconds()); > } > _altitudeStop = True; > //abortMission(); > } > } > } > else if( !_latchData ) > { > Syslog::write("DepthEnvelope -- Obtained valid altitude at %.2f.", > _missionClock->seconds()); > > if( _missionClock->seconds() - _lastTime < _altTimeOut && > getVerticalMode() == DynamicControlIF::Altitude ) > { > Syslog::write("DepthEnvelope -- Direct Altitude Control: %.2f seconds left until timeout.", > _altTimeOut- (_missionClock->seconds() - _lastTime)); > } > _latchData = True; > } > > if( minAltitudeSpecified ) > { > double depthToMinAltitude = depth + altitude - _minAltitude; > // > // > _maxLowerPitchDepth = depth + altitude - _pitchLimitAlt; > > if (depthToMinAltitude < _maxDepth) > // "Clip" maximum depth > maxDepth = depthToMinAltitude; > } > > if (_altitudeStop || _depthStop) { //if _altitudeStop flag is set, then turn off the prop > setSpeed(DynamicControlIF::Speed, 0.0); > if( deltaDepthSpecified ) > setVertical(DynamicControlIF::Elevator, _elevator); > } > > // Commanded too deep > if( ( (getVerticalMode()==DynamicControlIF::Depth) || > (getVerticalMode()==DynamicControlIF::DepthImmediate)) && 347,365c347,365 < { < dprintf("DepthEnvelope::execute() - commanded depth = %.3f, too deep\n", < getVertical() ); < setVertical(getVerticalMode(), maxDepth); < < if( pitchLimitAltSpecified && < maxLowerPitchSpecified && (depth > _maxLowerPitchDepth )) < { < setVertical(DynamicControlIF::Depth, maxDepth, _maxLowerPitch); < //Syslog::write("DepthEnvelope - maxLowerPitch = %.2f", < // _maxLowerPitch); < } < return; < } < < // Too shallow? < // Commanded shallow? < if( ((getVerticalMode() == DynamicControlIF::Depth) || < (getVerticalMode() == DynamicControlIF::DepthImmediate)) && --- > { > dprintf("DepthEnvelope::execute() - commanded depth = %.3f, too deep\n", > getVertical() ); > setVertical(getVerticalMode(), maxDepth); > > if( pitchLimitAltSpecified && > maxLowerPitchSpecified && (depth > _maxLowerPitchDepth )) > { > setVertical(DynamicControlIF::Depth, maxDepth, _maxLowerPitch); > //Syslog::write("DepthEnvelope - maxLowerPitch = %.2f", > // _maxLowerPitch); > } > return; > } > > // Too shallow? > // Commanded shallow? > if( ((getVerticalMode() == DynamicControlIF::Depth) || > (getVerticalMode() == DynamicControlIF::DepthImmediate)) && 367,371c367,371 < dprintf("DepthEnvelope::execute() - commanded depth = %.3f, too shallow\n", < getVertical() ); < setVertical(getVerticalMode(), minDepth); < return; < } --- > dprintf("DepthEnvelope::execute() - commanded depth = %.3f, too shallow\n", > getVertical() ); > setVertical(getVerticalMode(), minDepth); > return; > } Index: auv/altex/onboard/LayeredControl/DynoLayeredControl.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/DynoLayeredControl.cc,v retrieving revision 1.11 retrieving revision 1.11.4.2 diff -r1.11 -r1.11.4.2 54c54 < void DynoLayeredControl::initialize(const char *plan, const char *abortPlan) --- > void DynoLayeredControl::initialize(const char *plan, const char *abortPlan, DynamicControl *dynamicControl) 58c58 < LayeredControl::initialize(plan, abortPlan); --- > LayeredControl::initialize(plan, abortPlan, dynamicControl); 95c95,96 < LayeredControl::callback(); --- > // changed for gnc > // LayeredControl::callback(); Index: auv/altex/onboard/LayeredControl/DynoLayeredControl.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/DynoLayeredControl.h,v retrieving revision 1.3 retrieving revision 1.3.6.1 diff -r1.3 -r1.3.6.1 25a26 > #include "DynamicControl.h" 59c60 < virtual void initialize(const char *planName, const char *abortPlanName); --- > virtual void initialize(const char *planName, const char *abortPlanName, DynamicControl *dynamicControl); Index: auv/altex/onboard/LayeredControl/LayeredControl.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/LayeredControl.cc,v retrieving revision 1.44.2.4 retrieving revision 1.44.2.4.2.4 diff -r1.44.2.4 -r1.44.2.4.2.4 28a29,43 > //#include "Gnc.h" > > LayeredControl::LayeredControl() > { > Boolean debug = True; > dprintf("LayeredControl default ctor"); > _quitFlag=False; > } > // changed for gnc > //LayeredControl::LayeredControl(const char *planName, const char *abortPlanName, > // int period) > // : PeriodicTask(LayeredControlName), _vcsMessages(0), > // _vcsNewBehaviorTimeout(False), _vcsNewBehaviorTimeoutLimit(20), > // _vcsNewBehaviorTimer(0) > 32c47 < : PeriodicTask(LayeredControlName), _vcsMessages(0), --- > : _vcsMessages(0), 37a53 > _quitFlag=False; 44c60 < _dynamicControl = new DynamicControlIF("dynamicControl"); --- > 67,68c83,86 < _eventService->subscribe(_navigation, NavigationIF::NewOutput, < (EventService::Callback )eventCallback); --- > > // changed for gnc > // _eventService->subscribe(_navigation, NavigationIF::NewOutput, > // (EventService::Callback )eventCallback); 77a96,97 > > // changed for gnc 157c177,178 < delete _dynamicControl; --- > > // don't delete dynamicControlInstance - owner deletes. 198c219 < const char *abortPlanName) --- > const char *abortPlanName, DynamicControl *dynamicControl) 199a221,222 > Boolean debug=True; > dprintf("LayeredControl::initialize\n"); 224c247,250 < } --- > > if (dynamicControl) { > _dynamicControlInstance = dynamicControl; > } 225a252,253 > } > // changed for gnc 230a259 > // changed for gnc 233,235c262,268 < Boolean debug = False; < < dprintf("Inside LayeredControl::callback()\n"); --- > Boolean debug = True; > // static int loop_count=-1; > // loop_count++; > // > // if (loop_count%0 == 0) > // dprintf("Inside LayeredControl::callback()\n"); > 292,300c325,333 < dprintf("LayeredControl::callback() - " < "verticalMode=%d, horizontalMode=%d, speedMode=%d\n", < _resolvedCommand.verticalMode, _resolvedCommand.horizontalMode, < _resolvedCommand.speedMode); < < dprintf("LayeredControl::callback() - vertical=%.2f, horizontal=%.2f, " < "speed=%.2f\n", < _resolvedCommand.vertical, _resolvedCommand.horizontal, < _resolvedCommand.speed); --- > // dprintf("LayeredControl::callback() - " > // "verticalMode=%d, horizontalMode=%d, speedMode=%d\n", > // _resolvedCommand.verticalMode, _resolvedCommand.horizontalMode, > // _resolvedCommand.speedMode); > > // dprintf("LayeredControl::callback() - vertical=%.2f, horizontal=%.2f, " > // "speed=%.2f\n", > // _resolvedCommand.vertical, _resolvedCommand.horizontal, > // _resolvedCommand.speed); 303c336,341 < _dynamicControl->setCommand(&_resolvedCommand); --- > if (_dynamicControlInstance) { > _dynamicControlInstance->setCommand(&_resolvedCommand); > } > else{ > dprintf("ERR: LayeredControl::callback - NULL DynamicControl instance\n"); > } 311c349,350 < triggerEvent(LayeredControlIF::MissionStarted); --- > // changed for gnc [klh] > // triggerEvent(LayeredControlIF::MissionStarted); 379,382c418,421 < < dprintf("LayeredControl::executeBehaviors -- Trying behavior %d: %s", < priority, behavior->name() ); < --- > //debug = True; > dprintf("LayeredControl::executeBehaviors -- Trying behavior [%s] - p[%d] s[%s]", > behavior->name(),priority, behavior->stateMnem() ); > //debug = False; 551c590 < Syslog::write("Initiating Mission Abort!\n"); --- > Syslog::write("LayeredControl::initiateAbort - Initiating Mission Abort!\n"); 554,555c593,596 < < if( _dynamicControl->newGains() ) _dynamicControl->revertGains(); --- > > if( _dynamicControlInstance && _dynamicControlInstance->newGains() ){ > _dynamicControlInstance->revertGains(); > } 559a601 > 602c644,646 < triggerEvent(LayeredControlIF::MissionStatusChange); --- > // changed for gnc > //triggerEvent(LayeredControlIF::MissionStatusChange); > 608,609c652,657 < triggerEvent(LayeredControlIF::MissionStatusChange); < initiateShutdown(); --- > // changed for gnc > //triggerEvent(LayeredControlIF::MissionStatusChange); > // set quit flag to signal GNC that layered control is finished > _quitFlag=True; > > //initiateShutdown(); 612a661 > _quitFlag=True; 692c741,742 < triggerEvent(LayeredControlIF::OutputGenerated); --- > // changed for GNC [klh] > //triggerEvent(LayeredControlIF::OutputGenerated); 694a745,771 > > void LayeredControl::setAbortFlag(Boolean abort) > { > _quitFlag=abort; > } > > Boolean LayeredControl::abortFlag() > { > return _quitFlag; > } > > void LayeredControl::notifyEvent(EventCode event) > { > Boolean debug = False; > > dprintf("LayeredControl::notifyEvent - event[%d]\n",event); > // Navigation "NewOutput" event > if (event==NavigationIF::NewOutput){ > dprintf("LayeredControl::notifyEvent - NavigationIF::NewOutput\n"); > eventCallback(_navigation, event); > } > > // if (event==DynamicControlIF::Ready){ > // dprintf("LayeredControl::notifyEvent - DynamicControlIF::Ready\n"); > // } > } > Index: auv/altex/onboard/LayeredControl/LayeredControl.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/LayeredControl.h,v retrieving revision 1.20 retrieving revision 1.20.6.3 diff -r1.20 -r1.20.6.3 21a22 > #include "GncParentIF.h" 22a24 > #include "DynamicControl.h" 37d38 < 60d60 < 62,64c62,71 < < class LayeredControl : public PeriodicTask { < --- > //class LayeredControl; > //class Navigation; > class DynamicControl; > //class Behavior; > //class Gnc; > > // changed for gnc > //class LayeredControl : PeriodicTask { > class LayeredControl { > friend class Gnc; 83c90,91 < LayeredControl(const char *planName, const char *abortPlanName, --- > LayeredControl(); > LayeredControl(const char *planName, const char *abortPlanName, 102a111 > 134c143 < virtual void initialize(const char *planName, const char *abortPlanName); --- > virtual void initialize(const char *planName, const char *abortPlanName, DynamicControl *dynamicControl); 142a152,155 > /////////////////////////////////////////////////////////////////// > // Periodic callback > void callback(); > 143a157,161 > // added for GNC [klh] > void notifyEvent(EventCode event); > Boolean _quitFlag; > void setAbortFlag(Boolean abort); > Boolean abortFlag(); 157,158c175,177 < virtual void callback(); < --- > // changed for gnc > // virtual void callback(); > // changed for gnc 201c220 < DynamicControlIF *_dynamicControl; --- > DynamicControl *_dynamicControlInstance; 232a252,253 > > Index: auv/altex/onboard/LayeredControl/LayeredControlServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/LayeredControlServer.cc,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -r1.10 -r1.10.4.1 68a69,70 > Boolean debug=True; > dprintf("LayeredControlServer setting abortMission"); 110,118c112,113 < char *program = "layeredControl"; < char errorBuf[256]; < < pid_t pid; < < strcpy( _argv[0], program ); < _argv[_argc] = NULL; < < switch ((pid = fork())) { --- > Boolean debug = True; > dprintf("LayeredControlServer - letting Gnc start layered control\n"); 120,137c115,142 < case 0: < // In child < // Execute server program < execvp(program, (char const * const *)&_argv[0] ); < < sprintf(errorBuf, < "Task::spawnServer() - execlp() of \"%s\" failed", program); < < perror(errorBuf); < < break; < < case -1: < perror("Task::spawnServer() - fork() failed"); < return -1; < } < < return 0; --- > // char *program = "layeredControl"; > // char errorBuf[256]; > // > // pid_t pid; > // > // strcpy( _argv[0], program ); > // _argv[_argc] = NULL; > // > // switch ((pid = fork())) { > // > // case 0: > // // In child > // // Execute server program > // execvp(program, (char const * const *)&_argv[0] ); > // > // sprintf(errorBuf, > // "Task::spawnServer() - execlp() of \"%s\" failed", program); > // > // perror(errorBuf); > // > // break; > // > // case -1: > // perror("Task::spawnServer() - fork() failed"); > // return -1; > // } > > return 0; Index: auv/altex/onboard/LayeredControl/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/Makefile,v retrieving revision 1.61.2.2 retrieving revision 1.61.2.2.2.2 diff -r1.61.2.2 -r1.61.2.2.2.2 14c14 < # $Header: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/Makefile,v 1.61.2.2 2016/02/26 21:55:37 rob Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/Makefile,v 1.61.2.2.2.2 2016/04/15 00:30:23 headley Exp $ 43a44 > -I../gnc \ 47a49 > -I../DynamicControl \ 128c130,132 < edgetech.o --- > edgetech.o \ > missionPlan.tab.o \ > missionPlan.yy.o 136c140,141 < edgetechTest --- > edgetechTest \ > layeredControl.lib 145,146d149 < missionPlan.tab.o \ < missionPlan.yy.o \ 149c152 < missionPlan.tab.o missionPlan.yy.o $(OBJS) $(LIBS) -o $@ --- > $(OBJS) $(LIBS) -o $@ 152,153d154 < missionPlan.tab.o \ < missionPlan.yy.o \ 156c157 < missionPlan.tab.o missionPlan.yy.o $(OBJS) $(LIBS) -o $@ --- > $(OBJS) $(LIBS) -o $@ 157a159,175 > #layeredControl: _layeredControl.o \ > #missionPlan.tab.o \ > #missionPlan.yy.o \ > #$(OBJS) $(LIBS) > #$(LD) $(LDFLAGS) _layeredControl.o \ > #missionPlan.tab.o missionPlan.yy.o $(OBJS) $(LIBS) -o $@ > > #layeredControlServer: _layeredControlServer.o \ > #missionPlan.tab.o \ > #missionPlan.yy.o \ > #$(OBJS) $(LIBS) > #$(LD) $(LDFLAGS) _layeredControlServer.o \ > #missionPlan.tab.o missionPlan.yy.o $(OBJS) $(LIBS) -o $@ > > layeredControl.lib: \ > $(OBJS) > $(AR) -n layeredControl.lib +- $(OBJS) 159c177 < bdoc: bdoc.o missionPlan.tab.o missionPlan.yy.o \ --- > bdoc: bdoc.o \ 161d178 < 163c180,185 < missionPlan.tab.o missionPlan.yy.o $(OBJS) $(LIBS) -o $@ --- > $(OBJS) $(LIBS) -o $@ > > #bdoc: bdoc.o missionPlan.tab.o missionPlan.yy.o \ > #$(OBJS) $(LIBS) > #$(LD) $(LDFLAGS) bdoc.o \ > #missionPlan.tab.o missionPlan.yy.o $(OBJS) $(LIBS) -o $@ 177c199,214 < # Stuff generated by Lex-Yacc --- > > # Stuff generated by Lex-Yacc > #missionPlan.tab.cc: missionPlan.y > # yacc -b missionPlan -d -v missionPlan.y > # mv missionPlan.tab.c missionPlan.tab.cc > > ## $(AUV)/LayeredControl/yy-lsed ymp_ > yy-sym.sed > ## sed -f yy-sym.sed < missionPlan.tab.c > missionPlan.tab.cc > > #missionPlan.yy.cc: missionPlan.l > # lex missionPlan.l > # mv lex.yy.c missionPlan.yy.cc > ## $(AUV)/LayeredControl/yy-lsed mp_ > ll-sym.sed > ## sed -f ll-sym.sed < lex.yy.c > missionPlan.yy.cc > > 180c217,220 < mv missionPlan.tab.c missionPlan.tab.cc --- > mv missionPlan.tab.h missionPlan.tab.h.gen > awk -f mpdef.awk missionPlan.tab.h.gen > missionPlan.tab.h > awk -f mpdef.awk missionPlan.tab.c > missionPlan.tab.cc > mv missionPlan.tab.c missionPlan.tab.c.gen 184c224,225 < mv lex.yy.c missionPlan.yy.cc --- > awk -f mpdef.awk lex.yy.c > missionPlan.yy.cc > Index: auv/altex/onboard/LayeredControl/SetControlGains.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/SetControlGains.cc,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -r1.1 -r1.1.4.1 55,56c55,57 < _dynamicControlIF = new DynamicControlIF("dynamicControl"); < } --- > //_dynamicControlIF = new DynamicControlIF("dynamicControl"); > _gncIF = new GncIF("gnc"); > } 67c68,69 < delete _dynamicControlIF; --- > //delete _dynamicControlIF; > delete _gncIF; 85,86c87,98 < if( _revert ) _dynamicControlIF->revertGains(); < else _dynamicControlIF->setGains(&_gains); --- > // if (_dynamicControlIF) { > if (_gncIF) { > if( _revert ){ > // _dynamicControlIF->revertGains(); > _gncIF->dcRevertGains(); > }else{ > // _dynamicControlIF->setGains(&_gains); > _gncIF->dcSetGains(&_gains); > } > }else{ > Syslog::write("SetControlGains::execute - DynamicControlIF reference is NULL: can't revert/set gains\n"); > } Index: auv/altex/onboard/LayeredControl/SetControlGains.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/SetControlGains.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -r1.1 -r1.1.4.1 21a22 > #include "GncIF.h" 40,41c41,44 < DynamicControlIF::Gains _gains; < DynamicControlIF *_dynamicControlIF; --- > // DynamicControlIF::Gains _gains; > // DynamicControlIF *_dynamicControlIF; > GncIF::Gains _gains; > GncIF *_gncIF; Index: auv/altex/onboard/LayeredControl/WaypointBottom.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/WaypointBottom.cc,v retrieving revision 1.16.2.8 retrieving revision 1.16.2.7 diff -r1.16.2.8 -r1.16.2.7 12d11 < #include "MissionTimeAttribute.h" 93,95c92,93 < attributes.add(new BooleanAttribute("useThetaB", "", &_useThetaB, False)); < < attributes.add(new BooleanAttribute("reinitFilter", "", &_reinitFilter, False)); --- > attributes.add(new BooleanAttribute("useThetaB", "", > &_useThetaB, False)); 140,172d137 < // Read in the attributes: < // Attribute::Input *input; < // input = new Attribute::Input("endTime", NoTimeLimitMnem); < // attributes.parse(input); < // delete input; < < // < // If the user requests a filter reinitialization, open the interface, < // provided another behavior hasn't already opened it: < //if( _reinitFilter && !Behavior::_terrainAid ) < if( !Behavior::_terrainAid ) < { < try < { < Behavior::_terrainAid = new TerrainAidIF("TerrainAidIFServer", 10); < Syslog::write("WaypointBottom - Opened TerrainAidIFServer."); < < } < catch (Exception e) < { < Syslog::write("WaypointBottom - %s", e.msg); < Behavior::_terrainAid = NULL; < } < catch (...) < { < Behavior::_terrainAid = NULL; < Syslog::write("WaypointBottom - Could not open TerrainAidIFServer."); < } < } < // < // So I don't have to keep typing the qualifier: < _terrainAidIF = Behavior::_terrainAid; < 174a140,141 > > 184,188d150 < if( !_terrainAidIF ) < { < delete _terrainAidIF; < _terrainAidIF = NULL; < } 292,310d253 < < Syslog::write("WaypointBottom - reinitFilter = %d.", _reinitFilter); < try < { < if( _reinitFilter ) < { < _terrainAidIF->reinitFilter(); < Syslog::write("WaypointBottom - Reinitialized Filter."); < } < } < catch (Exception e) < { < Syslog::write("WaypointBottom - Attempted to reinitialize: %s", e.msg); < } < catch (...) < { < Behavior::_terrainAid = NULL; < Syslog::write("WaypointBottom - Exception caught while Attempting to reinitialize."); < } Index: auv/altex/onboard/LayeredControl/WaypointBottom.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/WaypointBottom.h,v retrieving revision 1.11.2.4 retrieving revision 1.11.2.3 diff -r1.11.2.4 -r1.11.2.3 25d24 < #include "TerrainAidIF.h" 73d71 < Boolean _reinitFilter; 79,80d76 < TerrainAidIF *_terrainAidIF; < Index: auv/altex/onboard/LayeredControl/WaypointWall.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/WaypointWall.cc,v retrieving revision 1.17.2.12 retrieving revision 1.17.2.11.2.1 diff -r1.17.2.12 -r1.17.2.11.2.1 34c34 < static Boolean WaypointWall::TurnLeft = False; --- > static Boolean WaypointWall::AbortRequested = False; 196,197c196,198 < _dynamicControlIF = new DynamicControlIF("dynamicControl"); < } --- > // _dynamicControlIF = new DynamicControlIF("dynamicControl"); > _gncIF = new GncIF("gnc"); > } 232a234,236 > > // delete _dynamicControlIF; > delete _gncIF; 457a462 > WaypointWall::AbortRequested = True; 464,466d468 < // If the wall is present, but goes absent, save the last good y-intercept: < if(_wallPresent) _last_yInterWall_B = _yInterWall_B; < 608a611 > WaypointWall::AbortRequested = True; 613,672c616,661 < if( _waypointPriority > 0 ) < { < // < // Beware that in Wall Mode, xTrkOffset is the position error, not the offset. < // < _xTrkOffset = xteWay; //Fly the center. _maxXte is the left edge. < _psiWallwrtoVehicle = 0.; < _LHT = False; < _RHT = False; < if( !_firstAbsence && _wallPresentFlipFlop) < { < Syslog::write("WaypointWall - Error. The wall has become " < "absent at %.1f seconds. WaypointPriority = %d, " < "so fly the line.", < _missionClock->seconds(), _waypointPriority); < _wallPresentFlipFlop = False; < } < } < else < { < if( _firstAbsence ) < { < // < // Beware that in Wall Mode, xTrkOffset is the position error, not the offset. < // < _xTrkOffset = xteWay; //Fly the center. _maxXte is the left edge. < _psiWallwrtoVehicle = 0.; < _LHT = False; < _RHT = False; < } < else < { < _dynamicControlIF->getWallData( &_lastWallTime, &_wallBearing ); < // < // Fly the last good wall bearing: < _bearing = _wallBearing; < // < //Without the wall we can't compute a lateral error, so we must < //open the loop and just fly the heading. This is essentially now < //a setpoint. < _xTrkOffset = 0.; < < if( _lastWallTime + _wallAbsentTime < _nowUnixDT ) < { < Syslog::write("WaypointWall - Error. The wall has been absent " < "for %.1f seconds, and waypointPriority = %d. Abort.", < _nowUnixDT - _lastWallTime, < _waypointPriority); < // < // Be VERY careful. Use the last good y intercept. < Syslog::write("WaypointWall - last_yInterWall_B = %.2f m. ", < _last_yInterWall_B); < if( _last_yInterWall_B > 0 ) < { < WaypointWall::TurnLeft = True; < } < abortMission(); < } < } < } //end waypointPriority == 0 --- > if( _waypointPriority > 0 ) > { > // > // Beware that in Wall Mode, xTrkOffset is the position error, not the offset. > // > _xTrkOffset = xteWay; //Fly the center. _maxXte is the left edge. > _psiWallwrtoVehicle = 0.; > _LHT = False; > _RHT = False; > if( !_firstAbsence && _wallPresentFlipFlop) > { > Syslog::write("WaypointWall - Error. The wall has become " > "absent at %.1f seconds. WaypointPriority = %d, " > "so fly the line.", > _missionClock->seconds(), _waypointPriority); > _wallPresentFlipFlop = False; > } > } > else > { > if( _firstAbsence ) > { > // > // Beware that in Wall Mode, xTrkOffset is the position error, not the offset. > // > _xTrkOffset = xteWay; //Fly the center. _maxXte is the left edge. > _psiWallwrtoVehicle = 0.; > _LHT = False; > _RHT = False; > } > else > { > //_dynamicControlIF->getWallData( &_lastWallTime, &_wallBearing ); > _gncIF->dcGetWallData( &_lastWallTime, &_wallBearing ); > > if( _lastWallTime + _wallAbsentTime < _nowUnixDT ) > { > Syslog::write("WaypointWall - Error. The wall has been absent " > "for %.1f seconds, and waypointPriority = %d. Abort.", > _nowUnixDT - _lastWallTime, > _waypointPriority); > abortMission(); > WaypointWall::AbortRequested = True; > } > } > } //end waypointPriority == 0 Index: auv/altex/onboard/LayeredControl/WaypointWall.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/WaypointWall.h,v retrieving revision 1.15.2.6 retrieving revision 1.15.2.5.2.1 diff -r1.15.2.6 -r1.15.2.5.2.1 59c59 < static Boolean TurnLeft; --- > static Boolean AbortRequested; 112c112 < double _psiWall_B, _yInterWall_B, _last_yInterWall_B; --- > double _psiWall_B, _yInterWall_B; 120c120,121 < DynamicControlIF *_dynamicControlIF; --- > //DynamicControlIF *_dynamicControlIF; > GncIF *_gncIF; Index: auv/altex/onboard/LayeredControl/WaypointWallEscape.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/Attic/WaypointWallEscape.cc,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.4.2.1 diff -r1.1.2.5 -r1.1.2.4.2.1 35,36c35,37 < _dynamicControlIF = new DynamicControlIF("dynamicControl"); < } --- > // _dynamicControlIF = new DynamicControlIF("dynamicControl"); > _gncIF = new GncIF("gnc"); > } 47a49,50 > // delete _dynamicControlIF; > delete _gncIF; 84c87,88 < _dynamicControlIF->getWallData( &_lastWallTime, &_wallBearing ); --- > //_dynamicControlIF->getWallData( &_lastWallTime, &_wallBearing ); > _gncIF->dcGetWallData( &_lastWallTime, &_wallBearing ); 89c93 < "mission time = %.2f, _wallBearing = %.1f\n", --- > "mission time = %-15.2f, _wallBearing = %.1f\n", 104,116c108,109 < // Turn until perpendicular to the estimated wall bearing. < Syslog::write("WaypointWallEscape::The last good wall bearing was %.2f.", < _wallBearing*180/PI); < if( WaypointWall::TurnLeft ) < { < Syslog::write("WaypointWallEscape::The wall is to our right, so turn left."); < _bearing = _wallBearing - PI/2.; < } < else < { < Syslog::write("WaypointWallEscape::The wall is to our left, so turn right."); < _bearing = _wallBearing + PI/2.; < } --- > // Turn right until perpendicular to the estimated wall bearing. > _bearing = _wallBearing + PI/2.; Index: auv/altex/onboard/LayeredControl/WaypointWallEscape.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/Attic/WaypointWallEscape.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.3.2.1 diff -r1.1.2.3 -r1.1.2.3.2.1 52c52,53 < DynamicControlIF *_dynamicControlIF; --- > // DynamicControlIF *_dynamicControlIF; > GncIF *_gncIF; Index: auv/altex/onboard/LayeredControl/WaypointWallLog.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/WaypointWallLog.cc,v retrieving revision 1.3.2.3 retrieving revision 1.3.2.2 diff -r1.3.2.3 -r1.3.2.2 21c21 < $Id: WaypointWallLog.cc,v 1.3.2.3 2016/04/16 00:48:46 rob Exp $ --- > $Id: WaypointWallLog.cc,v 1.3.2.2 2016/02/23 21:28:41 rob Exp $ 57,58c57 < addField( (_psiWall_B = new DoubleData("wpw.psiWall_B")) ); < addField( (_yInterWall_B = new DoubleData("wpw.yInterWall_B")) ); --- > 80d78 < 84,86d81 < < delete _psiWall_B; < delete _yInterWall_B; 106d100 < 110,113d103 < < _psiWall_B ->setValue( waypointWall->_psiWall_B ); < _yInterWall_B ->setValue( waypointWall->_yInterWall_B ); < Index: auv/altex/onboard/LayeredControl/WaypointWallLog.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/WaypointWallLog.h,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.2 diff -r1.2.2.3 -r1.2.2.2 21c21 < $Id: WaypointWallLog.h,v 1.2.2.3 2016/04/16 00:48:46 rob Exp $ --- > $Id: WaypointWallLog.h,v 1.2.2.2 2016/02/23 21:28:41 rob Exp $ 70,73d69 < < DoubleData *_psiWall_B; < DoubleData *_yInterWall_B; < Index: auv/altex/onboard/LayeredControl/_layeredControl.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/_layeredControl.cc,v retrieving revision 1.3 retrieving revision 1.3.10.2 diff -r1.3 -r1.3.10.2 100c100 < layeredControl->initialize(normalPlanFile, abortPlanFile); --- > layeredControl->initialize(normalPlanFile, abortPlanFile,NULL); 102c102 < layeredControl->run(); --- > //layeredControl->run(); Index: auv/altex/onboard/LayeredControl/missionPlan.l =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/missionPlan.l,v retrieving revision 1.3 retrieving revision 1.3.10.2 diff -r1.3 -r1.3.10.2 15c15 < int yywrap() --- > int mp_wrap() 55c55 < [a-zA-Z0-9_\.\-]* { yylval.string = strdup(yytext); return Word; } --- > [a-zA-Z0-9_\.\-]* { mp_lval.string = strdup(mp_text); return Word; } 62c62 < . { return yytext[0]; } --- > . { return mp_text[0]; } Index: auv/altex/onboard/LayeredControl/missionPlan.y =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/LayeredControl/missionPlan.y,v retrieving revision 1.4 retrieving revision 1.4.10.1 diff -r1.4 -r1.4.10.1 6a7 > #include "mpdefs.h" Index: auv/altex/onboard/Navigation/DepthSensor.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/DepthSensor.cc,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -r1.5 -r1.5.4.1 44c44 < printf("DepthSensor::Initializing\n"); --- > printf("DepthSensor::Initializing\n"); Index: auv/altex/onboard/Navigation/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/Makefile,v retrieving revision 1.24 retrieving revision 1.24.4.1 diff -r1.24 -r1.24.4.1 14c14 < # $Header: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/Makefile,v 1.24 2013/10/31 21:09:49 rob Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/Makefile,v 1.24.4.1 2016/04/14 22:50:05 headley Exp $ 47a48 > -I../gnc \ 49c50 < -I../gps \ --- > -I../gps \ 52,53c53,55 < -I/usr/local/src/gctpc/source \ < -I./jerome --- > -I/usr/local/src/gctpc/source \ > -I./jerome > 97c99,100 < jerome/jerome_standalone --- > jerome/jerome_standalone \ > navigation.lib 109a113,115 > navigation.lib: $(OBJS) > $(AR) navigation.lib +- $(OBJS) > Index: auv/altex/onboard/Navigation/Multibeam.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/Multibeam.cc,v retrieving revision 1.8.2.4 retrieving revision 1.8.2.4.2.1 diff -r1.8.2.4 -r1.8.2.4.2.1 475,533c475,542 < Boolean validFwd[1]; < _deltatIF->get(DeltaTIF::Side, &_data); < < sampleTime->seconds = _data.update_time.seconds; < sampleTime->nanoSeconds = _data.update_time.nanoSeconds; < // < // In this NavSensor, "valid" means it has new data. < // < if( _data.update_time.seconds == _lastSampleTime.seconds && < _data.update_time.nanoSeconds == _lastSampleTime.nanoSeconds) < { < _nNoResponseAft++; < *valid = False; < } < else < { < _lastSampleTime.seconds = _data.update_time.seconds; < _lastSampleTime.nanoSeconds = _data.update_time.nanoSeconds; < < _nNoResponseAft = 0; < *valid = True; < < _rangeEng = _deltatIF->range(DeltaTIF::Side); < } < if( _useFwd ) < { < _deltatIF->get(DeltaTIF::Fwd, &_dataFwd); < < // < // In this NavSensor, "valid" means it has new data. < // < if( _dataFwd.update_time.seconds == _lastSampleTimeFwd.seconds && < _dataFwd.update_time.nanoSeconds == _lastSampleTimeFwd.nanoSeconds) < { < _nNoResponseFwd++; < *validFwd = False; < } < else < { < _lastSampleTimeFwd.seconds = _dataFwd.update_time.seconds; < _lastSampleTimeFwd.nanoSeconds = _dataFwd.update_time.nanoSeconds; < < _nNoResponseFwd = 0; < *validFwd = True; < *valid = True; < } < } < // < // For now, we'll hardcode nBad non-responses to mean the instrument is < // off-line. At some future time this may be replaced by having the call < // _deltatIF->get(DeltaTIF::Aft, &_data); above return a status, so that < // the driver then can decide if the beamformer or instrument or both are < // hosed. < // < const int nBad = 100; < if( _nNoResponseAft > nBad || _nNoResponseFwd > nBad ) < return DeviceIF::Error; < else < return DeviceIF::Ok; --- > Boolean debug=False; > > Boolean validFwd[1]; > _deltatIF->get(DeltaTIF::Side, &_data); > > sampleTime->seconds = _data.update_time.seconds; > sampleTime->nanoSeconds = _data.update_time.nanoSeconds; > // > // In this NavSensor, "valid" means it has new data. > // > // dprintf("Multibeam::readTaskIF - update[%ld/%ld] lastSample[%ld/%ld]\n",_data.update_time.seconds,_data.update_time.nanoSeconds,_lastSampleTime.seconds,_lastSampleTime.nanoSeconds); > if( _data.update_time.seconds == _lastSampleTime.seconds && > _data.update_time.nanoSeconds == _lastSampleTime.nanoSeconds) > { > _nNoResponseAft++; > *valid = False; > // dprintf("Multibeam::readTaskIF - failed 1\n"); > } > else > { > _lastSampleTime.seconds = _data.update_time.seconds; > _lastSampleTime.nanoSeconds = _data.update_time.nanoSeconds; > > _nNoResponseAft = 0; > *valid = True; > > _rangeEng = _deltatIF->range(DeltaTIF::Side); > // dprintf("Multibeam::readTaskIF - valid 1\n"); > > } > if( _useFwd ) > { > _deltatIF->get(DeltaTIF::Fwd, &_dataFwd); > > // > // In this NavSensor, "valid" means it has new data. > // > if( _dataFwd.update_time.seconds == _lastSampleTimeFwd.seconds && > _dataFwd.update_time.nanoSeconds == _lastSampleTimeFwd.nanoSeconds) > { > _nNoResponseFwd++; > *validFwd = False; > // dprintf("Multibeam::readTaskIF - failed 2\n"); > > } > else > { > _lastSampleTimeFwd.seconds = _dataFwd.update_time.seconds; > _lastSampleTimeFwd.nanoSeconds = _dataFwd.update_time.nanoSeconds; > > _nNoResponseFwd = 0; > *validFwd = True; > *valid = True; > // dprintf("Multibeam::readTaskIF - valid 2\n"); > } > } > // > // For now, we'll hardcode nBad non-responses to mean the instrument is > // off-line. At some future time this may be replaced by having the call > // _deltatIF->get(DeltaTIF::Aft, &_data); above return a status, so that > // the driver then can decide if the beamformer or instrument or both are > // hosed. > // > const int nBad = 100; > if( _nNoResponseAft > nBad || _nNoResponseFwd > nBad ) > return DeviceIF::Error; > else > return DeviceIF::Ok; Index: auv/altex/onboard/Navigation/NavSensor.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/NavSensor.cc,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -r1.2 -r1.2.10.1 4c4 < --- > #include "Syslog.h" 28a29 > // Boolean debug=True; 32a34 > // dprintf("NavSensor::connect - [%s] OK taskIF[%x] to[%d]\n",name(),_taskIF,timeout); Index: auv/altex/onboard/Navigation/Navigation.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/Navigation.cc,v retrieving revision 1.103.2.10 retrieving revision 1.103.2.10.2.3 diff -r1.103.2.10 -r1.103.2.10.2.3 1d0 < #include 2a2 > 13a14,15 > #include > 30a33,40 > Navigation::Navigation() > : _parent(NULL) > { > Boolean debug = True; > dprintf("Navigation default ctor"); > _quitFlag=False; > } > 32c42 < : PeriodicTask("navigation") --- > :_parent(NULL) 34c44,46 < Boolean debug = False; --- > Boolean debug = True; > > dprintf("New Navigation component ctor"); 36c48 < dprintf("New Navigation component constructor"); --- > _quitFlag=False; 206,224c218,237 < #ifdef FASTTIME < // check whether FastTime enabled < // [could cache the value, instead of checking environment each time] < char *fast_time_en=getenv(FAST_TIME_ENV); < < if (fast_time_en && (strcmp(fast_time_en,FAST_TIME_EN)==0) ) < { < Syslog::write("Navigation: Setting simulator callback"); < // For simualtion purposes, Navigation will be triggered by < // a NewOutput event from Simulator rather than a periodic timer < // < SimulatorIF *simulator = new SimulatorIF(SimulatorIFServerName); < < _eventService->subscribe(simulator, SimulatorIF::NewOutput, < (EventService::Callback )Navigation::callback); < } < else < #endif < addPeriodicCallback(millisec, (CallbackMethod )Navigation::callback); --- > //// changed for GNC [klh] callbacks not needed > //#ifdef FASTTIME > // // check whether FastTime enabled > // // [could cache the value, instead of checking environment each time] > // char *fast_time_en=getenv(FAST_TIME_ENV); > // > // if (fast_time_en && (strcmp(fast_time_en,FAST_TIME_EN)==0) ) > // { > // Syslog::write("Navigation: Setting simulator callback"); > // // For simualtion purposes, Navigation will be triggered by > // // a NewOutput event from Simulator rather than a periodic timer > // // > // SimulatorIF *simulator = new SimulatorIF(SimulatorIFServerName); > // > // _eventService->subscribe(simulator, SimulatorIF::NewOutput, > // (EventService::Callback )Navigation::callback); > // } > // else > //#endif > // addPeriodicCallback(millisec, (CallbackMethod )Navigation::callback); 351a365,387 > GncParentIF * Navigation::getParent() > { > return _parent; > } > > void Navigation::setParent(GncParentIF *parent) > { > _parent=parent; > } > > void Navigation::trigger(EventCode event){ > Boolean debug=True; > if (_parent) { > dprintf("Navigation::trigger - triggering event[%d] parent[%x]\n",event,_parent); > _parent->trigger(this,event); > }else{ > dprintf("Navigation::trigger - NULL parent\n"); > } > } > > > > 401c437,438 < else --- > // [klh] removed GNC > // else 403c440,441 < PeriodicTask::startSampling(); --- > // [klh] removed GNC > // PeriodicTask::startSampling(); 547a586,587 > Boolean debug=True; > // dprintf("Inside Navigation::callback"); 656a697 > Boolean debug = False; 697a739,741 > // > > dprintf("Navigation::processSensorData - valid depth [%lf]\n",_state.position.z); 700c744,745 < // Estimate from previous? --- > dprintf("Navigation::processSensorData - invalid depth!!!\n"); > // Estimate from previous? 761c806 < if( _echoSounder->valid() && _dvl->valid() && --- > if( _echoSounder->valid() && _dvl->valid() && 971,972c1016,1018 < } < else if( _multibeam->failed() ) _multibeamFailed = True; --- > }else if( _multibeam->failed() ){ > _multibeamFailed = True; > } 1381c1427,1432 < triggerEvent(NavigationIF::NewOutput); --- > // [klh] removed GNC > // original code > //triggerEvent(NavigationIF::NewOutput); > > // new GNC trigger > // trigger(NavigationIF::NewOutput); 1459,1470c1510,1524 < LayeredControlIF *layeredControl; < < try { < LayeredControlIF *layeredControl = < new LayeredControlIF("layeredControl"); < if (layeredControl) { < if (!layeredControl->abortingMission()) { < layeredControl->abortMission(); < Syslog::write("Navigation - aborting mission\n"); < } < delete layeredControl; < } --- > Boolean debug=True; > LayeredControlIF *layeredControl; > > try { > LayeredControlIF *layeredControl = > new LayeredControlIF("layeredControl"); > if (layeredControl) { > if (!layeredControl->abortingMission()) { > dprintf("Navigation::iniateAbort - notifying layered control\n"); > layeredControl->abortMission(); > Syslog::write("Navigation - aborting mission\n"); > } > delete layeredControl; > } > setAbortFlag(True); 1473c1527 < Syslog::write("Navigation : couldn't abort mission, exiting\n"); --- > Syslog::write("Navigation : couldn't abort mission, exiting\n"); 1475,1477c1529,1544 < } < // Just exit. Should really request abort from Supervisor/LayeredControl? < //exit(1); --- > } > // Just exit. Should really request abort from Supervisor/LayeredControl? > //exit(1); > } > > /////////////////////////////////////////////////////////////////// > // Task name > const char *Navigation::name() { > return _name; > } > void Navigation::run() > {} > > void Navigation::setAbortFlag(Boolean abort) > { > _quitFlag=abort; 1478a1546,1564 > > Boolean Navigation::abortFlag() > { > return _quitFlag; > } > void Navigation::notifyEvent(EventCode event) > { > Boolean debug = False; > // _eventService->subscribe(simulator, SimulatorIF::NewOutput, > // (EventService::Callback )Navigation::callback); > > dprintf("Navigation::notifyEvent - event[%d]\n",event); > // Navigation "NewOutput" event > if (event==SimulatorIF::NewOutput){ > dprintf("Navigation::notifyEvent - SimulatorIF::NewOutput\n"); > callback(); > } > } > Index: auv/altex/onboard/Navigation/Navigation.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/Navigation.h,v retrieving revision 1.39.2.4 retrieving revision 1.39.2.4.2.3 diff -r1.39.2.4 -r1.39.2.4.2.3 6a7 > #include "GncParentIF.h" 24a26,27 > // [klh] added GNC > #include "EventService.h" 83c86,87 < class Navigation : public PeriodicTask { --- > class Navigation { > // class Navigation : public PeriodicTask { 85c89,90 < friend class NavigationLog; --- > friend class NavigationLog; > friend class Gnc; 89c94,95 < Navigation(int millisec); --- > Navigation(); > Navigation(int millisec); 91c97 < ~Navigation(); --- > virtual ~Navigation(); 96c102,104 < --- > void run(); > void trigger(EventCode event); > GncParentIF *getParent(); 97a106,112 > GncParentIF *_parent; > > // added for GNC [klh] > void notifyEvent(EventCode event); > Boolean _quitFlag; > void setAbortFlag(Boolean abort); > Boolean abortFlag(); 98a114,115 > void setParent(GncParentIF *parent); > 244a262,268 > // adding for separation from PeriodicTask > const char *_name; > const char *name(); > /////////////////////////////////////////////////////////////////// > // EventService object > EventService *_eventService; > Index: auv/altex/onboard/Navigation/NavigationServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/NavigationServer.cc,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -r1.10 -r1.10.4.1 208,213c208,210 < char *program = "navigation"; < char errorBuf[256]; < < pid_t pid; < < switch ((pid = fork())) { --- > // Let GNC start navigation driver > Boolean debug = True; > dprintf("NavigationServer - letting Gnc start navigation\n"); 215,231c212,235 < case 0: < // In child < // Execute server program < execlp(program, program, 0); < < sprintf(errorBuf, < "Task::spawnServer() - execlp() of \"%s\" failed", program); < < perror(errorBuf); < < break; < < case -1: < perror("Task::spawnServer() - fork() failed"); < return -1; < } < --- > // char *program = "navigation"; > // char errorBuf[256]; > // > // pid_t pid; > // > // switch ((pid = fork())) { > // > // case 0: > // // In child > // // Execute server program > // execlp(program, program, 0); > // > // sprintf(errorBuf, > // "Task::spawnServer() - execlp() of \"%s\" failed", program); > // > // perror(errorBuf); > // > // break; > // > // case -1: > // perror("Task::spawnServer() - fork() failed"); > // return -1; > // } > // Index: auv/altex/onboard/Navigation/_navigation.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Navigation/_navigation.cc,v retrieving revision 1.1 retrieving revision 1.1.10.2 diff -r1.1 -r1.1.10.2 15a16 > 19a21 > #include "GncParentIF.h" 23a26 > Index: auv/altex/onboard/Simulator/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/Makefile,v retrieving revision 1.46.2.5 retrieving revision 1.46.2.5.2.1 diff -r1.46.2.5 -r1.46.2.5.2.1 14c14 < # $Header: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/Makefile,v 1.46.2.5 2015/10/23 15:41:22 rob Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/Makefile,v 1.46.2.5.2.1 2016/04/14 22:50:05 headley Exp $ 120c120 < simCarl simCathx --- > simCarl simCathx simulator.lib 149a150,152 > simulator.lib: $(SIMOBJS) > $(AR) simulator.lib +- $(SIMOBJS) +- ../bluefinBatt/BluefinBattLog.o > Index: auv/altex/onboard/Simulator/SimulatedCarl.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/Attic/SimulatedCarl.cc,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.1 diff -r1.1.2.2 -r1.1.2.1 90,94d89 < DeviceIF::Status SimulatedCarl::auto_iris(float sensor_voltage) < { < return DeviceIF::Ok; < } < Index: auv/altex/onboard/Simulator/SimulatedCarl.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/Attic/SimulatedCarl.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.1 diff -r1.1.2.2 -r1.1.2.1 75d74 < virtual DeviceIF::Status auto_iris(float sensor_voltage); Index: auv/altex/onboard/Simulator/SimulatedDeltaT.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/SimulatedDeltaT.cc,v retrieving revision 1.12.2.9 retrieving revision 1.12.2.8 diff -r1.12.2.9 -r1.12.2.8 231,233c231 < //_noReturnTime = 5220E3; //Start of acute approach; second lap 18v2Ed3. < //_noReturnTime = 5260E3; //End of acute appr; veh lined up;scnd lap 18v2Ed3. < //_noReturnTime = 4100E3; --- > //_noReturnTime = 4100E3; 235c233,234 < //_inoperativeTime = 4200E3; --- > _noReturnDuration = 60E3; > //_inoperativeTime = 4200E3; 237d235 < _noReturnDuration = 60E3; Index: auv/altex/onboard/Simulator/SimulatedDepthSensor.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/SimulatedDepthSensor.cc,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.1.2.1 diff -r1.7.2.1 -r1.7.2.1.2.1 126c126 < --- > 151c151 < dprintf("SimulatedDepthSensor::range =%.2f\n", *value); --- > dprintf("SimulatedDepthSensor::range [%.2f] t[%.2lf/%.2lf]\n", *value,_simulator->simTime(),glitchTime); Index: auv/altex/onboard/Simulator/Simulator.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/Simulator.cc,v retrieving revision 1.50.2.19 retrieving revision 1.50.2.18.2.2 diff -r1.50.2.19 -r1.50.2.18.2.2 469d468 < int numBranchNodes, numLeafNodes; 484,485d482 < numBranchNodes = _map.GetNumBranchNodes(); < numLeafNodes = _map.GetNumLeafNodes(); 491,493d487 < Syslog::write("Simulator::Octree number of branch nodes = %11d.", numBranchNodes); < Syslog::write("Simulator::Octree number of leaf nodes = %11d.", numLeafNodes); < Syslog::write("Simulator::Octree size in RAM >= %11d bytes.", _map.GetTreeSize() ); 559c553 < printf("Simulator: Got here!\n"); --- > printf("Simulator::command - first loop init\n"); 1400c1394 < $Id: Simulator.cc,v 1.50.2.19 2016/08/22 20:22:53 rob Exp $ --- > $Id: Simulator.cc,v 1.50.2.18.2.2 2016/05/19 18:28:57 headley Exp $ 1557a1552,1553 > }else{ > dprintf("Event not from layered_control[%x] : ti[%x]", _layeredControl, taskInterface); 1561a1558,1571 > > void Simulator::notifyEvent(long levent) > { > Boolean debug = True; > EventCode event=(EventCode)levent; > dprintf("Simulator::notifyEvent - event[%d]\n",event); > // LayeredControlIF "MissionStarted" event > if (event==LayeredControlIF::MissionStarted){ > dprintf("Simulator::notifyEvent - LayeredControlIF::MissionStarted\n"); > missionStatusCallback(_layeredControl,event); > } > } > > Index: auv/altex/onboard/Simulator/Simulator.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/Simulator.h,v retrieving revision 1.28.2.9 retrieving revision 1.28.2.9.2.1 diff -r1.28.2.9 -r1.28.2.9.2.1 39d38 < 41a41 > // friend class Gnc; 59a60,63 > > // added for GNC [klh] > virtual void notifyEvent(long levent); > 114d117 < 171c174 < --- > Index: auv/altex/onboard/Simulator/SimulatorServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/SimulatorServer.cc,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -r1.2 -r1.2.10.1 18a19 > #include "Syslog.h" 177,202c178,207 < char *program = "simulator"; < char errorBuf[256]; < char buf[10]; < < pid_t pid; < < switch ((pid = fork())) { < < case 0: < // In child < // Execute server program < < execlp(program, program, 0); < < sprintf(errorBuf, < "SimulatorServer::spawnAuxTasks() - execlp() of \"%s\" failed", < program); < < perror(errorBuf); < < break; < < case -1: < perror("SimulatorServer::spawnAuxTasks() - fork() failed"); < return -1; < } --- > // Let GNC start simulator driver > Boolean debug = True; > dprintf("SimulatorServer - letting Gnc start simulator\n"); > > // char *program = "simulator"; > // char errorBuf[256]; > // char buf[10]; > // > // pid_t pid; > // > // switch ((pid = fork())) { > // > // case 0: > // // In child > // // Execute server program > // > // execlp(program, program, 0); > // > // sprintf(errorBuf, > // "SimulatorServer::spawnAuxTasks() - execlp() of \"%s\" failed", > // program); > // > // perror(errorBuf); > // > // break; > // > // case -1: > // perror("SimulatorServer::spawnAuxTasks() - fork() failed"); > // return -1; > // } Index: auv/altex/onboard/Simulator/_simulator.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/_simulator.cc,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -r1.3 -r1.3.4.1 36a37,39 > catch (Exception e) { > Syslog::write("simulator - caught exception [%s]\n",e.msg); > } Index: auv/altex/onboard/Simulator/OctreeC++Qnx/Octree.hpp =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/OctreeC++Qnx/Octree.hpp,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 164,168c164 < < int GetNumBranchNodes(void) const { return numBranchNodes; } < int GetNumLeafNodes(void) const { return numLeafNodes; } < int GetTreeSize(void) const { return treeSize; } < --- > 211,213c207 < < int numBranchNodes, numLeafNodes, treeSize; < --- > 227,229c221,222 < //bool LoadFromFile(FILE* loadFile); < bool LoadFromFile(FILE* loadFile, int& numBranchNodes , int& numLeafNodes); < --- > bool LoadFromFile(FILE* loadFile); > Index: auv/altex/onboard/Simulator/OctreeC++Qnx/Octree.tcc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/OctreeC++Qnx/Octree.tcc,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 694,700c694 < //returnValue = returnValue & OctreeRoot->LoadFromFile(loadFile); < //David's new code 12 July 2016 < numBranchNodes = 0; < numLeafNodes = 0; < returnValue = OctreeRoot->LoadFromFile(loadFile, numBranchNodes, numLeafNodes); < cout << "Num Branch Nodes: " << numBranchNodes << "\tNum Leaf Nodes: " << numLeafNodes << "\n"; < treeSize = numBranchNodes*(9*sizeof(int*) + sizeof(bool)) + numLeafNodes * (sizeof(int*) + sizeof(bool)); --- > returnValue = returnValue & OctreeRoot->LoadFromFile(loadFile); Index: auv/altex/onboard/Simulator/OctreeC++Qnx/OctreeNode.tcc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Simulator/OctreeC++Qnx/OctreeNode.tcc,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 169,172c169,170 < //LoadFromFile(FILE* loadFile) { < //David's new code 12 July 2016 < LoadFromFile(FILE* loadFile, int& numBranchNodes, int& numLeafNodes) { < //first the value --- > LoadFromFile(FILE* loadFile) { > //first the value 197c195 < returnValue &= children[index]->LoadFromFile(loadFile, numBranchNodes, numLeafNodes); --- > returnValue = returnValue & children[index]->LoadFromFile(loadFile); 199,203d196 < numBranchNodes += 1; < } < else < { < numLeafNodes += 1; Index: auv/altex/onboard/Supervisor/Supervisor.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Supervisor/Supervisor.cc,v retrieving revision 1.67.2.14 retrieving revision 1.67.2.14.2.3 diff -r1.67.2.14 -r1.67.2.14.2.3 199,200d198 < //sleep(5); < 205c203,212 < --- > > const char *simarg=(_fastSim ? " -fastsim" : ""); > sprintf(args, "-plan %s -abort %s%s", _planFileName,_abortFileName,simarg); > Syslog::write("starting GncServer: %s %s", GncName, args); > > if (createTask(GncName, args, False) == -1) { > Syslog::write("Couldn't start " GncName); > return -1; > } > Index: auv/altex/onboard/Supervisor/TaskNames.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Supervisor/TaskNames.h,v retrieving revision 1.24.2.1 retrieving revision 1.24.2.1.2.2 diff -r1.24.2.1 -r1.24.2.1.2.2 37a38,39 > //#define GncServerName "gncIFServer" > #define GncName "gncServer" Index: auv/altex/onboard/SystemInterfaces/SystemInterfaces.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/SystemInterfaces/SystemInterfaces.cc,v retrieving revision 1.2 retrieving revision 1.2.10.2 diff -r1.2 -r1.2.10.2 19a20 > #include "GncIF.h" 30,32c31,36 < _navigation = new NavigationIF("navigation"); < addTask(_navigation); < --- > _navigation = new NavigationIF("navigation"); > addTask(_navigation); > > _gnc = new GncIF("gnc"); > addTask(_gnc); > Index: auv/altex/onboard/SystemInterfaces/SystemInterfaces.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/SystemInterfaces/SystemInterfaces.h,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -r1.2 -r1.2.10.1 24a25 > class GncIF; 74a76,82 > /////////////////////////////////////////////////////////////////// > // Return pointer to Navigation > const GncIF *gnc() { > return _gnc; > } > > 97c105,106 < NavigationIF *_navigation; --- > NavigationIF *_navigation; > GncIF *_gnc; Index: auv/altex/onboard/bluefinBatt/BluefinBattServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/bluefinBatt/BluefinBattServer.cc,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -r1.2 -r1.2.4.1 41,42c41,42 < data->state = _output->data[b].state; < data->fault = _output->data[b].fault; --- > data->state = (BluefinBatteryIF::BatteryState)_output->data[b].state; > data->fault = (BluefinBatteryIF::FaultCode)_output->data[b].fault; Index: auv/altex/onboard/camera/Bicam.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/Bicam.h,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -r1.4 -r1.4.4.1 19c19 < /* $Id: Bicam.h,v 1.4 2009/02/11 00:43:19 headley Exp $ */ --- > /* $Id: Bicam.h,v 1.4.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/BicamConsts.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/BicamConsts.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -r1.2 -r1.2.4.1 12c12 < /* $Id: BicamConsts.h,v 1.2 2008/12/12 23:39:17 headley Exp $ */ --- > /* $Id: BicamConsts.h,v 1.2.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/BicamGPS.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/BicamGPS.cc,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -r1.3 -r1.3.4.1 12c12 < /* $Id: BicamGPS.cc,v 1.3 2009/02/11 01:55:46 headley Exp $ */ --- > /* $Id: BicamGPS.cc,v 1.3.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/GPGGA.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/GPGGA.cc,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -r1.5 -r1.5.4.1 14c14 < /* $Id: GPGGA.cc,v 1.5 2009/04/09 23:35:21 rob Exp $ */ --- > /* $Id: GPGGA.cc,v 1.5.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/GPRMC.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/GPRMC.cc,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -r1.4 -r1.4.4.1 17c17 < /* $Id: GPRMC.cc,v 1.4 2009/04/09 23:35:21 rob Exp $ */ --- > /* $Id: GPRMC.cc,v 1.4.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/GWiz.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/GWiz.cc,v retrieving revision 1.12 retrieving revision 1.12.4.1 diff -r1.12 -r1.12.4.1 12c12 < /* $Id: GWiz.cc,v 1.12 2012/04/06 01:13:06 headley Exp $ */ --- > /* $Id: GWiz.cc,v 1.12.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/NMEA.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/NMEA.cc,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -r1.2 -r1.2.4.1 23c23 < /* $Id: NMEA.cc,v 1.2 2009/02/11 00:44:11 headley Exp $ */ --- > /* $Id: NMEA.cc,v 1.2.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/NMEA.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/NMEA.h,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -r1.5 -r1.5.4.1 39c39 < /* $Id: NMEA.h,v 1.5 2009/02/11 01:58:59 headley Exp $ */ --- > /* $Id: NMEA.h,v 1.5.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/ReleaseNotes =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/ReleaseNotes,v retrieving revision 1.13 retrieving revision 1.13.4.1 diff -r1.13 -r1.13.4.1 25c25 < $Id: ReleaseNotes,v 1.13 2012/04/06 00:12:33 headley Exp $ --- > $Id: ReleaseNotes,v 1.13.4.1 2016/05/19 18:28:57 headley Exp $ Index: auv/altex/onboard/camera/Utils.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/Utils.cc,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -r1.2 -r1.2.4.1 19c19 < /* $Id: Utils.cc,v 1.2 2008/12/12 23:36:32 headley Exp $ */ --- > /* $Id: Utils.cc,v 1.2.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/Utils.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/Utils.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -r1.2 -r1.2.4.1 14c14 < /* $Id: Utils.h,v 1.2 2008/12/12 23:36:32 headley Exp $ */ --- > /* $Id: Utils.h,v 1.2.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/XPort.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/XPort.cc,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -r1.5 -r1.5.4.1 13c13 < /* $Id: XPort.cc,v 1.5 2012/04/06 01:13:06 headley Exp $ */ --- > /* $Id: XPort.cc,v 1.5.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/XPort.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/XPort.h,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -r1.6 -r1.6.4.1 23c23 < /* $Id: XPort.h,v 1.6 2012/04/05 23:51:08 headley Exp $ */ --- > /* $Id: XPort.h,v 1.6.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/XPortGPIO.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/XPortGPIO.cc,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -r1.6 -r1.6.4.1 15c15 < /* $Id: XPortGPIO.cc,v 1.6 2012/04/06 01:09:39 headley Exp $ */ --- > /* $Id: XPortGPIO.cc,v 1.6.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/XPortGPIO.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/XPortGPIO.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -r1.2 -r1.2.4.1 18c18 < /* $Id: XPortGPIO.h,v 1.2 2009/04/10 08:45:15 headley Exp $ */ --- > /* $Id: XPortGPIO.h,v 1.2.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/XPortSim.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/XPortSim.cc,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -r1.5 -r1.5.4.1 13c13 < /* $Id: XPortSim.cc,v 1.5 2012/04/06 01:13:06 headley Exp $ */ --- > /* $Id: XPortSim.cc,v 1.5.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/bicamTest.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/bicamTest.cc,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -r1.8 -r1.8.4.1 15c15 < /* $Id: bicamTest.cc,v 1.8 2012/04/06 01:09:13 headley Exp $ */ --- > /* $Id: bicamTest.cc,v 1.8.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/nmeaTest.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/nmeaTest.cc,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -r1.5 -r1.5.4.1 21c21 < /* $Id: nmeaTest.cc,v 1.5 2009/02/11 02:01:18 headley Exp $ */ --- > /* $Id: nmeaTest.cc,v 1.5.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/qnx_port.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/qnx_port.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -r1.2 -r1.2.4.1 15c15 < /* $Id: qnx_port.h,v 1.2 2008/12/11 20:10:43 headley Exp $ */ --- > /* $Id: qnx_port.h,v 1.2.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/xportIO.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/xportIO.cc,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -r1.3 -r1.3.4.1 12c12 < /* $Id: xportIO.cc,v 1.3 2012/04/05 22:42:28 headley Exp $ */ --- > /* $Id: xportIO.cc,v 1.3.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/camera/xportTest.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/camera/xportTest.cc,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -r1.3 -r1.3.4.1 12c12 < /* $Id: xportTest.cc,v 1.3 2012/04/05 22:43:38 headley Exp $ */ --- > /* $Id: xportTest.cc,v 1.3.4.1 2016/05/19 18:28:57 headley Exp $ */ Index: auv/altex/onboard/config/imaging/devices.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/devices.cfg,v retrieving revision 1.1.2.1 retrieving revision 1.1.4.1 diff -r1.1.2.1 -r1.1.4.1 6c6 < dropWeightServer -dev /dev/ser14 --- > dropWeightServer -dev /dev/ser7 10d9 < newTailConeServer -dev /dev/ser4 12a12 > newTailConeServer -dev /dev/ser9 16,20c16,17 < #trigger -serial /dev/ser2,115200,8,n,1 < kearfottServer -dev /dev/ser5 < kearfottDvlServer < < --- > kearfottServer -dev /dev/ser13 > #kearfottDvlServer 22d18 < #/dev/ser9 monitors DVL Output 26c22 < parosciServer -dev /dev/ser9 --- > parosciServer -dev /dev/ser3 37,39c33 < #fastcatServer -dev tcp:xport-battery:10001 < #fastcatServer -dev /dev/ser8 < seabird25pServer -n seabird25p -dev udp:134.89.32.55:54125 --- > fastcatServer -dev tcp:ctd-xport:10001 42a37 > bluefinBattDriver -dev /dev/ser10 46c41 < #reson6046Server --- > reson6046Server 48c43 < # EdgetechFSDW --- > gpsServer -r ashtech -dev /dev/ser14 50,51c45,49 < # edgetechFSDWServer < --- > # AuvTimeSync Server > # Don't forget to start the companion driver process on the PLC > # as noted in source code ats.cc (ats.exe -h 134.89.32.35 -p 9009 -r 10). > # The order in which the two processes are started does not matter. > # Have the mvc Server/Driver listen on port 9009. 53,81c51 < #gpsServer -r ashtech -dev /dev/ser8 < #changed 2/4/2014 hjt ntp server now broadcasts GPS data to udp port. < #port 5050 is used by D Allen B < #port 5051 is used by mapper2 < gpsServer -r ashtech -dev udp:localhost:5051 < #iridium beacon traffic can be monitored on /dev/ser13 2400,8,n,1 < #benthos modem fun < benthosServer -dev /dev/ser6 < #atsServer 9009 < #ecoflDriver -dev /dev/ser14 < #newBattDriver -dev tcp:134.89.32.122:10003 < newBattDriver -dev tcp:134.89.32.123:10003 < < carlServer < < #adam 6017 driver for eH and light scattering sensor < #adam6017Server -dev tcp:134.89.32.151:502 < #m3dmgx1 -dev /dev/ser6 < < ##terrain aiding stuff < #terrainAidServer < < #sonardyneServer -dev /dev/ser3 < #cameraServer -dev tcp:134.89.32.42:10001 < #echoSounderDriver -dev tcp:134.89.32.127:4040 < #only run the dvl driver, not the server, because it will conflict with the < #kearfott's dvl server which is run above. < #dvlSideServer -dev /dev/ser9 < #delta_tServer --- > # atsServer 9009 Index: auv/altex/onboard/config/imaging/doradoTailCone.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/doradoTailCone.cfg,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 36,38c36,38 < rudderHoldCurrent = 10; // delay units < rudderRunCurrent = 150; //use to be 118 hjt Oct 18 2011 < rudderSpeed = 100; //used to be 100 --- > rudderHoldCurrent = 40; // delay units > rudderRunCurrent = 255; > rudderSpeed = 100; //used to be 180 40c40 < rudderHome = 136; //was 118 --- > rudderHome = 135; //was 118 49,50c49,50 < maxElevatorAngle = 0.174; //0.191; // 15deg was 0.1571; // radians < minElevatorAngle = -0.174; //-0.157; // 9deg was -0.262; // radians --- > maxElevatorAngle = 0.191; // 15deg was 0.1571; // radians > minElevatorAngle = -0.191; // 9deg was -0.262; // radians 52,53c52,53 < elevatorHoldCurrent = 10; < elevatorRunCurrent = 150; //use to be 120 hjt Oct 18 2011 --- > elevatorHoldCurrent = 40; > elevatorRunCurrent = 255; 56c56 < elevatorHome = 128; // changed from 133 --- > elevatorHome = 155; // changed from 133 67c67 < propKp = 160; // Position gain, (10e-4 counts)/(prop rpm)v --- > propKp = 100; // Position gain, (10e-4 counts)/(prop rpm)v 71,72c71,72 < propPWMLimit = 255; < propErrorLimit = 16000; --- > propPWMLimit = 220; > propErrorLimit = 1000; Index: auv/altex/onboard/config/imaging/dvl.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/dvl.cfg,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 38,41d37 < < //select externally triggered pings so we dont interfere with the other < //systems in the vehicle < CX1 100c96 < // Pings per ensemble - don't collect water velocity data!! --- > // Pings per ensemble 102,103c98 < WP0000 < WD000000000 --- > WP0001 Index: auv/altex/onboard/config/imaging/dvlSide.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/dvlSide.cfg,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 38,41d37 < < //select externally triggered pings so we dont interfere with the other < //systems in the vehicle < CX1 86c82 < // Select Ship Coordinates. Do not apply the Pitch/Roll from the tilt --- > // Select Instrument Coordinates. Do not apply the Pitch/Roll from the tilt 100c96 < // Pings per ensemble - don't collect water velocity data!! --- > // Pings per ensemble 102,103c98 < WP0000 < WD000000000 --- > WP0001 Index: auv/altex/onboard/config/imaging/parosci.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/parosci.cfg,v retrieving revision 1.1.2.1 retrieving revision 1.1 diff -r1.1.2.1 -r1.1 6c6 < PR = 134; --- > PR = 30; 11c11 < TempInterval = 134; --- > TempInterval = 10; Index: auv/altex/onboard/config/imaging/simulator.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/simulator.cfg,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.1.2.1 diff -r1.3.2.2 -r1.3.2.1.2.1 1,136c1,136 < //////////////////////////////////////////////////////////////// < // < // PURPOSE: This is an automatically generated data file that < // contains the model parameters for Imaging. < // This file is designed to be read in by the on-board < // simulation as "simulator.cfg". < // AUTHOR: Rob McEwen, Using modelCoef() by Knut Streitlien. < // DATE: 25-Jan-2011 < // < //////////////////////////////////////////////////////////////// < // < // Imaging Parameters, Knut/Matlab; 25-Jan-2011 < // < // Mass Properties: < // < //mass = 1015.587701; // mass, kg. < //length = 5.219700; // length, m. < Ixx = 32.000000; // Ixx, kg-m^2. < Iyy = 1757.802554; // Iyy, kg-m^2. < Izz = 1757.802554; // Izz, kg-m^2. < // < // Added Mass: < // < Yvdot = -970.290157; // Yvdot, kg. < Zwdot = -970.290157; // Zwdot, kg. < Xudot = -26.133175; // Xudot, kg. < Mqdot =-1541.634893; // Mqdot, kg-m^2. < Nrdot =-1541.634893; // Nrdot, kg-m^2. < Kpdot = 0.000000; // Kpdot, kg-m^2. < Kvdot = 0.000000; // Kvdot, kg-m. < Mwdot = 98.390533; // Mwdot, kg-m. < Zqdot = 98.390533; // Zqdot, kg-m. < Nvdot = -98.390533; // Nvdot, kg-m. < Yrdot = -98.390533; // Yrdot, kg-m. < Ypdot = 0.000000; // Ypdot, kg-m. < // < // Stability Derivatives: < // < Kpabp = -0.287619; // Kp|p| , kg-m^2 < Nuv = -821.416574; // Nuv , kg < Nur = -457.014465; // Nur , kg-m < Xvv = -65.220952; // Xvv , kg/m < Xww = -65.220952; // Xww , kg/m < Xvr = 970.290157; // Xvr , kg < Xwq = -970.290157; // Xwq , kg < Xrr = 98.390533; // Xrr , kg-m < Xqq = 98.390533; // Xqq , kg-m < Yuv = -133.344014; // Yuv , kg/m < Yur = 75.425595; // Yur , kg < Nrabr =-2212.743973; // Nr|r| , kg-m^2 < Mqabq =-2212.743973; // Mq|q| , kg-m^2 < Nvabv = 451.779116; // Nv|v| , kg < Ywp = 970.290157; // Ywp , kg-m < Yrabr = 0.000000; // Yr|r| , ? < Yvabv = -854.971671; // Yv|v| , kg/m < Zwabw = -854.971671; // Zw|w| , kg/m < Mwabw = -451.779116; // Mw|w| , kg < Zqabq = 0.000000; // Zq|q| , ? < Muq = -457.014465; // Muq , kg-m < Muw = 821.416574; // Muw , kg < Mpr = 1541.634893; // Mpr , kg-m^2 < Npq =-1541.634893; // Npq , kg-m^2 < Zuq = -75.425595; // Zuq , kg < Zuw = -133.344014; // Zuw , kg/m < Zvp = -970.290157; // Zvp , kg < // < Kvt2 = 0.000000; // ? , ? < // < // Actuator (Tailcone) Parameters: < // < stallAngle = 30.000000; // , Deg. < wideHystRud = 0.000000; // , Deg. < centerHystRud = 0.000000; // , Deg. < wideHystElev = 0.000000; // , Deg. < centerHystElev= 0.000000; // , Deg. < aspectRatio = 4.260000; // , Unitless < finArea = 0.029900; // , m^2 < CDc = 0.723000; // Coef. of Drag , Unitless < dCL = 4.800000; // Coef. of Lift , Unitless < // < // Initial Conditions: < // < initZ = 0.000000; // Initial depth, m < initU = 1.000000; // vel x wrto B , m/s < initV = 0.000000; // vel y wrto B , m/s < initW = 0.000000; // vel z wrto B , m/s < initPsi = 225.000000; // Yaw wrto LV , Deg. < northCurrent = 0.000000; // vel x wrto LV , m/s < eastCurrent = 0.000000; // vel y wrto LV , m/s < // < //Bottom Specification: < // < // depth1 = 25.; // Initial depth, m < // depth2 = 25.; // Second depth, m < // depth3 = 8.; < // depth4 = 13.; < // depth5 = 20.; < // depth6 = 13.; < // depth7 = 20.; < // depth8 = 13.; < // depth9 = 20.; < // depth10 = 20.; < // ydepth1 = -450.; // Init y location, m < // ydepth2 = -390.; // Second y loc, m < // ydepth3 = -312.; < // ydepth4 = -310.; < // ydepth5 = -230.; < // ydepth6 = -220.; < // ydepth7 = -140.; < // ydepth8 = -130.; < // ydepth9 = -50.; < // ydepth10 = 0.; < depth1 = 1500.; // Initial depth, m < depth2 = 1500.; // Second depth, m < depth3 = 1500.; < depth4 = 1500.; < depth5 = 1500.; < depth6 = 1500.; < depth7 = 1500.; < depth8 = 1500.; < depth9 = 1500.; < depth10 = 1500.; < ydepth1 = -450.; // Init y location, m < ydepth2 = -390.; // Second y loc, m < ydepth3 = -312.; < ydepth4 = -310.; < ydepth5 = -230.; < ydepth6 = -220.; < ydepth7 = -140.; < ydepth8 = -130.; < ydepth9 = -50.; < ydepth10 = 0.; < < //mapFileName = site1850_rippleFieldSubSection_UTM_1m.bo; < // < verticalMount = true; --- > //////////////////////////////////////////////////////////////// > // > // PURPOSE: This is an automatically generated data file that > // contains the model parameters for Imaging. > // This file is designed to be read in by the on-board > // simulation as "simulator.cfg". > // AUTHOR: Rob McEwen, Using modelCoef() by Knut Streitlien. > // DATE: 25-Jan-2011 > // > //////////////////////////////////////////////////////////////// > // > // Imaging Parameters, Knut/Matlab; 25-Jan-2011 > // > // Mass Properties: > // > //mass = 1015.587701; // mass, kg. > //length = 5.219700; // length, m. > Ixx = 32.000000; // Ixx, kg-m^2. > Iyy = 1757.802554; // Iyy, kg-m^2. > Izz = 1757.802554; // Izz, kg-m^2. > // > // Added Mass: > // > Yvdot = -970.290157; // Yvdot, kg. > Zwdot = -970.290157; // Zwdot, kg. > Xudot = -26.133175; // Xudot, kg. > Mqdot =-1541.634893; // Mqdot, kg-m^2. > Nrdot =-1541.634893; // Nrdot, kg-m^2. > Kpdot = 0.000000; // Kpdot, kg-m^2. > Kvdot = 0.000000; // Kvdot, kg-m. > Mwdot = 98.390533; // Mwdot, kg-m. > Zqdot = 98.390533; // Zqdot, kg-m. > Nvdot = -98.390533; // Nvdot, kg-m. > Yrdot = -98.390533; // Yrdot, kg-m. > Ypdot = 0.000000; // Ypdot, kg-m. > // > // Stability Derivatives: > // > Kpabp = -0.287619; // Kp|p| , kg-m^2 > Nuv = -821.416574; // Nuv , kg > Nur = -457.014465; // Nur , kg-m > Xvv = -65.220952; // Xvv , kg/m > Xww = -65.220952; // Xww , kg/m > Xvr = 970.290157; // Xvr , kg > Xwq = -970.290157; // Xwq , kg > Xrr = 98.390533; // Xrr , kg-m > Xqq = 98.390533; // Xqq , kg-m > Yuv = -133.344014; // Yuv , kg/m > Yur = 75.425595; // Yur , kg > Nrabr =-2212.743973; // Nr|r| , kg-m^2 > Mqabq =-2212.743973; // Mq|q| , kg-m^2 > Nvabv = 451.779116; // Nv|v| , kg > Ywp = 970.290157; // Ywp , kg-m > Yrabr = 0.000000; // Yr|r| , ? > Yvabv = -854.971671; // Yv|v| , kg/m > Zwabw = -854.971671; // Zw|w| , kg/m > Mwabw = -451.779116; // Mw|w| , kg > Zqabq = 0.000000; // Zq|q| , ? > Muq = -457.014465; // Muq , kg-m > Muw = 821.416574; // Muw , kg > Mpr = 1541.634893; // Mpr , kg-m^2 > Npq =-1541.634893; // Npq , kg-m^2 > Zuq = -75.425595; // Zuq , kg > Zuw = -133.344014; // Zuw , kg/m > Zvp = -970.290157; // Zvp , kg > // > Kvt2 = 0.000000; // ? , ? > // > // Actuator (Tailcone) Parameters: > // > stallAngle = 30.000000; // , Deg. > wideHystRud = 0.000000; // , Deg. > centerHystRud = 0.000000; // , Deg. > wideHystElev = 0.000000; // , Deg. > centerHystElev= 0.000000; // , Deg. > aspectRatio = 4.260000; // , Unitless > finArea = 0.029900; // , m^2 > CDc = 0.723000; // Coef. of Drag , Unitless > dCL = 4.800000; // Coef. of Lift , Unitless > // > // Initial Conditions: > // > initZ = 0.000000; // Initial depth, m > initU = 0.000000; // vel x wrto B , m/s > initV = 0.000000; // vel y wrto B , m/s > initW = 0.000000; // vel z wrto B , m/s > initPsi = 225.000000; // Yaw wrto LV , Deg. > northCurrent = 0.000000; // vel x wrto LV , m/s > eastCurrent = 0.000000; // vel y wrto LV , m/s > // > //Bottom Specification: > // > // depth1 = 25.; // Initial depth, m > // depth2 = 25.; // Second depth, m > // depth3 = 8.; > // depth4 = 13.; > // depth5 = 20.; > // depth6 = 13.; > // depth7 = 20.; > // depth8 = 13.; > // depth9 = 20.; > // depth10 = 20.; > // ydepth1 = -450.; // Init y location, m > // ydepth2 = -390.; // Second y loc, m > // ydepth3 = -312.; > // ydepth4 = -310.; > // ydepth5 = -230.; > // ydepth6 = -220.; > // ydepth7 = -140.; > // ydepth8 = -130.; > // ydepth9 = -50.; > // ydepth10 = 0.; > depth1 = 100.; // Initial depth, m > depth2 = 100.; // Second depth, m > depth3 = 100.; > depth4 = 100.; > depth5 = 100.; > depth6 = 100.; > depth7 = 100.; > depth8 = 100.; > depth9 = 100.; > depth10 = 100.; > ydepth1 = -450.; // Init y location, m > ydepth2 = -390.; // Second y loc, m > ydepth3 = -312.; > ydepth4 = -310.; > ydepth5 = -230.; > ydepth6 = -220.; > ydepth7 = -140.; > ydepth8 = -130.; > ydepth9 = -50.; > ydepth10 = 0.; > > mapFileName = PortugueseLedgeOctree_SomewhatFilled_1m.bin; > // > verticalMount = true; Index: auv/altex/onboard/config/imaging/simulatorTransect.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/Attic/simulatorTransect.cfg,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.1 diff -r1.1.2.2 -r1.1.2.1 1,136c1,136 < //////////////////////////////////////////////////////////////// < // < // PURPOSE: This is an automatically generated data file that < // contains the model parameters for Imaging. < // This file is designed to be read in by the on-board < // simulation as "simulator.cfg". < // AUTHOR: Rob McEwen, Using modelCoef() by Knut Streitlien. < // DATE: 25-Jan-2011 < // < //////////////////////////////////////////////////////////////// < // < // Imaging Parameters, Knut/Matlab; 25-Jan-2011 < // < // Mass Properties: < // < //mass = 1015.587701; // mass, kg. < //length = 5.219700; // length, m. < Ixx = 32.000000; // Ixx, kg-m^2. < Iyy = 1757.802554; // Iyy, kg-m^2. < Izz = 1757.802554; // Izz, kg-m^2. < // < // Added Mass: < // < Yvdot = -970.290157; // Yvdot, kg. < Zwdot = -970.290157; // Zwdot, kg. < Xudot = -26.133175; // Xudot, kg. < Mqdot =-1541.634893; // Mqdot, kg-m^2. < Nrdot =-1541.634893; // Nrdot, kg-m^2. < Kpdot = 0.000000; // Kpdot, kg-m^2. < Kvdot = 0.000000; // Kvdot, kg-m. < Mwdot = 98.390533; // Mwdot, kg-m. < Zqdot = 98.390533; // Zqdot, kg-m. < Nvdot = -98.390533; // Nvdot, kg-m. < Yrdot = -98.390533; // Yrdot, kg-m. < Ypdot = 0.000000; // Ypdot, kg-m. < // < // Stability Derivatives: < // < Kpabp = -0.287619; // Kp|p| , kg-m^2 < Nuv = -821.416574; // Nuv , kg < Nur = -457.014465; // Nur , kg-m < Xvv = -65.220952; // Xvv , kg/m < Xww = -65.220952; // Xww , kg/m < Xvr = 970.290157; // Xvr , kg < Xwq = -970.290157; // Xwq , kg < Xrr = 98.390533; // Xrr , kg-m < Xqq = 98.390533; // Xqq , kg-m < Yuv = -133.344014; // Yuv , kg/m < Yur = 75.425595; // Yur , kg < Nrabr =-2212.743973; // Nr|r| , kg-m^2 < Mqabq =-2212.743973; // Mq|q| , kg-m^2 < Nvabv = 451.779116; // Nv|v| , kg < Ywp = 970.290157; // Ywp , kg-m < Yrabr = 0.000000; // Yr|r| , ? < Yvabv = -854.971671; // Yv|v| , kg/m < Zwabw = -854.971671; // Zw|w| , kg/m < Mwabw = -451.779116; // Mw|w| , kg < Zqabq = 0.000000; // Zq|q| , ? < Muq = -457.014465; // Muq , kg-m < Muw = 821.416574; // Muw , kg < Mpr = 1541.634893; // Mpr , kg-m^2 < Npq =-1541.634893; // Npq , kg-m^2 < Zuq = -75.425595; // Zuq , kg < Zuw = -133.344014; // Zuw , kg/m < Zvp = -970.290157; // Zvp , kg < // < Kvt2 = 0.000000; // ? , ? < // < // Actuator (Tailcone) Parameters: < // < stallAngle = 30.000000; // , Deg. < wideHystRud = 0.000000; // , Deg. < centerHystRud = 0.000000; // , Deg. < wideHystElev = 0.000000; // , Deg. < centerHystElev= 0.000000; // , Deg. < aspectRatio = 4.260000; // , Unitless < finArea = 0.029900; // , m^2 < CDc = 0.723000; // Coef. of Drag , Unitless < dCL = 4.800000; // Coef. of Lift , Unitless < // < // Initial Conditions: < // < initZ = 0.000000; // Initial depth, m < initU = 1.000000; // vel x wrto B , m/s < initV = 0.000000; // vel y wrto B , m/s < initW = 0.000000; // vel z wrto B , m/s < initPsi = 225.000000; // Yaw wrto LV , Deg. < northCurrent = 0.000000; // vel x wrto LV , m/s < eastCurrent = 0.000000; // vel y wrto LV , m/s < // < //Bottom Specification: < // < // depth1 = 25.; // Initial depth, m < // depth2 = 25.; // Second depth, m < // depth3 = 8.; < // depth4 = 13.; < // depth5 = 20.; < // depth6 = 13.; < // depth7 = 20.; < // depth8 = 13.; < // depth9 = 20.; < // depth10 = 20.; < // ydepth1 = -450.; // Init y location, m < // ydepth2 = -390.; // Second y loc, m < // ydepth3 = -312.; < // ydepth4 = -310.; < // ydepth5 = -230.; < // ydepth6 = -220.; < // ydepth7 = -140.; < // ydepth8 = -130.; < // ydepth9 = -50.; < // ydepth10 = 0.; < depth1 = 1500.; // Initial depth, m < depth2 = 1500.; // Second depth, m < depth3 = 1500.; < depth4 = 1500.; < depth5 = 1500.; < depth6 = 1500.; < depth7 = 1500.; < depth8 = 1500.; < depth9 = 1500.; < depth10 = 1500.; < ydepth1 = -450.; // Init y location, m < ydepth2 = -390.; // Second y loc, m < ydepth3 = -312.; < ydepth4 = -310.; < ydepth5 = -230.; < ydepth6 = -220.; < ydepth7 = -140.; < ydepth8 = -130.; < ydepth9 = -50.; < ydepth10 = 0.; < < //mapFileName = site1850_rippleFieldSubSection_UTM_1m.bo; < // < verticalMount = true; --- > //////////////////////////////////////////////////////////////// > // > // PURPOSE: This is an automatically generated data file that > // contains the model parameters for Imaging. > // This file is designed to be read in by the on-board > // simulation as "simulator.cfg". > // AUTHOR: Rob McEwen, Using modelCoef() by Knut Streitlien. > // DATE: 25-Jan-2011 > // > //////////////////////////////////////////////////////////////// > // > // Imaging Parameters, Knut/Matlab; 25-Jan-2011 > // > // Mass Properties: > // > //mass = 1015.587701; // mass, kg. > //length = 5.219700; // length, m. > Ixx = 32.000000; // Ixx, kg-m^2. > Iyy = 1757.802554; // Iyy, kg-m^2. > Izz = 1757.802554; // Izz, kg-m^2. > // > // Added Mass: > // > Yvdot = -970.290157; // Yvdot, kg. > Zwdot = -970.290157; // Zwdot, kg. > Xudot = -26.133175; // Xudot, kg. > Mqdot =-1541.634893; // Mqdot, kg-m^2. > Nrdot =-1541.634893; // Nrdot, kg-m^2. > Kpdot = 0.000000; // Kpdot, kg-m^2. > Kvdot = 0.000000; // Kvdot, kg-m. > Mwdot = 98.390533; // Mwdot, kg-m. > Zqdot = 98.390533; // Zqdot, kg-m. > Nvdot = -98.390533; // Nvdot, kg-m. > Yrdot = -98.390533; // Yrdot, kg-m. > Ypdot = 0.000000; // Ypdot, kg-m. > // > // Stability Derivatives: > // > Kpabp = -0.287619; // Kp|p| , kg-m^2 > Nuv = -821.416574; // Nuv , kg > Nur = -457.014465; // Nur , kg-m > Xvv = -65.220952; // Xvv , kg/m > Xww = -65.220952; // Xww , kg/m > Xvr = 970.290157; // Xvr , kg > Xwq = -970.290157; // Xwq , kg > Xrr = 98.390533; // Xrr , kg-m > Xqq = 98.390533; // Xqq , kg-m > Yuv = -133.344014; // Yuv , kg/m > Yur = 75.425595; // Yur , kg > Nrabr =-2212.743973; // Nr|r| , kg-m^2 > Mqabq =-2212.743973; // Mq|q| , kg-m^2 > Nvabv = 451.779116; // Nv|v| , kg > Ywp = 970.290157; // Ywp , kg-m > Yrabr = 0.000000; // Yr|r| , ? > Yvabv = -854.971671; // Yv|v| , kg/m > Zwabw = -854.971671; // Zw|w| , kg/m > Mwabw = -451.779116; // Mw|w| , kg > Zqabq = 0.000000; // Zq|q| , ? > Muq = -457.014465; // Muq , kg-m > Muw = 821.416574; // Muw , kg > Mpr = 1541.634893; // Mpr , kg-m^2 > Npq =-1541.634893; // Npq , kg-m^2 > Zuq = -75.425595; // Zuq , kg > Zuw = -133.344014; // Zuw , kg/m > Zvp = -970.290157; // Zvp , kg > // > Kvt2 = 0.000000; // ? , ? > // > // Actuator (Tailcone) Parameters: > // > stallAngle = 30.000000; // , Deg. > wideHystRud = 0.000000; // , Deg. > centerHystRud = 0.000000; // , Deg. > wideHystElev = 0.000000; // , Deg. > centerHystElev= 0.000000; // , Deg. > aspectRatio = 4.260000; // , Unitless > finArea = 0.029900; // , m^2 > CDc = 0.723000; // Coef. of Drag , Unitless > dCL = 4.800000; // Coef. of Lift , Unitless > // > // Initial Conditions: > // > initZ = 0.000000; // Initial depth, m > initU = 1.000000; // vel x wrto B , m/s > initV = 0.000000; // vel y wrto B , m/s > initW = 0.000000; // vel z wrto B , m/s > initPsi = 225.000000; // Yaw wrto LV , Deg. > northCurrent = 0.000000; // vel x wrto LV , m/s > eastCurrent = 0.000000; // vel y wrto LV , m/s > // > //Bottom Specification: > // > // depth1 = 25.; // Initial depth, m > // depth2 = 25.; // Second depth, m > // depth3 = 8.; > // depth4 = 13.; > // depth5 = 20.; > // depth6 = 13.; > // depth7 = 20.; > // depth8 = 13.; > // depth9 = 20.; > // depth10 = 20.; > // ydepth1 = -450.; // Init y location, m > // ydepth2 = -390.; // Second y loc, m > // ydepth3 = -312.; > // ydepth4 = -310.; > // ydepth5 = -230.; > // ydepth6 = -220.; > // ydepth7 = -140.; > // ydepth8 = -130.; > // ydepth9 = -50.; > // ydepth10 = 0.; > depth1 = 400.; // Initial depth, m > depth2 = 400.; // Second depth, m > depth3 = 400.; > depth4 = 400.; > depth5 = 400.; > depth6 = 400.; > depth7 = 400.; > depth8 = 400.; > depth9 = 400.; > depth10 = 400.; > ydepth1 = -450.; // Init y location, m > ydepth2 = -390.; // Second y loc, m > ydepth3 = -312.; > ydepth4 = -310.; > ydepth5 = -230.; > ydepth6 = -220.; > ydepth7 = -140.; > ydepth8 = -130.; > ydepth9 = -50.; > ydepth10 = 0.; > > //mapFileName = site1850_rippleFieldSubSection_UTM_1m.bo; > // > verticalMount = true; Index: auv/altex/onboard/config/imaging/terrainAid.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/terrainAid.cfg,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.2.2.1 diff -r1.2.2.3 -r1.2.2.2.2.1 10,12c10,22 < //mapFileName = SoquelCanyonMAUVUTMTopo_NoNan.grd; < //mapFileName = SoquelCanyon/SoquelCanyonTopo3dPointsDEM_1m.txt; < mapFileName = PortugueseLedgeOctree_SomewhatFilled_1m.bin; --- > //mapFileName = SoquelCanyonMAUVUTMTopo_NoNan.grd; (before client/server) > //mapFileName = SoquelCanyon/SoquelCanyonTopo3dPointsDEM_1m.txt; > //mapFileName = SoquelCanyon/SoquelCanyonMAUVUTMTopo_061709cut.grd; > //mapFileName = SoquelCanyon/SoquelCanyonMAUVUTMTopo_061709cut_Shift30m.grd; > // On the Linux machine: export TRN_MAPFILES ="$AUV/config/imaging/" > // On the Windows/Cygwin machine: export TRN_MAPFILES ="$AUV/G2TerrainNav/Maps/" > mapFileName = PortugueseLedgeOctree_SomewhatFilled_1m.bin; > map_type = 2; > //terrainNavServer = 134.89.32.25; //trn.shore.mbari.org > terrainNavServer = 134.89.11.3; //sandpiper-vm2 > terrainNavPort = 27027; //Default. > // On the Linux machine: export TRN_DATAFILES="$AUV/config/imaging/" > // On the Windows/Cygwin machine: export TRN_MAPFILES ="$AUV/G2TerrainNav/" 16d25 < map_type = 2; 22c31,32 < --- > useModifiedWeighting = true; //if true, filter used Shandor's modified weighting > //to prevent overconfidence in flat terrain. 25d34 < useModifiedWeighting = true; 36,37d44 < < // Use a server for the TerrainNav (comment-out to use local TerrainNav code 39,40c46 < terrainNavServer = 134.89.32.25; < terrainNavPort = 27027; --- > useIDTData = false; Index: auv/altex/onboard/config/imaging/vehicle.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/vehicle.cfg,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.1.2.1 diff -r1.2.2.2 -r1.2.2.1.2.1 16a17 > // tau = .5; //seconds; Command generator time const. 19a21,22 > // kiHeading = 0.017; //1/sec; Integral gain > kiHeading = 0.000; //1/sec; Integral gain ODY 21d23 < kiHeading = 0.017; //1/sec; Integral gain 22a25 > kiwp = 0.003; //rad/sec/meter; crs trk intgrl gain 24a28,29 > maxXteOff = 15.; //m; cross-track int zeroed if error larger > maxXteInt = 20.; //Degrees; max cross-track trim 28,30c33,36 < kpPitch = 0.5; //unitless; Position gain < kdPitch = 1.30; //was 1.3; //sec; Rate gain < // kiPitch = .015; //1/sec; Integral gain --- > kpPitch = 0.65; //unitless; Position gain > kdPitch = 1.30; //sec; Rate gain > // kpPitch = 0.75; //unitless; Position gain > // kdPitch = 1.1; //sec; Rate gain 34c40 < elevLimit = 15.; //degrees, max tailcone deflection --- > elevLimit = 11.; //degrees, max tailcone deflection 37,39d42 < // kpDepth = 0.014; //rad/meter; Dive loop pos'n gain ODY < // kiDepth = 0.0006; //rad/sec/meter; Dive loop int. gain < // kdDepth = 0.0; //rad/sec/meter; Dive loop deriv. gain 41,42c44,47 < kiDepth = 0.0008; //rad/sec/meter; Dive loop int. gain < kiDepthOff = 2.0; //m/s int. off above vertical cmd gen rate --- > kiDepth = 0.0006; //rad/sec/meter; Dive loop int. gain > // kpDepth = .08; //rad/meter; Dive loop pos'n gain ODY > // kiDepth = 0.003; //rad/sec/meter; Dive loop int. gain > kiDepthOff = 0.50; //meter/sec; Integrator shut-off 46c51 < maxDepthInt = 20.0; //deg.; max cmded pitch frm depth int --- > maxDepthInt = 10.0; //deg.; max cmded pitch frm depth int 59c64,65 < altimeterInstrument = 0.; --- > // 5 => Use the nadir beam of the Deltat multibeam for altitude > altimeterInstrument = 5.; 71,72c77,79 < mass = 721.0; //kg; Vehicle mass < buoyancy = 7136.1; //Newtons, incl 65.6 N measured 1 June 01 --- > mass = 1015.6; //kg; Vehicle mass > // buoyancy = 10012; //Newtons, 12 lbf delta B > buoyancy = 9977; //Newtons, 4 lbf delta B Index: auv/altex/onboard/config/imaging/workSite.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/workSite.cfg,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.1.2.1 diff -r1.2.2.2 -r1.2.2.1.2.1 101,102c101,102 < //latitude = 36.697; //Decimal Degrees < //longitude = -121.935; //Decimal Degrees. Minus for West Long. --- > latitude = 36.697; //Decimal Degrees > longitude = -121.935; //Decimal Degrees. Minus for West Long. 123d122 < // 129,147d127 < //Coordinates for the 2850m Canyon site: < //2 June 2015 < //latitude = 36.6056; < //longitude = -122.4392; < //startDepth = 2600; < //Coordinates for the 1850m Canyon site: < //13 Aug 2015 < //latitude = 36.69919; < //longitude = -122.10500; < //startDepth = 1600; < // < //Coordinates for 200m S of i2map transect line < //8 Sept 2015 < //latitude = 36.688; < //longitude = -122.0412; < // Moved the above to 400 m north of the new line, which is the "Midwater One" location: < latitude = 36.7000; < longitude = -122.0500; < // Index: auv/altex/onboard/config/imaging/workSiteTransect.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/config/imaging/Attic/workSiteTransect.cfg,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.1 diff -r1.1.2.2 -r1.1.2.1 142,146c142,143 < //latitude = 36.688; < //longitude = -122.0412; < // Moved the above to 400 m north of the new line, which is the "Midwater One" location: < latitude = 36.7000; < longitude = -122.0500; --- > latitude = 36.688; > longitude = -122.0412; Index: auv/altex/onboard/kearfott/Kearfott.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/kearfott/Kearfott.cc,v retrieving revision 1.51.2.9 retrieving revision 1.51.2.8 diff -r1.51.2.9 -r1.51.2.8 21c21 < $Id: Kearfott.cc,v 1.51.2.9 2016/06/07 22:14:58 hthomas Exp $ --- > $Id: Kearfott.cc,v 1.51.2.8 2016/04/04 21:24:03 henthorn Exp $ 763c763 < //Syslog::write("decrementing by a day\n"); --- > Syslog::write("decrementing by a day\n"); 1479c1479 < opdata.forcomm = 2; //bottom track / water track mode --- > opdata.forcomm = 0; //bottom track only mode 1492c1492 < opdata.forcomm = 2; --- > opdata.forcomm = 0; 1526,1529c1526,1530 < if (_rawNavData.mode != 0x06 && _rawNavData.mode != 0x09) { < Syslog::write("Kearfott - exiting because of bad mode\n"); < exit(1); < } --- > // [klh] commented out for test > // if (_rawNavData.mode != 0x06 && _rawNavData.mode != 0x09) { > // Syslog::write("Kearfott - exiting because of bad mode\n"); > // exit(1); > // } Index: auv/altex/onboard/kearfott/KearfottServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/kearfott/KearfottServer.cc,v retrieving revision 1.15.2.1 retrieving revision 1.15 diff -r1.15.2.1 -r1.15 24c24 < $Id: KearfottServer.cc,v 1.15.2.1 2016/06/07 22:16:51 hthomas Exp $ --- > $Id: KearfottServer.cc,v 1.15 2009/06/15 19:35:50 hthomas Exp $ 160c160 < execlp(program, program, "-v", "-dev", "/dev/ser5", 0); --- > execlp(program, program, "-v", "-dev", "/dev/ser10", 0); Index: auv/altex/onboard/missions/SimVIsland.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/missions/Attic/SimVIsland.cfg,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.1 diff -r1.1.2.2 -r1.1.2.1 58c58 < windowLen = 31; --- > windowLen = 1; 61d60 < filterType = 2; 81c80 < windowLen = 31; --- > windowLen = 1; 84d82 < filterType = 2; Index: auv/altex/onboard/missions/abortMplan.cfg =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/missions/abortMplan.cfg,v retrieving revision 1.7.6.4 retrieving revision 1.7.6.3 diff -r1.7.6.4 -r1.7.6.3 9c9 < maxDepth = 550; --- > maxDepth = 3750; 46,56d45 < behavior CARL < { < id = 108; < duration = 1; < record = 0; < homeIris = 1; < lightSwitch = 0; < } < < < 59,64c48,53 < #behavior reson < #{ < # duration = 6; < # MB_Power = 0.0; < # Log_Mode = 0; < #} --- > behavior reson > { > duration = 6; > MB_Power = 0.0; > Log_Mode = 0; > } Index: auv/altex/onboard/seabird25p/Seabird25p.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/seabird25p/Seabird25p.cc,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.1 diff -r1.4.2.2 -r1.4.2.1 303d302 < Boolean debug = False; 307c306 < //_device->commsDebugMode(SerialDevice::DebugOn); --- > _device->commsDebugMode(SerialDevice::DebugOff); 323,324c322 < Syslog::write("Seabird/%s: sending CRLF...\n", name()); < dprintf("Sent %d bytes\n",_device->write(buf,strlen(buf))); --- > _device->write(buf,strlen(buf)); 497c495 < Boolean debug = False; --- > Boolean debug = True; 514,516c512,513 < Syslog::write("Seabird/%s: error record length (%d) incorrect (is not %d)", < name(), nBytes, ExpectedRecordBytes); < // return DeviceIF::Ok; --- > Syslog::write("Seabird/%s: error record length incorrect (%i)\n", name(),nBytes); > return DeviceIF::Ok; 599c596 < for (i=0;i< NUMVOLTAGES && offset+4 < nBytes; i++) --- > for (i=0;i< NUMVOLTAGES;i++) 602d598 < dprintf("V: %d ", iNum); 619,624d614 < dprintf("%s\n", reply); < dprintf("Temp : %.4f ", read_temp); < dprintf("Cond : %.4f ", read_cond); < dprintf("Salin: %.4f ", salinity); < dprintf("Depth: %.4f ", depth); < dprintf("\n\n"); 852c842 < // SW_SALT $Id: Seabird25p.cc,v 1.4.2.2 2016/05/06 17:22:46 henthorn Exp $ --- > // SW_SALT $Id: Seabird25p.cc,v 1.4.2.1 2015/09/25 21:43:02 headley Exp $ 910c900 < // SW_SALRT $Id: Seabird25p.cc,v 1.4.2.2 2016/05/06 17:22:46 henthorn Exp $ --- > // SW_SALRT $Id: Seabird25p.cc,v 1.4.2.1 2015/09/25 21:43:02 headley Exp $ 967c957 < // SW_SALRP $Id: Seabird25p.cc,v 1.4.2.2 2016/05/06 17:22:46 henthorn Exp $ --- > // SW_SALRP $Id: Seabird25p.cc,v 1.4.2.1 2015/09/25 21:43:02 headley Exp $ 1029c1019 < // SW_SALS $Id: Seabird25p.cc,v 1.4.2.2 2016/05/06 17:22:46 henthorn Exp $ --- > // SW_SALS $Id: Seabird25p.cc,v 1.4.2.1 2015/09/25 21:43:02 headley Exp $ 1103c1093 < // SW_c3515 $Id: Seabird25p.cc,v 1.4.2.2 2016/05/06 17:22:46 henthorn Exp $ --- > // SW_c3515 $Id: Seabird25p.cc,v 1.4.2.1 2015/09/25 21:43:02 headley Exp $ Index: auv/altex/onboard/taskIF/CARL_IF.idl =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/CARL_IF.idl,v retrieving revision 1.3.2.4 retrieving revision 1.3.2.2 diff -r1.3.2.4 -r1.3.2.2 18c18 < CLASS --- > CLASS 35c35 < // Events generated by CARL --- > // Events generated by CARL 63d62 < float auto_iris_target; // Target mean light level 73,76d71 < // Use light level of zero to turn auto-iris function off. < // < DeviceIF::Status auto_iris(in float target_light_level); < 81c76 < boolean motor_action(); --- > boolean motor_action(); Index: auv/altex/onboard/taskIF/DynamicControlIF.idl =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/DynamicControlIF.idl,v retrieving revision 1.16.2.2 retrieving revision 1.16.2.2.2.2 diff -r1.16.2.2 -r1.16.2.2.2.2 164d163 < Index: auv/altex/onboard/taskIF/FuelCellIF.idl =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/FuelCellIF.idl,v retrieving revision 1.8 retrieving revision 1.8.10.1 diff -r1.8 -r1.8.10.1 64c64,65 < FC_STATE_IDLE, --- > FC_STATE_NONE=0, > FC_STATE_IDLE, Index: auv/altex/onboard/taskIF/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/Makefile,v retrieving revision 1.49.2.4 retrieving revision 1.49.2.4.2.1 diff -r1.49.2.4 -r1.49.2.4.2.1 14c14 < # $Header: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/Makefile,v 1.49.2.4 2016/01/08 01:44:25 headley Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/Makefile,v 1.49.2.4.2.1 2016/04/14 22:50:05 headley Exp $ 107a108,109 > GncIF.o \ > GncIF_SK.o \ 201c203 < @echo Generating .cc and .h files from .idl --- > @echo Generating .cc and .h files from .idl foo Index: auv/altex/onboard/taskIF/SimulatedFuelCellIF.idl =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/SimulatedFuelCellIF.idl,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -r1.2 -r1.2.10.1 61a62 > FC_STATE_NONE=0, Index: auv/altex/onboard/taskIF/SimulatorIF.idl =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/SimulatorIF.idl,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.1.2.1 diff -r1.12.2.1 -r1.12.2.1.2.1 123a124,128 > > /////////////////////////////////////////////////////////////////// > // Notify simulator of event (w/o TaskIF) > void notifyEvent(in long event); > Index: auv/altex/onboard/taskIF/TerrainAidIF.idl =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/taskIF/TerrainAidIF.idl,v retrieving revision 1.2.2.2 retrieving revision 1.2 diff -r1.2.2.2 -r1.2 57,60d56 < < /* Used as an input to the TRN engine */ < < boolean reinitFilter; 65,66d60 < void reinitFilter( ); < Index: auv/altex/onboard/terrainAid/TerrainAidDriver.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainAid/TerrainAidDriver.cc,v retrieving revision 1.40.2.9 retrieving revision 1.40.2.8 diff -r1.40.2.9 -r1.40.2.8 254d253 < _reinitFilter = 0; 610,619d608 < < // Check the filter reinit flag and take action if necessary < // < _reinitFilter = _output->data.reinitFilter; < if (_reinitFilter) < { < _tercom->reinitFilter(True); < _output->data.reinitFilter = False; // Reset the reinit flag < } < Index: auv/altex/onboard/terrainAid/TerrainAidDriver.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainAid/TerrainAidDriver.h,v retrieving revision 1.14.2.6 retrieving revision 1.14.2.5 diff -r1.14.2.6 -r1.14.2.5 131d130 < int _reinitFilter; Index: auv/altex/onboard/terrainAid/TerrainAidLog.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainAid/TerrainAidLog.cc,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.1 diff -r1.10.2.2 -r1.10.2.1 92d91 < addField((_reinitFilter = new IntegerData("ta.reinitFilter"))); 164d162 < delete _reinitFilter; 240d237 < _reinitFilter-> setValue(_terrainAid->_reinitFilter); Index: auv/altex/onboard/terrainAid/TerrainAidLog.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainAid/TerrainAidLog.h,v retrieving revision 1.9.2.1 retrieving revision 1.9 diff -r1.9.2.1 -r1.9 46c46 < IntegerData *_numReinits, *_filterState, *_reinitFilter; --- > IntegerData *_numReinits, *_filterState; Index: auv/altex/onboard/terrainAid/TerrainAidServer.cc =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainAid/TerrainAidServer.cc,v retrieving revision 1.4.2.6 retrieving revision 1.4.2.5 diff -r1.4.2.6 -r1.4.2.5 60,69d59 < void TerrainAidServer::reinitFilter() < { < _terrainAidOutput->read(); < < _terrainAidOutput->data.reinitFilter = True; < < _terrainAidOutput->write(); < < } < Index: auv/altex/onboard/terrainAid/TerrainAidServer.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainAid/TerrainAidServer.h,v retrieving revision 1.4.2.5 retrieving revision 1.4.2.4 diff -r1.4.2.5 -r1.4.2.4 38d37 < virtual void TerrainAidServer::reinitFilter(void); Index: auv/altex/onboard/terrainNav/TerrainNav.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainNav/TerrainNav.h,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.1 diff -r1.19.2.2 -r1.19.2.1 345,348d344 < virtual void reinitFilter(const bool lowInfoTransition) { < printf("\n\n\t\t\t EXTERNAL reinitFilter() CALL NOT COMPATIBLE WITH OLD LOCAL TerrainNav!\n"); < printf( "\t\t\t USE G2TerrainNav OR TerrainNavClient OBJECT\n\n"); < } Index: auv/altex/onboard/terrainNav/TerrainNavClient.cpp =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainNav/TerrainNavClient.cpp,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.1 diff -r1.2.2.2 -r1.2.2.1 636,646d635 < void TerrainNavClient::reinitFilter(const bool lowInfoTransition) < { < commsT reinit(TRN_FILT_REINIT); < //printf("%s\n", reinits.to_s(_comms_buf, TRN_MSG_SIZE)); < reinit.serialize(_comms_buf); < < if(!requestAndConfirm(reinit, TRN_ACK)) { < printf("TerrainNavClient::reinitFilter() - comms failure\n"); < } < } < Index: auv/altex/onboard/terrainNav/TerrainNavClient.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/terrainNav/TerrainNavClient.h,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.1 diff -r1.2.2.2 -r1.2.2.1 120a121 > 267,273d267 < /* Function: reinitFilter(bool lowInfoTransition) < * Usage: filterType = tercom->reinitFilter(true); < * ------------------------------------------------------------------------*/ < /*! Reinitializes the TRN filter. < */ < virtual void reinitFilter(const bool lowInfoTransition); < Index: auv/altex/onboard/utils/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/utils/Makefile,v retrieving revision 1.40.2.4 retrieving revision 1.40.2.4.2.2 diff -r1.40.2.4 -r1.40.2.4.2.2 14c14 < # $Header: /home/cvs/auv-qnx/auv/altex/onboard/utils/Makefile,v 1.40.2.4 2016/02/02 22:49:13 rob Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/altex/onboard/utils/Makefile,v 1.40.2.4.2.2 2016/05/24 18:23:34 headley Exp $ 96,97c96,99 < 83p2csv.o \ < 83p2mat.o --- > 83p2csv.o > > # 83pmat doesn't appear to be used > # 83p2mat.o 115c117,122 < mv parseComplex.tab.c parseComplex.tab.cc --- > mv parseComplex.tab.h parseComplex.tab.h.gen > awk -f mpdef.awk parseComplex.tab.h.gen > parseComplex.tab.h > awk -f mpdef.awk parseComplex.tab.c > parseComplex.tab.cc > mv parseComplex.tab.c parseComplex.tab.c.gen > > # mv parseComplex.tab.c parseComplex.tab.cc 118,119c125,128 < lex parseComplex.l < mv lex.yy.c parseComplex.yy.cc --- > lex parseComplex.l > awk -f mpdef.awk lex.yy.c > parseComplex.yy.cc > > # mv lex.yy.c parseComplex.yy.cc 200c209 < rm -f core *.o $(OBJS:.o=.d) *.lib *.yy *.tab.* $(TARGETS) --- > rm -f core *.o $(OBJS:.o=.d) *.lib *.yy *.yy.cc *.tab.* $(TARGETS) Index: auv/altex/onboard/utils/System.h =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/utils/System.h,v retrieving revision 1.21 retrieving revision 1.21.4.1 diff -r1.21 -r1.21.4.1 22a23,24 > // Period of Navigation task > #define GncPeriodMillisec 200 54a57,59 > #define GncPriority 18 > #define GncServerPriority 17 > Index: auv/altex/onboard/utils/parseComplex.l =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/utils/parseComplex.l,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -r1.2 -r1.2.10.1 7,8c7,8 < int _lineNo = 1; < int _starting = 0; --- > int ut_lineNo = 1; > int ut_starting = 0; 11c11 < return _lineNo; --- > return ut_lineNo; 19c19 < int yywrap() --- > int yywrap() 22c22 < if (_starting) { --- > if (ut_starting) { 24c24 < _starting = 0; --- > ut_starting = 0; 35,36c35,36 < _lineNo = 1; < _starting = 1; --- > ut_lineNo = 1; > ut_starting = 1; 56c56 < ^[ \t]*\n { _lineNo++; } --- > ^[ \t]*\n { ut_lineNo++; } 65c65 < \n { _lineNo++; } --- > \n { ut_lineNo++; } Index: auv/idl/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/idl/Makefile,v retrieving revision 1.4 retrieving revision 1.4.6.1 diff -r1.4 -r1.4.6.1 14c14 < # $Header: /home/cvs/auv-qnx/auv/idl/Makefile,v 1.4 2001/06/02 04:26:34 hthomas Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/idl/Makefile,v 1.4.6.1 2016/04/14 22:50:05 headley Exp $ 41c41,42 < -I/usr/include --- > -I$(ONBOARD)/framework/ \ > -I/usr/include ? auv/altex/onboard/NewNav ? auv/altex/onboard/curl ? auv/altex/onboard/logs Index: auv/altex/onboard/Makefile =================================================================== RCS file: /home/cvs/auv-qnx/auv/altex/onboard/Makefile,v retrieving revision 1.102.2.6 retrieving revision 1.102.2.6.2.2 diff -r1.102.2.6 -r1.102.2.6.2.2 15c15 < # $Header: /home/cvs/auv-qnx/auv/altex/onboard/Makefile,v 1.102.2.6 2016/02/03 19:42:40 rob Exp $ --- > # $Header: /home/cvs/auv-qnx/auv/altex/onboard/Makefile,v 1.102.2.6.2.2 2016/04/15 00:41:25 headley Exp $ 95,96c95,97 < ExternalComms epiBatt \ < Simulator --- > ExternalComms \ > Simulator \ > gnc