
Module: /home/henthorn/AUV/auv-qnx/auv/altex/onboard/camera/CameraDriver.cc
Group: 'DGROUP' CONST,CONST2,_DATA,_BSS

Segment: _TEXT  DWORD USE32  00000dfc bytes  

/****************************************************************************/
/* Copyright (c) 2008 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  : BIAUV Camera Driver                                           */
/* Filename : CameraDriver.cc                                               */
/* Author   : rsm, K Headley                                                */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 05/02/2008                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#include "CameraDriver.h"
#define READ_TIMEOUT 3000           //Milliseconds
#define MAXRECORDBYTES 512
#include "PeriodicTask.h"
#include "SerialDeviceExt.h"
#include "Syslog.h"
#include "MathP.h"
#include "Bicam.h"

Boolean debug = False;

//////////////////////////////////////////////////////////
// SerialDeviceExt has a single IP port associated with it
// but the XPort has two (one for GPIO, the other for
// serial traffic); Could redesign SerialDeviceExt or
// eliminate it.
/**
   Benthic Imaging AUV Camera
*/
Camera::Camera(SerialDeviceExt *device, Boolean test, Boolean sim)
  : PeriodicTask("cameraDriver"), _test(test), _sim(sim)
{

 0000                    near Camera::Camera( SerialDeviceExt near *, char unsigned, char unsigned ):
 0000  68 3c 02 00 00                    push    0000023cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  56                                push    esi
 000b  57                                push    edi
 000c  55                                push    ebp
 000d  81 ec 08 02 00 00                 sub     esp,00000208H
 0013  50                                push    eax
 0014  89 d6                             mov     esi,edx
 0016  a1 00 00 00 00                    mov     eax,__wint_thread_data
 001b  89 84 24 9c 01 00 
       00                                mov     +19cH[esp],eax
 0022  8d 84 24 9c 01 00 
       00                                lea     eax,+19cH[esp]
 0029  a3 00 00 00 00                    mov     __wint_thread_data,eax
 002e  c7 84 24 a0 01 00 
       00 00 00 00 00                    mov     dword ptr +1a0H[esp],offset L75
 0039  31 ff                             xor     edi,edi
 003b  89 bc 24 a4 01 00 
       00                                mov     +1a4H[esp],edi
 0042  8b 04 24                          mov     eax,[esp]
 0045  89 84 24 b4 01 00 
       00                                mov     +1b4H[esp],eax
 004c  30 e4                             xor     ah,ah
 004e  88 a4 24 b8 01 00 
       00                                mov     +1b8H[esp],ah
 0055  ba 00 00 00 00                    mov     edx,offset L48
 005a  8b 04 24                          mov     eax,[esp]
 005d  e8 00 00 00 00                    call    near PeriodicTask::PeriodicTask( char const near * )
 0062  89 04 24                          mov     [esp],eax
 0065  89 e2                             mov     edx,esp
 0067  89 94 24 d8 01 00 
       00                                mov     +1d8H[esp],edx
 006e  c7 84 24 a4 01 00 
       00 01 00 00 00                    mov     dword ptr +1a4H[esp],00000001H
 0079  05 4e 01 00 00                    add     eax,0000014eH
 007e  e8 00 00 00 00                    call    near XPort::XPort()
 0083  8d 90 b2 fe ff ff                 lea     edx,-14eH[eax]
 0089  89 14 24                          mov     [esp],edx
 008c  83 c0 24                          add     eax,00000024H
 008f  e8 00 00 00 00                    call    near BicamGPS::BicamGPS()
 0094  2d 72 01 00 00                    sub     eax,00000172H
 0099  89 04 24                          mov     [esp],eax
 009c  89 e0                             mov     eax,esp
 009e  89 84 24 f8 01 00 
       00                                mov     +1f8H[esp],eax
 00a5  c7 84 24 a4 01 00 
       00 02 00 00 00                    mov     dword ptr +1a4H[esp],00000002H
 00b0  8b 04 24                          mov     eax,[esp]
 00b3  05 32 0d 00 00                    add     eax,00000d32H
 00b8  e8 00 00 00 00                    call    near XPortGPIO::XPortGPIO()
 00bd  2d 32 0d 00 00                    sub     eax,00000d32H
 00c2  89 04 24                          mov     [esp],eax
 00c5  89 e0                             mov     eax,esp
 00c7  89 84 24 d4 01 00 
       00                                mov     +1d4H[esp],eax
 00ce  c7 84 24 a4 01 00 
       00 03 00 00 00                    mov     dword ptr +1a4H[esp],00000003H
 00d9  8b 04 24                          mov     eax,[esp]
 00dc  05 46 0d 00 00                    add     eax,00000d46H
 00e1  e8 00 00 00 00                    call    near XPortGPIO::XPortGPIO()
 00e6  2d 46 0d 00 00                    sub     eax,00000d46H
 00eb  89 04 24                          mov     [esp],eax
 00ee  89 e0                             mov     eax,esp
 00f0  89 84 24 e0 01 00 
       00                                mov     +1e0H[esp],eax
 00f7  c7 84 24 a4 01 00 
       00 04 00 00 00                    mov     dword ptr +1a4H[esp],00000004H
 0102  8b 04 24                          mov     eax,[esp]
 0105  05 5a 0d 00 00                    add     eax,00000d5aH
 010a  e8 00 00 00 00                    call    near XPortGPIO::XPortGPIO()
 010f  2d 5a 0d 00 00                    sub     eax,00000d5aH
 0114  89 04 24                          mov     [esp],eax
 0117  89 e0                             mov     eax,esp
 0119  89 84 24 e4 01 00 
       00                                mov     +1e4H[esp],eax
 0120  c7 84 24 a4 01 00 
       00 05 00 00 00                    mov     dword ptr +1a4H[esp],00000005H
 012b  8b 04 24                          mov     eax,[esp]
 012e  05 6e 0d 00 00                    add     eax,00000d6eH
 0133  e8 00 00 00 00                    call    near XPortGPIO::XPortGPIO()
 0138  2d 6e 0d 00 00                    sub     eax,00000d6eH
 013d  89 04 24                          mov     [esp],eax
 0140  89 e0                             mov     eax,esp
 0142  89 84 24 08 02 00 
       00                                mov     +208H[esp],eax
 0149  c7 84 24 a4 01 00 
       00 06 00 00 00                    mov     dword ptr +1a4H[esp],00000006H
 0154  8b 04 24                          mov     eax,[esp]
 0157  88 98 c0 0d 00 00                 mov     +0dc0H[eax],bl
 015d  8b 04 24                          mov     eax,[esp]
 0160  88 88 c1 0d 00 00                 mov     +0dc1H[eax],cl
 0166  8b 04 24                          mov     eax,[esp]
 0169  c7 40 29 00 00 00 
       00                                mov     dword ptr +29H[eax],offset void (near * const near __vftbl[])()

  printf("Camera:: Got here!\n");

 0170  68 0d 00 00 00                    push    offset L49
 0175  e8 00 00 00 00                    call    printf_
 017a  83 c4 04                          add     esp,00000004H

  _device = device;
 017d  8b 04 24                          mov     eax,[esp]
 0180  89 70 5a                          mov     +5aH[eax],esi

  _log = new CameraLog(this, DataLog::BinaryFormat);
 0183  b8 46 03 00 00                    mov     eax,00000346H
 0188  e8 00 00 00 00                    call    void near * near operator new( int unsigned )
 018d  89 84 24 ec 01 00 
       00                                mov     +1ecH[esp],eax
 0194  8b 84 24 ec 01 00 
       00                                mov     eax,+1ecH[esp]
 019b  89 84 24 e8 01 00 
       00                                mov     +1e8H[esp],eax
 01a2  83 bc 24 e8 01 00 
       00 00                             cmp     dword ptr +1e8H[esp],00000000H
 01aa  74 41                             je      L1
 01ac  8b 84 24 ec 01 00 
       00                                mov     eax,+1ecH[esp]
 01b3  89 84 24 fc 01 00 
       00                                mov     +1fcH[esp],eax
 01ba  c7 84 24 a4 01 00 
       00 07 00 00 00                    mov     dword ptr +1a4H[esp],00000007H
 01c5  bb 01 00 00 00                    mov     ebx,00000001H
 01ca  8b 14 24                          mov     edx,[esp]
 01cd  e8 00 00 00 00                    call    near CameraLog::CameraLog( Camera near *, DataLog::FileFormat )
 01d2  89 84 24 00 02 00 
       00                                mov     +200H[esp],eax
 01d9  c7 84 24 a4 01 00 
       00 06 00 00 00                    mov     dword ptr +1a4H[esp],00000006H
 01e4  8b 94 24 00 02 00 
       00                                mov     edx,+200H[esp]
 01eb  eb 07                             jmp     L2
 01ed  8b 94 24 e8 01 00 
       00                L1              mov     edx,+1e8H[esp]
 01f4  8b 04 24          L2              mov     eax,[esp]
 01f7  89 50 5e                          mov     +5eH[eax],edx

  _output= new CameraOutput();
 01fa  b8 45 00 00 00                    mov     eax,00000045H
 01ff  e8 00 00 00 00                    call    void near * near operator new( int unsigned )
 0204  89 84 24 f4 01 00 
       00                                mov     +1f4H[esp],eax
 020b  8b 84 24 f4 01 00 
       00                                mov     eax,+1f4H[esp]
 0212  89 84 24 f0 01 00 
       00                                mov     +1f0H[esp],eax
 0219  83 bc 24 f0 01 00 
       00 00                             cmp     dword ptr +1f0H[esp],00000000H
 0221  74 3d                             je      L3
 0223  8b 84 24 f4 01 00 
       00                                mov     eax,+1f4H[esp]
 022a  89 84 24 fc 01 00 
       00                                mov     +1fcH[esp],eax
 0231  c7 84 24 a4 01 00 
       00 09 00 00 00                    mov     dword ptr +1a4H[esp],00000009H
 023c  31 db                             xor     ebx,ebx
 023e  31 d2                             xor     edx,edx
 0240  e8 00 00 00 00                    call    near CameraOutput::CameraOutput( SharedData::Access, char unsigned )
 0245  89 84 24 04 02 00 
       00                                mov     +204H[esp],eax
 024c  c7 84 24 a4 01 00 
       00 06 00 00 00                    mov     dword ptr +1a4H[esp],00000006H
 0257  8b 94 24 04 02 00 
       00                                mov     edx,+204H[esp]
 025e  eb 07                             jmp     L4
 0260  8b 94 24 f0 01 00 
       00                L3              mov     edx,+1f0H[esp]
 0267  8b 04 24          L4              mov     eax,[esp]
 026a  89 50 62                          mov     +62H[eax],edx

  _output->write();

 026d  8b 04 24                          mov     eax,[esp]
 0270  8b 40 62                          mov     eax,+62H[eax]
 0273  e8 00 00 00 00                    call    void near CameraOutput::write()

  addPeriodicCallback(200, (CallbackMethod)Camera::readData);

 0278  c7 84 24 c0 01 00 
       00 00 00 00 00                    mov     dword ptr +1c0H[esp],offset void (near * near Camera::__mbrptrthunk())()
 0283  31 db                             xor     ebx,ebx
 0285  89 9c 24 c4 01 00 
       00                                mov     +1c4H[esp],ebx
 028c  89 9c 24 c8 01 00 
       00                                mov     +1c8H[esp],ebx
 0293  8c d8                             mov     ax,ds
 0295  8e c0                             mov     es,ax
 0297  8d bc 24 a8 01 00 
       00                                lea     edi,+1a8H[esp]
 029e  8d b4 24 c0 01 00 
       00                                lea     esi,+1c0H[esp]
 02a5  a5                                movsd   
 02a6  a5                                movsd   
 02a7  a5                                movsd   
 02a8  8b b4 24 b0 01 00 
       00                                mov     esi,+1b0H[esp]
 02af  56                                push    esi
 02b0  8b bc 24 b0 01 00 
       00                                mov     edi,+1b0H[esp]
 02b7  57                                push    edi
 02b8  8b 84 24 b0 01 00 
       00                                mov     eax,+1b0H[esp]
 02bf  50                                push    eax
 02c0  ba c8 00 00 00                    mov     edx,000000c8H
 02c5  8b 44 24 0c                       mov     eax,+0cH[esp]
 02c9  e8 00 00 00 00                    call    void near PeriodicTask::addPeriodicCallback( int unsigned, void (near PeriodicTask::*)())

  _samplePeriodCntr = 0;
 02ce  8b 04 24                          mov     eax,[esp]
 02d1  89 98 92 0d 00 00                 mov     +0d92H[eax],ebx

  _first = False;
 02d7  8b 04 24                          mov     eax,[esp]
 02da  c6 80 9e 0d 00 00 
       00                                mov     byte ptr +0d9eH[eax],00H

  _running = False;

 02e1  8b 04 24                          mov     eax,[esp]
 02e4  c6 80 bf 0d 00 00 
       00                                mov     byte ptr +0dbfH[eax],00H

  if(_test)
    {
 02eb  8b 04 24                          mov     eax,[esp]
 02ee  8a 90 c0 0d 00 00                 mov     dl,+0dc0H[eax]
 02f4  84 d2                             test    dl,dl
 02f6  74 15                             je      L5

      Syslog::write("CameraDriver:: _test = %d", _test);
    }


 02f8  88 d0                             mov     al,dl
 02fa  25 ff 00 00 00                    and     eax,000000ffH
 02ff  50                                push    eax
 0300  68 21 00 00 00                    push    offset L50
 0305  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 030a  83 c4 08                          add     esp,00000008H

  if( !_test )
    {
      Syslog::write("CameraDriver:: Before navigation IF.");
      try
	{
 030d  8b 04 24          L5              mov     eax,[esp]
 0310  80 b8 c0 0d 00 00 
       00                                cmp     byte ptr +0dc0H[eax],00H
 0317  0f 85 b3 00 00 00                 jne     L11
 031d  68 3b 00 00 00                    push    offset L51
 0322  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 0327  83 c4 04                          add     esp,00000004H
 032a  c7 84 24 a4 01 00 
       00 0b 00 00 00                    mov     dword ptr +1a4H[esp],0000000bH
 0335  8d 84 24 68 01 00 
       00                                lea     eax,+168H[esp]
 033c  e8 00 00 00 00                    call    _setjmp_
 0341  83 f8 01                          cmp     eax,00000001H
 0344  72 0b                             jb      L6
 0346  76 4d                             jbe     L8
 0348  83 f8 02                          cmp     eax,00000002H
 034b  0f 84 49 01 00 00                 je      L13

	  _navigationIF = new NavigationIF("navigation");
 0351  b8 e5 01 00 00    L6              mov     eax,000001e5H
 0356  e8 00 00 00 00                    call    void near * near operator new( int unsigned )
 035b  85 c0                             test    eax,eax
 035d  74 2c                             je      L7
 035f  89 84 24 fc 01 00 
       00                                mov     +1fcH[esp],eax
 0366  c7 84 24 a4 01 00 
       00 0c 00 00 00                    mov     dword ptr +1a4H[esp],0000000cH
 0371  bb 0a 00 00 00                    mov     ebx,0000000aH
 0376  ba 60 00 00 00                    mov     edx,offset L52
 037b  e8 00 00 00 00                    call    near NavigationIF::NavigationIF( char const near *, int )
 0380  c7 84 24 a4 01 00 
       00 0b 00 00 00                    mov     dword ptr +1a4H[esp],0000000bH
 038b  89 c2             L7              mov     edx,eax
 038d  8b 04 24                          mov     eax,[esp]
 0390  89 50 66                          mov     +66H[eax],edx

	}
      catch( SharedObject::Error e ) 
	{
 0393  eb 30                             jmp     L10

	  Syslog::write("CameraDriver -- Caught exception: %s\n", e.msg );
 0395  c7 84 24 a4 01 00 
       00 0e 00 00 00    L8              mov     dword ptr +1a4H[esp],0000000eH
 03a0  8d 84 24 04 01 00 
       00                                lea     eax,+104H[esp]
 03a7  50                                push    eax
 03a8  68 6b 00 00 00                    push    offset L53
 03ad  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 03b2  83 c4 08                          add     esp,00000008H

	}
      catch( ... ) 
	{
 03b5  e8 00 00 00 00    L9              call    __wcpp_2_catch_done__
 03ba  c7 84 24 a4 01 00 
       00 06 00 00 00                    mov     dword ptr +1a4H[esp],00000006H
 03c5  c7 84 24 a4 01 00 
       00 06 00 00 00    L10             mov     dword ptr +1a4H[esp],00000006H
 03d0  8b 04 24          L11             mov     eax,[esp]
 03d3  c7 80 8a 0d 00 00 
       00 00 00 00                       mov     dword ptr +0d8aH[eax],00000000H
 03dd  8b 04 24                          mov     eax,[esp]
 03e0  c7 40 7a 00 00 00 
       00                                mov     dword ptr +7aH[eax],00000000H
 03e7  8b 04 24                          mov     eax,[esp]
 03ea  c7 40 7e 00 00 00 
       00                                mov     dword ptr +7eH[eax],00000000H
 03f1  8b 04 24                          mov     eax,[esp]
 03f4  c7 80 82 00 00 00 
       00 00 00 00                       mov     dword ptr +82H[eax],00000000H
 03fe  8b 04 24                          mov     eax,[esp]
 0401  c7 80 86 00 00 00 
       00 00 00 00                       mov     dword ptr +86H[eax],00000000H
 040b  68 00 00 42 40                    push    40420000H
 0410  6a 00                             push    00000000H
 0412  e8 00 00 00 00                    call    double near Math::degToRad( double )
 0417  8b 04 24                          mov     eax,[esp]
 041a  dd 58 6a                          fstp    qword ptr +6aH[eax]
 041d  68 00 80 5e c0                    push    0c05e8000H
 0422  6a 00                             push    00000000H
 0424  e8 00 00 00 00                    call    double near Math::degToRad( double )
 0429  8b 04 24                          mov     eax,[esp]
 042c  dd 58 72                          fstp    qword ptr +72H[eax]
 042f  8b 04 24                          mov     eax,[esp]
 0432  c7 80 92 00 00 00 
       00 00 00 00                       mov     dword ptr +92H[eax],00000000H
 043c  8b 04 24                          mov     eax,[esp]
 043f  c7 80 96 00 00 00 
       00 00 08 40                       mov     dword ptr +96H[eax],40080000H
 0449  8b 04 24                          mov     eax,[esp]
 044c  80 b8 c1 0d 00 00 
       00                                cmp     byte ptr +0dc1H[eax],00H
 0453  0f 85 c3 02 00 00                 jne     L16
 0459  8b 40 5a                          mov     eax,+5aH[eax]
 045c  e8 00 00 00 00                    call    char const near * near SerialDeviceExt::devName()
 0461  89 c3                             mov     ebx,eax
 0463  ba b4 00 00 00                    mov     edx,offset L55
 0468  b8 00 00 00 00                    mov     eax,offset ostream near cout
 046d  e8 00 00 00 00                    call    ostream near & near ostream::operator <<( char const near * )
 0472  ba 00 00 00 00                    mov     edx,offset ostream near & near endl( ostream near & )
 0477  e8 00 00 00 00                    call    ostream near & near ostream::operator <<( ostream near & (near *)( ))
 047c  ba c5 00 00 00                    mov     edx,offset L56
 0481  89 d8                             mov     eax,ebx
 0483  e8 00 00 00 00                    call    strstr_
 0488  40                                inc     eax
 0489  8d 54 24 04                       lea     edx,+4H[esp]
 048d  8a 38             L12             mov     bh,[eax]
 048f  80 ff 3a                          cmp     bh,3aH
 0492  74 23                             je      L14
 0494  88 3a                             mov     [edx],bh
 0496  42                                inc     edx
 0497  40                                inc     eax
 0498  eb f3                             jmp     L12

	  Syslog::write("CameraDriver -- Caught exception!\n");
	}

      // don't open the device:
      // we'll be working through the
      // XPort interface
      //_device->openSD();

    }   

  _photoCntr = 0;

  _position.x = 0.;
  _position.y = 0.;

  _position.latitude  = Math::degToRad(36.00); 
  _position.longitude = Math::degToRad(-122.00); 
  _position.altitude  = 3.0; 
   
  //
  // In simulation there is no hardware, so don't try to talk to it!
  //
  if( _sim )
    {
      return;
    }

  // get hostname for xport
  char host[256];
  const char *sp=_device->devName();
  char *ip, *op;
  struct timeval now;
  cout<<"getting hostname"<<endl;
  ip=strstr(sp,":")+1;
  op=host;
   
  while(*ip!=':')
    {
      *op=*ip;
      op++;
      ip++;
    }
 049a  c7 84 24 a4 01 00 
       00 10 00 00 00    L13             mov     dword ptr +1a4H[esp],00000010H
 04a5  68 91 00 00 00                    push    offset L54
 04aa  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 04af  83 c4 04                          add     esp,00000004H
 04b2  e9 fe fe ff ff                    jmp     L9

  *op='\0';
 04b7  c6 02 00          L14             mov     byte ptr [edx],00H

  cout<<"got hostname:"<<host<<endl;


  //
  // Create and configure an XPort 
  // Arguments (in order, configured in CameraDriver.h):
  //   TCP/IP port to use for Serial
  //   GPIO pin direction mask (which pins affect for input/output)
  //   GPIO pin direction levels (select input(0)/output(1))
  //   GPIO pin level mask (which pins affect for output level)
  //   GPIO pin active levels (select active LO(1)/active HI(0))
  //   
  //   here, we set all setting all GPIO pins as active low outputs.
 04ba  ba c7 00 00 00                    mov     edx,offset L57
 04bf  b8 00 00 00 00                    mov     eax,offset ostream near cout
 04c4  e8 00 00 00 00                    call    ostream near & near ostream::operator <<( char const near * )
 04c9  8d 54 24 04                       lea     edx,+4H[esp]
 04cd  e8 00 00 00 00                    call    ostream near & near ostream::operator <<( char const near * )
 04d2  ba 00 00 00 00                    mov     edx,offset ostream near & near endl( ostream near & )
 04d7  e8 00 00 00 00                    call    ostream near & near ostream::operator <<( ostream near & (near *)( ))

  xport.configure(host,
		  GPIO_IP_PORT,SERIAL_IP_PORT1,
		  CFG_GPIO_DIR_MASK,
		  CFG_GPIO_DIR_LEVEL_MASK,
		  CFG_GPIO_LEVEL_MASK,
		  CFG_GPIO_ACTIVE_LEVEL_MASK);

  // TODO: make sure XPort power is on before trying to connect

  //
  // Connect to the XPort 
  // (both serial and gpio sockets)
  // we call connectxp with doConfig=FALSE so that no attempt
  // is made to set GPIO Direction or Active-Level.
  // !!! THIS ROUTINE DOES NOT SET ACTIVE LEVEL OR GPIO PIN DIRECTION !!!
  // ** Must have hardware flash defaults configured to OUTPUT **
  // ** OR must explicitly set directions in software          **
  // ** Setting either Direction or Active-Level causes        **
  // ** ALL GPIO PINS TO BE DISABLED until their state is set  **

 04dc  6a 01                             push    00000001H
 04de  68 f7 00 00 00                    push    000000f7H
 04e3  68 f7 00 00 00                    push    000000f7H
 04e8  68 ff 00 00 00                    push    000000ffH
 04ed  8b 44 24 10                       mov     eax,+10H[esp]
 04f1  05 4e 01 00 00                    add     eax,0000014eH
 04f6  b9 11 27 00 00                    mov     ecx,00002711H
 04fb  bb f0 77 00 00                    mov     ebx,000077f0H
 0500  8d 54 24 14                       lea     edx,+14H[esp]
 0504  e8 00 00 00 00                    call    int near XPort::configure( char near *, int unsigned, int unsigned, int unsigned, int unsigned, int unsigned, int unsigned )

  xport.connectxp(XPCON_ALL, FALSE);

  //
  //   Configure a XPortGPIO for the camera trigger
  //   Constructor arguments:
  //   an XPort reference
  //  GPIO pin select mask (which pins to activate when triggering camera)
  //  GPIO pin direction mask (which pins to set as outputs(1)/inputs(0))
  //  GPIO pin active level mask (which pins to set active HI(0)/active LO(1))
  //  GPIO pin state mask (which pins to set active(1)/inactive(0)))
  XPortResponse *response;

 0509  8b 04 24                          mov     eax,[esp]
 050c  05 4e 01 00 00                    add     eax,0000014eH
 0511  31 db                             xor     ebx,ebx
 0513  ba 02 00 00 00                    mov     edx,00000002H
 0518  e8 00 00 00 00                    call    int near XPort::connectxp( ConnectionID, BOOLEAN )

  camTrigger.configure(&xport,
		       CAMTRIGGER_GPIO_SELECT_MASK,
		       CAMTRIGGER_GPIO_DIR_MASK,
		       CAMTRIGGER_GPIO_ACTIVE_LEVEL_MASK,
		       CAMTRIGGER_GPIO_STATE_MASK);
 051d  6a 01                             push    00000001H
 051f  6a 01                             push    00000001H
 0521  8b 54 24 08                       mov     edx,+8H[esp]
 0525  81 c2 4e 01 00 00                 add     edx,0000014eH
 052b  8b 44 24 08                       mov     eax,+8H[esp]
 052f  05 32 0d 00 00                    add     eax,00000d32H
 0534  b9 01 00 00 00                    mov     ecx,00000001H
 0539  89 cb                             mov     ebx,ecx
 053b  e8 00 00 00 00                    call    int near XPortGPIO::configure( XPort near *, int unsigned, int unsigned, int unsigned, int unsigned )

	camTrigger.setDirection(0x1, response);   // output
 0540  8b 04 24                          mov     eax,[esp]
 0543  05 32 0d 00 00                    add     eax,00000d32H
 0548  89 eb                             mov     ebx,ebp
 054a  ba 01 00 00 00                    mov     edx,00000001H
 054f  e8 00 00 00 00                    call    int near XPortGPIO::setDirection( int unsigned, XPortResponse near * )

	camTrigger.setActiveLevel(0x1, response); // active low

  // disable camera trigger initially
 0554  8b 04 24                          mov     eax,[esp]
 0557  05 32 0d 00 00                    add     eax,00000d32H
 055c  89 eb                             mov     ebx,ebp
 055e  ba 01 00 00 00                    mov     edx,00000001H
 0563  e8 00 00 00 00                    call    int near XPortGPIO::setActiveLevel( int unsigned, XPortResponse near * )

  camTrigger.setInactive();

  //
  //   Configure a XPortGPIO for the strobe disable
  //   Constructor arguments:
  //   an XPort reference
  //  GPIO pin select mask (which pins to activate when triggering)
  //  GPIO pin direction mask (which pins to set as outputs(1)/inputs(0))
  //  GPIO pin active level mask (which pins to set active HI(0)/active LO(1))
  //  GPIO pin state mask (which pins to set active(1)/inactive(0)))

 0568  8b 04 24                          mov     eax,[esp]
 056b  05 32 0d 00 00                    add     eax,00000d32H
 0570  e8 00 00 00 00                    call    int near XPortGPIO::setInactive()

if(!_sim) strobeDisable.configure(&xport,
			 STROBE_DISABLE_GPIO_SELECT_MASK,
			 STROBE_DISABLE_GPIO_DIR_MASK,
			 STROBE_DISABLE_GPIO_ACTIVE_LEVEL_MASK,
			 STROBE_DISABLE_GPIO_STATE_MASK);
 0575  8b 04 24                          mov     eax,[esp]
 0578  80 b8 c1 0d 00 00 
       00                                cmp     byte ptr +0dc1H[eax],00H
 057f  75 1b                             jne     L15
 0581  6a 20                             push    00000020H
 0583  6a 20                             push    00000020H
 0585  8d 90 4e 01 00 00                 lea     edx,+14eH[eax]
 058b  05 5a 0d 00 00                    add     eax,00000d5aH
 0590  b9 20 00 00 00                    mov     ecx,00000020H
 0595  89 cb                             mov     ebx,ecx
 0597  e8 00 00 00 00                    call    int near XPortGPIO::configure( XPort near *, int unsigned, int unsigned, int unsigned, int unsigned )

    strobeDisable.setDirection(0x1, response);       //output 21 June 11 changed to 0x1
 059c  8b 04 24          L15             mov     eax,[esp]
 059f  05 5a 0d 00 00                    add     eax,00000d5aH
 05a4  89 eb                             mov     ebx,ebp
 05a6  ba 01 00 00 00                    mov     edx,00000001H
 05ab  e8 00 00 00 00                    call    int near XPortGPIO::setDirection( int unsigned, XPortResponse near * )

    strobeDisable.setActiveLevel(0x0, response); // active high

	
    // disable strobes initially
 05b0  8b 04 24                          mov     eax,[esp]
 05b3  05 5a 0d 00 00                    add     eax,00000d5aH
 05b8  89 eb                             mov     ebx,ebp
 05ba  31 d2                             xor     edx,edx
 05bc  e8 00 00 00 00                    call    int near XPortGPIO::setActiveLevel( int unsigned, XPortResponse near * )

    strobeDisable.setInactive();


  // initialize the strobe warm-up delay
  // TODO: read from config file
 05c1  8b 04 24                          mov     eax,[esp]
 05c4  05 5a 0d 00 00                    add     eax,00000d5aH
 05c9  e8 00 00 00 00                    call    int near XPortGPIO::setInactive()

  _strobeEnableStartDelaySec=0;  // Changed from 2 to 0 21 June

  //
  //   Configure a XPortGPIO for the Vicor 12V camera powerSupply enable
  //   Constructor arguments:
  //   an XPort reference
  //  GPIO pin select mask (which pins to activate when triggering)
  //  GPIO pin direction mask (which pins to set as outputs(1)/inputs(0))
  //  GPIO pin active level mask (which pins to set active HI(0)/active LO(1))
  //  GPIO pin state mask (which pins to set active(1)/inactive(0)))
 05ce  8b 04 24                          mov     eax,[esp]
 05d1  c7 80 82 0d 00 00 
       00 00 00 00                       mov     dword ptr +0d82H[eax],00000000H

  cameraDisable.configure(&xport,
			 CAMERA_DISABLE_GPIO_SELECT_MASK,
			 CAMERA_DISABLE_GPIO_DIR_MASK,
			 CAMERA_DISABLE_GPIO_ACTIVE_LEVEL_MASK,
			 CAMERA_DISABLE_GPIO_STATE_MASK);
 05db  6a 10                             push    00000010H
 05dd  6a 10                             push    00000010H
 05df  8b 54 24 08                       mov     edx,+8H[esp]
 05e3  81 c2 4e 01 00 00                 add     edx,0000014eH
 05e9  8b 44 24 08                       mov     eax,+8H[esp]
 05ed  05 46 0d 00 00                    add     eax,00000d46H
 05f2  b9 10 00 00 00                    mov     ecx,00000010H
 05f7  89 cb                             mov     ebx,ecx
 05f9  e8 00 00 00 00                    call    int near XPortGPIO::configure( XPort near *, int unsigned, int unsigned, int unsigned, int unsigned )

  cameraDisable.setDirection(0x1, response);  // output 21 June 11 changed to 0x1
 05fe  8b 04 24                          mov     eax,[esp]
 0601  05 46 0d 00 00                    add     eax,00000d46H
 0606  89 eb                             mov     ebx,ebp
 0608  ba 01 00 00 00                    mov     edx,00000001H
 060d  e8 00 00 00 00                    call    int near XPortGPIO::setDirection( int unsigned, XPortResponse near * )

  cameraDisable.setActiveLevel(0x0, response);// active high

 0612  8b 04 24                          mov     eax,[esp]
 0615  05 46 0d 00 00                    add     eax,00000d46H
 061a  89 eb                             mov     ebx,ebp
 061c  31 d2                             xor     edx,edx
 061e  e8 00 00 00 00                    call    int near XPortGPIO::setActiveLevel( int unsigned, XPortResponse near * )

  Syslog::write("CameraDriver disabling 12V camera power supply");
  // enable vicor power supply
 0623  68 d5 00 00 00                    push    offset L58
 0628  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 062d  83 c4 04                          add     esp,00000004H

  cameraDisable.setInactive();                //21 June 11 changed to inactive


  //   Configure a XPortGPIO for the laser disable
  //   Constructor arguments:
  //   an XPort reference
  //  GPIO pin select mask (which pins to activate when triggering)
  //  GPIO pin direction mask (which pins to set as outputs(1)/inputs(0))
  //  GPIO pin active level mask (which pins to set active HI(0)/active LO(1))
  //  GPIO pin state mask (which pins to set active(1)/inactive(0)))

  // Note: LASER_DISABLE* not defined for XPort
 0630  8b 04 24                          mov     eax,[esp]
 0633  05 46 0d 00 00                    add     eax,00000d46H
 0638  e8 00 00 00 00                    call    int near XPortGPIO::setInactive()

  laserDisable.configure(&xport,
			 LASER_DISABLE_GPIO_SELECT_MASK,
			 LASER_DISABLE_GPIO_DIR_MASK,
			 LASER_DISABLE_GPIO_ACTIVE_LEVEL_MASK,
			 LASER_DISABLE_GPIO_STATE_MASK);

 063d  6a 04                             push    00000004H
 063f  6a 04                             push    00000004H
 0641  8b 54 24 08                       mov     edx,+8H[esp]
 0645  81 c2 4e 01 00 00                 add     edx,0000014eH
 064b  8b 44 24 08                       mov     eax,+8H[esp]
 064f  05 6e 0d 00 00                    add     eax,00000d6eH
 0654  b9 04 00 00 00                    mov     ecx,00000004H
 0659  89 cb                             mov     ebx,ecx
 065b  e8 00 00 00 00                    call    int near XPortGPIO::configure( XPort near *, int unsigned, int unsigned, int unsigned, int unsigned )

  laserDisable.setDirection(0x1, response);  // output 21 June 11 changed to 0x1
 0660  8b 04 24                          mov     eax,[esp]
 0663  05 6e 0d 00 00                    add     eax,00000d6eH
 0668  89 eb                             mov     ebx,ebp
 066a  ba 01 00 00 00                    mov     edx,00000001H
 066f  e8 00 00 00 00                    call    int near XPortGPIO::setDirection( int unsigned, XPortResponse near * )

  laserDisable.setActiveLevel(0x0, response);// active high

 0674  8b 04 24                          mov     eax,[esp]
 0677  05 6e 0d 00 00                    add     eax,00000d6eH
 067c  89 eb                             mov     ebx,ebp
 067e  31 d2                             xor     edx,edx
 0680  e8 00 00 00 00                    call    int near XPortGPIO::setActiveLevel( int unsigned, XPortResponse near * )

  Syslog::write("CameraDriver enabling laser");
  // disable lasers
 0685  68 04 01 00 00                    push    offset L59
 068a  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 068f  83 c4 04                          add     esp,00000004H

  laserDisable.setActive();

//
  // Create a BicamGPS 
  // Constructor arguments:
  // an XPort reference
 0692  8b 04 24                          mov     eax,[esp]
 0695  05 6e 0d 00 00                    add     eax,00000d6eH
 069a  e8 00 00 00 00                    call    int near XPortGPIO::setActive()

  camGPS.configure(&xport);

 069f  8b 14 24                          mov     edx,[esp]
 06a2  81 c2 4e 01 00 00                 add     edx,0000014eH
 06a8  8b 04 24                          mov     eax,[esp]
 06ab  05 72 01 00 00                    add     eax,00000172H
 06b0  e8 00 00 00 00                    call    int near BicamGPS::configure( XPort near * )

  gettimeofday(&now,NULL);

 06b5  31 d2                             xor     edx,edx
 06b7  8d 84 24 cc 01 00 
       00                                lea     eax,+1ccH[esp]
 06be  e8 00 00 00 00                    call    gettimeofday_

  camGPS.update(now,
		Math::radToDeg(_position.latitude),
		Math::radToDeg(_position.longitude),
		_position.altitude);
 06c3  8b 04 24                          mov     eax,[esp]
 06c6  8b b0 96 00 00 00                 mov     esi,+96H[eax]
 06cc  56                                push    esi
 06cd  8b b8 92 00 00 00                 mov     edi,+92H[eax]
 06d3  57                                push    edi
 06d4  8b 68 76                          mov     ebp,+76H[eax]
 06d7  55                                push    ebp
 06d8  8b 50 72                          mov     edx,+72H[eax]
 06db  52                                push    edx
 06dc  e8 00 00 00 00                    call    double near Math::radToDeg( double )
 06e1  83 ec 08                          sub     esp,00000008H
 06e4  dd 1c 24                          fstp    qword ptr [esp]
 06e7  8b 44 24 10                       mov     eax,+10H[esp]
 06eb  8b 58 6e                          mov     ebx,+6eH[eax]
 06ee  53                                push    ebx
 06ef  8b 48 6a                          mov     ecx,+6aH[eax]
 06f2  51                                push    ecx
 06f3  e8 00 00 00 00                    call    double near Math::radToDeg( double )
 06f8  83 ec 08                          sub     esp,00000008H
 06fb  dd 1c 24                          fstp    qword ptr [esp]
 06fe  8b b4 24 e8 01 00 
       00                                mov     esi,+1e8H[esp]
 0705  56                                push    esi
 0706  8b bc 24 e8 01 00 
       00                                mov     edi,+1e8H[esp]
 070d  57                                push    edi
 070e  8b 44 24 20                       mov     eax,+20H[esp]
 0712  05 72 01 00 00                    add     eax,00000172H
 0717  e8 00 00 00 00                    call    int near BicamGPS::update( timeval, double, double, double )

}

/** Default Camera destructor */
 071c  80 8c 24 b8 01 00 
       00 10             L16             or      byte ptr +1b8H[esp],10H
 0724  8b 04 24                          mov     eax,[esp]
 0727  89 84 24 dc 01 00 
       00                                mov     +1dcH[esp],eax
 072e  8b 84 24 9c 01 00 
       00                                mov     eax,+19cH[esp]
 0735  a3 00 00 00 00                    mov     __wint_thread_data,eax
 073a  8b 84 24 dc 01 00 
       00                                mov     eax,+1dcH[esp]
 0741  81 c4 0c 02 00 00                 add     esp,0000020cH
 0747  5d                                pop     ebp
 0748  5f                                pop     edi
 0749  5e                                pop     esi
 074a  c3                                ret     

Camera::~Camera()
{
 074b                    near Camera::~Camera():
 074b  68 30 00 00 00                    push    00000030H
 0750  e8 00 00 00 00                    call    __CHK
 0755  53                                push    ebx
 0756  51                                push    ecx
 0757  56                                push    esi
 0758  57                                push    edi
 0759  83 ec 18                          sub     esp,00000018H
 075c  89 c3                             mov     ebx,eax
 075e  89 d1                             mov     ecx,edx
 0760  f6 c2 04                          test    dl,04H
 0763  74 14                             je      L17
 0765  ba 00 00 00 00                    mov     edx,offset char unsigned const near __typesig[]
 076a  e8 00 00 00 00                    call    __wcpp_2_dtor_array_store__
 076f  e8 00 00 00 00                    call    void near operator delete []( void near * )
 0774  e9 1d 01 00 00                    jmp     L23
 0779  a1 00 00 00 00    L17             mov     eax,__wint_thread_data
 077e  89 04 24                          mov     [esp],eax
 0781  89 e0                             mov     eax,esp
 0783  a3 00 00 00 00                    mov     __wint_thread_data,eax
 0788  c7 44 24 04 84 00 
       00 00                             mov     dword ptr +4H[esp],offset L76
 0790  c7 44 24 08 06 00 
       00 00                             mov     dword ptr +8H[esp],00000006H
 0798  89 5c 24 0c                       mov     +0cH[esp],ebx
 079c  88 4c 24 10                       mov     +10H[esp],cl
 07a0  c7 43 29 00 00 00 
       00                                mov     dword ptr +29H[ebx],offset void (near * const near __vftbl[])()

  Syslog::write(" CameraDestructor Executing.");
 07a7  68 20 01 00 00                    push    offset L60
 07ac  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 07b1  83 c4 04                          add     esp,00000004H

  if( !_test)
    {
 07b4  80 bb c0 0d 00 00 
       00                                cmp     byte ptr +0dc0H[ebx],00H
 07bb  75 08                             jne     L18

      _device->closeSD();
    }

 07bd  8b 43 5a                          mov     eax,+5aH[ebx]
 07c0  e8 00 00 00 00                    call    void near SerialDeviceExt::closeSD()

  delete _log;
 07c5  8b 43 5e          L18             mov     eax,+5eH[ebx]
 07c8  85 c0                             test    eax,eax
 07ca  74 0d                             je      L19
 07cc  8b b0 2a 01 00 00                 mov     esi,+12aH[eax]
 07d2  ba 02 00 00 00                    mov     edx,00000002H
 07d7  ff 16                             call    dword ptr [esi]

  delete _output;

 07d9  8b 43 62          L19             mov     eax,+62H[ebx]
 07dc  85 c0                             test    eax,eax
 07de  74 0a                             je      L20
 07e0  8b 70 20                          mov     esi,+20H[eax]
 07e3  ba 02 00 00 00                    mov     edx,00000002H
 07e8  ff 16                             call    dword ptr [esi]

  if( _sim )
    {
      return;
    }
  // disconnect XPort sockets
 07ea  80 bb c1 0d 00 00 
       00                L20             cmp     byte ptr +0dc1H[ebx],00H
 07f1  75 1d                             jne     L21

  printf("shutting down XPort sockets\n");
 07f3  68 3d 01 00 00                    push    offset L61
 07f8  e8 00 00 00 00                    call    printf_
 07fd  83 c4 04                          add     esp,00000004H

  xport.disconnectxp(XPCON_ALL);
 0800  8d 83 4e 01 00 00                 lea     eax,+14eH[ebx]
 0806  ba 02 00 00 00                    mov     edx,00000002H
 080b  e8 00 00 00 00                    call    int near XPort::disconnectxp( ConnectionID )

}

/** Camera initialize method.
    satisfies TaskIF(?) interface.
*/
 0810  c7 44 24 08 05 00 
       00 00             L21             mov     dword ptr +8H[esp],00000005H
 0818  8d 83 6e 0d 00 00                 lea     eax,+0d6eH[ebx]
 081e  31 d2                             xor     edx,edx
 0820  e8 00 00 00 00                    call    near XPortGPIO::~XPortGPIO()
 0825  c7 44 24 08 04 00 
       00 00                             mov     dword ptr +8H[esp],00000004H
 082d  83 e8 14                          sub     eax,00000014H
 0830  31 d2                             xor     edx,edx
 0832  e8 00 00 00 00                    call    near XPortGPIO::~XPortGPIO()
 0837  c7 44 24 08 03 00 
       00 00                             mov     dword ptr +8H[esp],00000003H
 083f  83 e8 14                          sub     eax,00000014H
 0842  31 d2                             xor     edx,edx
 0844  e8 00 00 00 00                    call    near XPortGPIO::~XPortGPIO()
 0849  c7 44 24 08 02 00 
       00 00                             mov     dword ptr +8H[esp],00000002H
 0851  83 e8 14                          sub     eax,00000014H
 0854  31 d2                             xor     edx,edx
 0856  e8 00 00 00 00                    call    near XPortGPIO::~XPortGPIO()
 085b  be 01 00 00 00                    mov     esi,00000001H
 0860  89 74 24 08                       mov     +8H[esp],esi
 0864  2d c0 0b 00 00                    sub     eax,00000bc0H
 0869  31 d2                             xor     edx,edx
 086b  e8 00 00 00 00                    call    near BicamGPS::~BicamGPS()
 0870  2d 72 01 00 00                    sub     eax,00000172H
 0875  31 ff                             xor     edi,edi
 0877  89 7c 24 08                       mov     +8H[esp],edi
 087b  89 f2                             mov     edx,esi
 087d  e8 00 00 00 00                    call    near PeriodicTask::~PeriodicTask()
 0882  89 c3                             mov     ebx,eax
 0884  f6 c1 02                          test    cl,02H
 0887  74 05                             je      L22
 0889  e8 00 00 00 00                    call    void near operator delete( void near * )
 088e  8b 04 24          L22             mov     eax,[esp]
 0891  a3 00 00 00 00                    mov     __wint_thread_data,eax
 0896  89 d8             L23             mov     eax,ebx
 0898  83 c4 18                          add     esp,00000018H
 089b  5f                                pop     edi
 089c  5e                                pop     esi
 089d  59                                pop     ecx
 089e  5b                                pop     ebx
 089f  c3                                ret     

void Camera::initialize()
{

 08a0                    void near Camera::initialize():
 08a0  68 04 00 00 00                    push    00000004H
 08a5  e8 00 00 00 00                    call    __CHK

}
/**
   Read position data and periodically update camera GPS input.
*/
 08aa  c3                                ret     

void Camera::readData()
{
  struct timeval now;
  static struct timeval previousUpdate;
  double elapsedSec;
  static Boolean init=FALSE;

  // initialize current time and previous update time
 08ab                    void near Camera::readData():
 08ab  68 68 00 00 00                    push    00000068H
 08b0  e8 00 00 00 00                    call    __CHK
 08b5  53                                push    ebx
 08b6  51                                push    ecx
 08b7  52                                push    edx
 08b8  56                                push    esi
 08b9  57                                push    edi
 08ba  55                                push    ebp
 08bb  83 ec 2c                          sub     esp,0000002cH
 08be  89 c1                             mov     ecx,eax

  gettimeofday(&now,NULL);
 08c0  31 d2                             xor     edx,edx
 08c2  8d 44 24 08                       lea     eax,+8H[esp]
 08c6  e8 00 00 00 00                    call    gettimeofday_

  if(init==FALSE){
 08cb  31 c0                             xor     eax,eax
 08cd  a0 00 00 00 00                    mov     al,char unsigned near Camera::void near readData()::.0::init
 08d2  85 c0                             test    eax,eax
 08d4  75 1a                             jne     L24

    memcpy(&previousUpdate,&now,sizeof(struct timeval));
 08d6  bb 08 00 00 00                    mov     ebx,00000008H
 08db  8d 54 24 08                       lea     edx,+8H[esp]
 08df  b8 00 00 00 00                    mov     eax,offset timeval near Camera::void near readData()::.0::previousUpdate
 08e4  e8 00 00 00 00                    call    memcpy_

    init=TRUE;
  }

  //
  // Get current position
  //
 08e9  c6 05 00 00 00 00 
       01                                mov     byte ptr char unsigned near Camera::void near readData()::.0::init,01H

  if( !_test )
    {
 08f0  80 b9 c0 0d 00 00 
       00                L24             cmp     byte ptr +0dc0H[ecx],00H
 08f7  75 16                             jne     L25

      _navigationIF->state(&_position, &_attitude);
 08f9  8d 99 14 01 00 00                 lea     ebx,+114H[ecx]
 08ff  8d 51 6a                          lea     edx,+6aH[ecx]
 0902  8b 41 66                          mov     eax,+66H[ecx]
 0905  e8 00 00 00 00                    call    void near NavigationIF::state( NavigationIF::Position near *, NavigationIF::Attitude near * )

    }
  else
    {
 090a  e9 93 00 00 00                    jmp     L28

      _position.x += 0.2;        //Increment 20 cm.
 090f  dd 41 7a          L25             fld     qword ptr +7aH[ecx]
 0912  dc 05 15 02 00 00                 fadd    qword ptr L67
 0918  dd 59 7a                          fstp    qword ptr +7aH[ecx]

      _position.latitude+=0.001;
 091b  dd 41 6a                          fld     qword ptr +6aH[ecx]
 091e  dc 05 1d 02 00 00                 fadd    qword ptr L68
 0924  dd 59 6a                          fstp    qword ptr +6aH[ecx]

      _position.longitude+=0.001;
 0927  dd 41 72                          fld     qword ptr +72H[ecx]
 092a  dc 05 1d 02 00 00                 fadd    qword ptr L68
 0930  dd 59 72                          fstp    qword ptr +72H[ecx]

      _position.altitude+=0.01;
 0933  dd 81 92 00 00 00                 fld     qword ptr +92H[ecx]
 0939  dc 05 25 02 00 00                 fadd    qword ptr L69
 093f  dd 99 92 00 00 00                 fstp    qword ptr +92H[ecx]

      if(_position.latitude>35.0)
	{
 0945  dd 41 6a                          fld     qword ptr +6aH[ecx]
 0948  dc 1d 2d 02 00 00                 fcomp   qword ptr L70
 094e  df e0                             fstsw   ax
 0950  9e                                sahf    
 0951  76 0e                             jbe     L26

	  _position.latitude=0.0;
	}
 0953  c7 41 6a 00 00 00 
       00                                mov     dword ptr +6aH[ecx],00000000H
 095a  c7 41 6e 00 00 00 
       00                                mov     dword ptr +6eH[ecx],00000000H

      if(_position.longitude>130.0)
	{
 0961  dd 41 72          L26             fld     qword ptr +72H[ecx]
 0964  dc 1d 35 02 00 00                 fcomp   qword ptr L71
 096a  df e0                             fstsw   ax
 096c  9e                                sahf    
 096d  76 0e                             jbe     L27

	  _position.longitude=0.0;
	}
 096f  c7 41 72 00 00 00 
       00                                mov     dword ptr +72H[ecx],00000000H
 0976  c7 41 76 00 00 00 
       00                                mov     dword ptr +76H[ecx],00000000H

      if(_position.altitude>10.0)
	{
 097d  dd 81 92 00 00 00 L27             fld     qword ptr +92H[ecx]
 0983  dc 1d 3d 02 00 00                 fcomp   qword ptr L72
 0989  df e0                             fstsw   ax
 098b  9e                                sahf    
 098c  76 14                             jbe     L28

	  _position.altitude=0.0;
	}
    }
  //
  // Update the GPS NMEA strings for the camera GPS serial input
  //
  // update() sets the GPS location (note that we only change four
  // parameters; the others are set in initialization)
 
  // writeNMEA() formats the NMEA strings
  // and sends them to the XPort.
  // GPS updates should be sent at a 1 Hz rate to
  // ensure that the camera maintains GPS lock; otherwise, the camera
  // will not record GPS metadata)

 098e  c7 81 92 00 00 00 
       00 00 00 00                       mov     dword ptr +92H[ecx],00000000H
 0998  c7 81 96 00 00 00 
       00 00 00 00                       mov     dword ptr +96H[ecx],00000000H

 if( !_sim )
    {
      // update current time
 09a2  80 b9 c1 0d 00 00 
       00                L28             cmp     byte ptr +0dc1H[ecx],00H
 09a9  0f 85 da 00 00 00                 jne     L30

      gettimeofday(&now,NULL);

      // compute time since last update (current-previous)
 09af  31 d2                             xor     edx,edx
 09b1  8d 44 24 08                       lea     eax,+8H[esp]
 09b5  e8 00 00 00 00                    call    gettimeofday_

      elapsedSec=((double)now.tv_sec+((double)now.tv_usec/1000000.0));
 09ba  db 44 24 0c                       fild    dword ptr +0cH[esp]
 09be  dc 35 45 02 00 00                 fdiv    qword ptr L73
 09c4  db 44 24 08                       fild    dword ptr +8H[esp]
 09c8  de c1                             faddp   st(1),st
 09ca  dd 5c 24 10                       fstp    qword ptr +10H[esp]

      elapsedSec-=((double)previousUpdate.tv_sec+((double)previousUpdate.tv_usec/1000000.0));
      // the loop runs every 200 ms, and we want to update
      // every 1 sec, so we have update at time > 0.8 sec
 09ce  db 05 04 00 00 00                 fild    dword ptr timeval near Camera::void near readData()::.0::previousUpdate+4H
 09d4  dc 35 45 02 00 00                 fdiv    qword ptr L73
 09da  db 05 00 00 00 00                 fild    dword ptr timeval near Camera::void near readData()::.0::previousUpdate
 09e0  de c1                             faddp   st(1),st
 09e2  dc 6c 24 10                       fsubr   qword ptr +10H[esp]
 09e6  dd 54 24 10                       fst     qword ptr +10H[esp]

      if(elapsedSec >= 0.800000)
	{
	  //Syslog::write("elapsedSec=%2.6lf\n",elapsedSec);
	  // set previous update time = current time
 09ea  dc 1d 4d 02 00 00                 fcomp   qword ptr L74
 09f0  df e0                             fstsw   ax
 09f2  9e                                sahf    
 09f3  0f 82 90 00 00 00                 jb      L30

	  memcpy(&previousUpdate,&now,sizeof(struct timeval));

	  // update NMEA field values (time, lat, lon, alt)
 09f9  bb 08 00 00 00                    mov     ebx,00000008H
 09fe  8d 54 24 08                       lea     edx,+8H[esp]
 0a02  b8 00 00 00 00                    mov     eax,offset timeval near Camera::void near readData()::.0::previousUpdate
 0a07  e8 00 00 00 00                    call    memcpy_

	  camGPS.update(now, 
			Math::radToDeg(_position.latitude),
			Math::radToDeg(_position.longitude),
			_position.altitude);
 0a0c  8b 91 96 00 00 00                 mov     edx,+96H[ecx]
 0a12  52                                push    edx
 0a13  8b 99 92 00 00 00                 mov     ebx,+92H[ecx]
 0a19  53                                push    ebx
 0a1a  8b 71 76                          mov     esi,+76H[ecx]
 0a1d  56                                push    esi
 0a1e  8b 79 72                          mov     edi,+72H[ecx]
 0a21  57                                push    edi
 0a22  e8 00 00 00 00                    call    double near Math::radToDeg( double )
 0a27  83 ec 08                          sub     esp,00000008H
 0a2a  dd 1c 24                          fstp    qword ptr [esp]
 0a2d  8b 69 6e                          mov     ebp,+6eH[ecx]
 0a30  55                                push    ebp
 0a31  8b 41 6a                          mov     eax,+6aH[ecx]
 0a34  50                                push    eax
 0a35  e8 00 00 00 00                    call    double near Math::radToDeg( double )
 0a3a  83 ec 08                          sub     esp,00000008H
 0a3d  dd 1c 24                          fstp    qword ptr [esp]
 0a40  8b 54 24 24                       mov     edx,+24H[esp]
 0a44  52                                push    edx
 0a45  8b 5c 24 24                       mov     ebx,+24H[esp]
 0a49  53                                push    ebx
 0a4a  8d 91 72 01 00 00                 lea     edx,+172H[ecx]
 0a50  89 d0                             mov     eax,edx
 0a52  e8 00 00 00 00                    call    int near BicamGPS::update( timeval, double, double, double )

	  if( !_test )
 0a57  80 b9 c0 0d 00 00 
       00                                cmp     byte ptr +0dc0H[ecx],00H
 0a5e  75 1e                             jne     L29

	  Syslog::write("NMEA Update: %s\n",camGPS.getGPGGA()->toString());
	  // send NMEA to camera
 0a60  89 d0                             mov     eax,edx
 0a62  e8 00 00 00 00                    call    GPGGA near * near BicamGPS::getGPGGA()
 0a67  8b 90 cc 05 00 00                 mov     edx,+5ccH[eax]
 0a6d  ff 52 04                          call    dword ptr +4H[edx]
 0a70  50                                push    eax
 0a71  68 5a 01 00 00                    push    offset L62
 0a76  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 0a7b  83 c4 08                          add     esp,00000008H

	  camGPS.writeNMEA();
	}
    }
  
  //
  // Check to see if a client has requested photos:
  //
 0a7e  8d 81 72 01 00 00 L29             lea     eax,+172H[ecx]
 0a84  e8 00 00 00 00                    call    int near BicamGPS::writeNMEA()

  _output->read();
  if( (_output->data.nPhotos || _output->data.onContinuously) 
 0a89  8b 41 62          L30             mov     eax,+62H[ecx]
 0a8c  e8 00 00 00 00                    call    void near CameraOutput::read()

       && (_output->data.cameraState == CameraIF::Ready)    ) 
    {
 0a91  8b 41 62                          mov     eax,+62H[ecx]
 0a94  83 78 28 00                       cmp     dword ptr +28H[eax],00000000H
 0a98  75 0a                             jne     L31
 0a9a  80 78 44 00                       cmp     byte ptr +44H[eax],00H
 0a9e  0f 84 e2 00 00 00                 je      L35
 0aa4  8b 41 62          L31             mov     eax,+62H[ecx]
 0aa7  83 78 24 00                       cmp     dword ptr +24H[eax],00000000H
 0aab  0f 85 d5 00 00 00                 jne     L35

       if(_output->data.nPhotos) 
 0ab1  8b 68 28                          mov     ebp,+28H[eax]
 0ab4  85 ed                             test    ebp,ebp
 0ab6  74 10                             je      L32

	  Syslog::write("CameraDriver::readData - starting a %d photo sequence.",
			_output->data.nPhotos);
       else
 0ab8  55                                push    ebp
 0ab9  68 6b 01 00 00                    push    offset L63
 0abe  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 0ac3  83 c4 08                          add     esp,00000008H
 0ac6  eb 0d                             jmp     L33

	  Syslog::write("CameraDriver::readData - Turning the camera on.");

      // Enable the strobes at the beginning of photo sequence
      // Delay ~ 2s after activation, before triggering
      // to allow strobes to charge.
      // Note that this must be done before running set to TRUE
      // to prevent the photo sequence to run
      // (There is probably a better place to define the start delay)
 0ac8  68 a2 01 00 00    L32             push    offset L64
 0acd  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 0ad2  83 c4 04                          add     esp,00000004H

      if(!_sim) strobeDisable.setActive();
 0ad5  80 b9 c1 0d 00 00 
       00                L33             cmp     byte ptr +0dc1H[ecx],00H
 0adc  75 0b                             jne     L34
 0ade  8d 81 5a 0d 00 00                 lea     eax,+0d5aH[ecx]
 0ae4  e8 00 00 00 00                    call    int near XPortGPIO::setActive()

      sleep(_strobeEnableStartDelaySec);

 0ae9  8b 81 82 0d 00 00 L34             mov     eax,+0d82H[ecx]
 0aef  e8 00 00 00 00                    call    sleep_

      _nPhotos        = _output->data.nPhotos;
 0af4  8b 41 62                          mov     eax,+62H[ecx]
 0af7  8b 40 28                          mov     eax,+28H[eax]
 0afa  89 81 86 0d 00 00                 mov     +0d86H[ecx],eax

      _nSamplePeriods = _output->data.nSamplePeriods;
 0b00  8b 41 62                          mov     eax,+62H[ecx]
 0b03  8b 40 30                          mov     eax,+30H[eax]
 0b06  89 81 8e 0d 00 00                 mov     +0d8eH[ecx],eax

      _distance       = _output->data.distance;
 0b0c  8b 41 62                          mov     eax,+62H[ecx]
 0b0f  8b 50 34                          mov     edx,+34H[eax]
 0b12  89 91 96 0d 00 00                 mov     +0d96H[ecx],edx
 0b18  8b 50 38                          mov     edx,+38H[eax]
 0b1b  89 91 9a 0d 00 00                 mov     +0d9aH[ecx],edx

      _first          = True;
 0b21  c6 81 9e 0d 00 00 
       01                                mov     byte ptr +0d9eH[ecx],01H

      _running        = True;
 0b28  c6 81 bf 0d 00 00 
       01                                mov     byte ptr +0dbfH[ecx],01H

      _output->data.cameraState = CameraIF::Busy;
 0b2f  8b 41 62                          mov     eax,+62H[ecx]
 0b32  c7 40 24 01 00 00 
       00                                mov     dword ptr +24H[eax],00000001H

      _xLast          = _position.x;
 0b39  8b 41 7a                          mov     eax,+7aH[ecx]
 0b3c  89 81 af 0d 00 00                 mov     +0dafH[ecx],eax
 0b42  8b 41 7e                          mov     eax,+7eH[ecx]
 0b45  89 81 b3 0d 00 00                 mov     +0db3H[ecx],eax

      _yLast          = _position.y;
 0b4b  8b 81 82 00 00 00                 mov     eax,+82H[ecx]
 0b51  89 81 b7 0d 00 00                 mov     +0db7H[ecx],eax
 0b57  8b 81 86 00 00 00                 mov     eax,+86H[ecx]
 0b5d  89 81 bb 0d 00 00                 mov     +0dbbH[ecx],eax

      _output->data.nSamplePeriods = 0;
 0b63  8b 41 62                          mov     eax,+62H[ecx]
 0b66  c7 40 30 00 00 00 
       00                                mov     dword ptr +30H[eax],00000000H

      _output->data.distance = 0.;
 0b6d  8b 41 62                          mov     eax,+62H[ecx]
 0b70  c7 40 34 00 00 00 
       00                                mov     dword ptr +34H[eax],00000000H
 0b77  c7 40 38 00 00 00 
       00                                mov     dword ptr +38H[eax],00000000H

      _output->write();
    }      

 0b7e  8b 41 62                          mov     eax,+62H[ecx]
 0b81  e8 00 00 00 00                    call    void near CameraOutput::write()

  if( !_running )
    {
      return;
    }

 0b86  80 b9 bf 0d 00 00 
       00                L35             cmp     byte ptr +0dbfH[ecx],00H
 0b8d  0f 84 5f 02 00 00                 je      L47

  if( _output->data.onContinuously ) _nPhotos = 2;
  
 0b93  8b 41 62                          mov     eax,+62H[ecx]
 0b96  80 78 44 00                       cmp     byte ptr +44H[eax],00H
 0b9a  74 0a                             je      L36
 0b9c  c7 81 86 0d 00 00 
       02 00 00 00                       mov     dword ptr +0d86H[ecx],00000002H

  time_t localtime = time(NULL);

 0ba6  31 c0             L36             xor     eax,eax
 0ba8  e8 00 00 00 00                    call    time_
 0bad  89 44 24 28                       mov     +28H[esp],eax

  if( _nSamplePeriods )
    {
 0bb1  8b 99 8e 0d 00 00                 mov     ebx,+0d8eH[ecx]
 0bb7  85 db                             test    ebx,ebx
 0bb9  0f 84 c4 00 00 00                 je      L41

      if( _nPhotos > 0 )
	{
 0bbf  83 b9 86 0d 00 00 
       00                                cmp     dword ptr +0d86H[ecx],00000000H
 0bc6  0f 8e 1f 02 00 00                 jle     L46

	  if( (_samplePeriodCntr % _nSamplePeriods) == 0 )
	    {
 0bcc  8b 91 92 0d 00 00                 mov     edx,+0d92H[ecx]
 0bd2  89 d0                             mov     eax,edx
 0bd4  c1 fa 1f                          sar     edx,1fH
 0bd7  f7 fb                             idiv    ebx
 0bd9  85 d2                             test    edx,edx
 0bdb  0f 85 97 00 00 00                 jne     L40

	      _nPhotos--;
 0be1  ff 89 86 0d 00 00                 dec     dword ptr +0d86H[ecx]

	      _photoCntr++;
 0be7  ff 81 8a 0d 00 00                 inc     dword ptr +0d8aH[ecx]

	      if( _nPhotos <= 0 ) 
		{
		  // disable strobes at end of photo sequence
 0bed  83 b9 86 0d 00 00 
       00                                cmp     dword ptr +0d86H[ecx],00000000H
 0bf4  7f 25                             jg      L38

		  if(!_sim) strobeDisable.setInactive();
 0bf6  80 b9 c1 0d 00 00 
       00                                cmp     byte ptr +0dc1H[ecx],00H
 0bfd  75 0b                             jne     L37
 0bff  8d 81 5a 0d 00 00                 lea     eax,+0d5aH[ecx]
 0c05  e8 00 00 00 00                    call    int near XPortGPIO::setInactive()

		  _running = False;
 0c0a  c6 81 bf 0d 00 00 
       00                L37             mov     byte ptr +0dbfH[ecx],00H

		  _output->data.cameraState = CameraIF::Ready;
		}
 0c11  8b 41 62                          mov     eax,+62H[ecx]
 0c14  c7 40 24 00 00 00 
       00                                mov     dword ptr +24H[eax],00000000H

	      _samplePeriodCntr = 0;
	      //
	      //   pulse() activates the
	      //   XPort GPIO pin(s) selected in the 
	      //   XPort constructor by turning them on, waiting, then 
	      //   turning them off again
 0c1b  c7 81 92 0d 00 00 
       00 00 00 00       L38             mov     dword ptr +0d92H[ecx],00000000H

	      if( !_sim ) 
		{
 0c25  80 b9 c1 0d 00 00 
       00                                cmp     byte ptr +0dc1H[ecx],00H
 0c2c  75 0b                             jne     L39

		  camTrigger.pulse();
		}

	      //
	      // It would be nice to somehow embed the photo number _photoCntr.
	      //
 0c2e  8d 81 32 0d 00 00                 lea     eax,+0d32H[ecx]
 0c34  e8 00 00 00 00                    call    int near XPortGPIO::pulse()

              Syslog::write("CameraDriver::Took a photo at %s", ctime(&localtime));
 0c39  8d 44 24 28       L39             lea     eax,+28H[esp]
 0c3d  e8 00 00 00 00                    call    ctime_
 0c42  50                                push    eax
 0c43  68 d2 01 00 00                    push    offset L65
 0c48  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 0c4d  83 c4 08                          add     esp,00000008H

	      _log->write();
 0c50  8b 41 5e                          mov     eax,+5eH[ecx]
 0c53  e8 00 00 00 00                    call    int near DataLogWriter::write()

	      _output->data.nPhotos = _nPhotos;
 0c58  8b 41 62                          mov     eax,+62H[ecx]
 0c5b  8b 91 86 0d 00 00                 mov     edx,+0d86H[ecx]
 0c61  89 50 28                          mov     +28H[eax],edx

	      _output->data.photoCntr = _photoCntr;
 0c64  8b 41 62                          mov     eax,+62H[ecx]
 0c67  8b 91 8a 0d 00 00                 mov     edx,+0d8aH[ecx]
 0c6d  89 50 2c                          mov     +2cH[eax],edx

	      _output->write();
	    }
 0c70  8b 41 62                          mov     eax,+62H[ecx]
 0c73  e8 00 00 00 00                    call    void near CameraOutput::write()

	  _samplePeriodCntr++;
 0c78  ff 81 92 0d 00 00 L40             inc     dword ptr +0d92H[ecx]

	}
    } 
  else  //_nSamplePeriods==0
    {
      double dx, dy;
      //
      // Take photos based on distance increment.
      //
 0c7e  e9 68 01 00 00                    jmp     L46

      if(_first) 
	{
 0c83  80 b9 9e 0d 00 00 
       00                L41             cmp     byte ptr +0d9eH[ecx],00H
 0c8a  74 18                             je      L42

	  _dmg = 0.0;
 0c8c  89 99 9f 0d 00 00                 mov     +0d9fH[ecx],ebx
 0c92  89 99 a3 0d 00 00                 mov     +0da3H[ecx],ebx

	  _dmgIncr = 0.0;
	}
 0c98  89 99 a7 0d 00 00                 mov     +0da7H[ecx],ebx
 0c9e  89 99 ab 0d 00 00                 mov     +0dabH[ecx],ebx

      dx = _position.x - _xLast;
 0ca4  dd 41 7a          L42             fld     qword ptr +7aH[ecx]
 0ca7  dc a1 af 0d 00 00                 fsub    qword ptr +0dafH[ecx]
 0cad  dd 1c 24                          fstp    qword ptr [esp]

      dy = _position.y - _yLast;
 0cb0  dd 81 82 00 00 00                 fld     qword ptr +82H[ecx]
 0cb6  dc a1 b7 0d 00 00                 fsub    qword ptr +0db7H[ecx]
 0cbc  dd 5c 24 20                       fstp    qword ptr +20H[esp]

      _xLast = _position.x;
 0cc0  8b 41 7a                          mov     eax,+7aH[ecx]
 0cc3  89 81 af 0d 00 00                 mov     +0dafH[ecx],eax
 0cc9  8b 41 7e                          mov     eax,+7eH[ecx]
 0ccc  89 81 b3 0d 00 00                 mov     +0db3H[ecx],eax

      _yLast = _position.y;
 0cd2  8b 81 82 00 00 00                 mov     eax,+82H[ecx]
 0cd8  89 81 b7 0d 00 00                 mov     +0db7H[ecx],eax
 0cde  8b 81 86 00 00 00                 mov     eax,+86H[ecx]
 0ce4  89 81 bb 0d 00 00                 mov     +0dbbH[ecx],eax

      _dmg += sqrt( dx*dx + dy*dy );
 0cea  dd 04 24                          fld     qword ptr [esp]
 0ced  d8 c8                             fmul    st,st(0)
 0cef  dd 5c 24 18                       fstp    qword ptr +18H[esp]
 0cf3  dd 44 24 20                       fld     qword ptr +20H[esp]
 0cf7  d8 c8                             fmul    st,st(0)
 0cf9  dc 44 24 18                       fadd    qword ptr +18H[esp]
 0cfd  e8 00 00 00 00                    call    IF@DSQRT
 0d02  dd 5c 24 18                       fstp    qword ptr +18H[esp]
 0d06  dd 81 9f 0d 00 00                 fld     qword ptr +0d9fH[ecx]
 0d0c  dc 44 24 18                       fadd    qword ptr +18H[esp]
 0d10  dd 99 9f 0d 00 00                 fstp    qword ptr +0d9fH[ecx]

      _dmgIncr += sqrt( dx*dx + dy*dy );

 0d16  dd 81 a7 0d 00 00                 fld     qword ptr +0da7H[ecx]
 0d1c  dc 44 24 18                       fadd    qword ptr +18H[esp]
 0d20  dd 91 a7 0d 00 00                 fst     qword ptr +0da7H[ecx]

      if( _dmgIncr >= _distance )
	{
 0d26  dc 99 96 0d 00 00                 fcomp   qword ptr +0d96H[ecx]
 0d2c  df e0                             fstsw   ax
 0d2e  9e                                sahf    
 0d2f  0f 82 b6 00 00 00                 jb      L46

	  _dmgIncr = 0.;
 0d35  c7 81 a7 0d 00 00 
       00 00 00 00                       mov     dword ptr +0da7H[ecx],00000000H
 0d3f  c7 81 ab 0d 00 00 
       00 00 00 00                       mov     dword ptr +0dabH[ecx],00000000H

	  _nPhotos--;
 0d49  ff 89 86 0d 00 00                 dec     dword ptr +0d86H[ecx]

	  _photoCntr++;
 0d4f  ff 81 8a 0d 00 00                 inc     dword ptr +0d8aH[ecx]

	  if( _nPhotos <= 0 ) 
	    {
	      // disable strobes at end of photo sequence
 0d55  83 b9 86 0d 00 00 
       00                                cmp     dword ptr +0d86H[ecx],00000000H
 0d5c  7f 25                             jg      L44

	      if(!_sim) strobeDisable.setInactive();
 0d5e  80 b9 c1 0d 00 00 
       00                                cmp     byte ptr +0dc1H[ecx],00H
 0d65  75 0b                             jne     L43
 0d67  8d 81 5a 0d 00 00                 lea     eax,+0d5aH[ecx]
 0d6d  e8 00 00 00 00                    call    int near XPortGPIO::setInactive()

	      _running = False;
 0d72  c6 81 bf 0d 00 00 
       00                L43             mov     byte ptr +0dbfH[ecx],00H

	      _output->data.cameraState = CameraIF::Ready;
	    }
	  //
	  // enable strobes and trigger camera
	  //
 0d79  8b 41 62                          mov     eax,+62H[ecx]
 0d7c  c7 40 24 00 00 00 
       00                                mov     dword ptr +24H[eax],00000000H

	  if( !_sim )
	    {
 0d83  80 b9 c1 0d 00 00 
       00                L44             cmp     byte ptr +0dc1H[ecx],00H
 0d8a  75 0b                             jne     L45

	      camTrigger.pulse();
	    }

	  //
	  // It would be nice to somehow embed the photo number _photoCntr.
	  //
 0d8c  8d 81 32 0d 00 00                 lea     eax,+0d32H[ecx]
 0d92  e8 00 00 00 00                    call    int near XPortGPIO::pulse()

	  Syslog::write("CameraDriver::Took a photo at %s.", ctime(&localtime));
 0d97  8d 44 24 28       L45             lea     eax,+28H[esp]
 0d9b  e8 00 00 00 00                    call    ctime_
 0da0  50                                push    eax
 0da1  68 f3 01 00 00                    push    offset L66
 0da6  e8 00 00 00 00                    call    void near Syslog::write( char const near *, ... )
 0dab  83 c4 08                          add     esp,00000008H

	  _log->write();
 0dae  8b 41 5e                          mov     eax,+5eH[ecx]
 0db1  e8 00 00 00 00                    call    int near DataLogWriter::write()

	  _output->data.nPhotos = _nPhotos;
 0db6  8b 41 62                          mov     eax,+62H[ecx]
 0db9  8b 91 86 0d 00 00                 mov     edx,+0d86H[ecx]
 0dbf  89 50 28                          mov     +28H[eax],edx

	  _output->data.photoCntr = _photoCntr;
 0dc2  8b 41 62                          mov     eax,+62H[ecx]
 0dc5  8b 91 8a 0d 00 00                 mov     edx,+0d8aH[ecx]
 0dcb  89 50 2c                          mov     +2cH[eax],edx

	  _output->data.dmg = _dmg;
 0dce  8b 41 62                          mov     eax,+62H[ecx]
 0dd1  8b 91 9f 0d 00 00                 mov     edx,+0d9fH[ecx]
 0dd7  89 50 3c                          mov     +3cH[eax],edx
 0dda  8b 91 a3 0d 00 00                 mov     edx,+0da3H[ecx]
 0de0  89 50 40                          mov     +40H[eax],edx

	  _output->write();
	}
    }
 0de3  8b 41 62                          mov     eax,+62H[ecx]
 0de6  e8 00 00 00 00                    call    void near CameraOutput::write()

  _first = False;
 0deb  c6 81 9e 0d 00 00 
       00                L46             mov     byte ptr +0d9eH[ecx],00H

}


 0df2  83 c4 2c          L47             add     esp,0000002cH
 0df5  5d                                pop     ebp
 0df6  5f                                pop     edi
 0df7  5e                                pop     esi
 0df8  5a                                pop     edx
 0df9  59                                pop     ecx
 0dfa  5b                                pop     ebx
 0dfb  c3                                ret     

No disassembly errors

------------------------------------------------------------

Segment: CONST  DWORD USE32  00000255 bytes  
 0000  63 61 6d 65 72 61 44 72 L48             - cameraDr
 0008  69 76 65 72 00                          - iver.
 000d  43 61 6d 65 72 61 3a 3a L49             - Camera::
 0015  20 47 6f 74 20 68 65 72                 -  Got her
 001d  65 21 0a 00                             - e!..
 0021  43 61 6d 65 72 61 44 72 L50             - CameraDr
 0029  69 76 65 72 3a 3a 20 5f                 - iver:: _
 0031  74 65 73 74 20 3d 20 25                 - test = %
 0039  64 00                                   - d.
 003b  43 61 6d 65 72 61 44 72 L51             - CameraDr
 0043  69 76 65 72 3a 3a 20 42                 - iver:: B
 004b  65 66 6f 72 65 20 6e 61                 - efore na
 0053  76 69 67 61 74 69 6f 6e                 - vigation
 005b  20 49 46 2e 00                          -  IF..
 0060  6e 61 76 69 67 61 74 69 L52             - navigati
 0068  6f 6e 00                                - on.
 006b  43 61 6d 65 72 61 44 72 L53             - CameraDr
 0073  69 76 65 72 20 2d 2d 20                 - iver -- 
 007b  43 61 75 67 68 74 20 65                 - Caught e
 0083  78 63 65 70 74 69 6f 6e                 - xception
 008b  3a 20 25 73 0a 00                       - : %s..
 0091  43 61 6d 65 72 61 44 72 L54             - CameraDr
 0099  69 76 65 72 20 2d 2d 20                 - iver -- 
 00a1  43 61 75 67 68 74 20 65                 - Caught e
 00a9  78 63 65 70 74 69 6f 6e                 - xception
 00b1  21 0a 00                                - !..
 00b4  67 65 74 74 69 6e 67 20 L55             - getting 
 00bc  68 6f 73 74 6e 61 6d 65                 - hostname
 00c4  00                                      - .
 00c5  3a 00                   L56             - :.
 00c7  67 6f 74 20 68 6f 73 74 L57             - got host
 00cf  6e 61 6d 65 3a 00                       - name:.
 00d5  43 61 6d 65 72 61 44 72 L58             - CameraDr
 00dd  69 76 65 72 20 64 69 73                 - iver dis
 00e5  61 62 6c 69 6e 67 20 31                 - abling 1
 00ed  32 56 20 63 61 6d 65 72                 - 2V camer
 00f5  61 20 70 6f 77 65 72 20                 - a power 
 00fd  73 75 70 70 6c 79 00                    - supply.
 0104  43 61 6d 65 72 61 44 72 L59             - CameraDr
 010c  69 76 65 72 20 65 6e 61                 - iver ena
 0114  62 6c 69 6e 67 20 6c 61                 - bling la
 011c  73 65 72 00                             - ser.
 0120  20 43 61 6d 65 72 61 44 L60             -  CameraD
 0128  65 73 74 72 75 63 74 6f                 - estructo
 0130  72 20 45 78 65 63 75 74                 - r Execut
 0138  69 6e 67 2e 00                          - ing..
 013d  73 68 75 74 74 69 6e 67 L61             - shutting
 0145  20 64 6f 77 6e 20 58 50                 -  down XP
 014d  6f 72 74 20 73 6f 63 6b                 - ort sock
 0155  65 74 73 0a 00                          - ets..
 015a  4e 4d 45 41 20 55 70 64 L62             - NMEA Upd
 0162  61 74 65 3a 20 25 73 0a                 - ate: %s.
 016a  00                                      - .
 016b  43 61 6d 65 72 61 44 72 L63             - CameraDr
 0173  69 76 65 72 3a 3a 72 65                 - iver::re
 017b  61 64 44 61 74 61 20 2d                 - adData -
 0183  20 73 74 61 72 74 69 6e                 -  startin
 018b  67 20 61 20 25 64 20 70                 - g a %d p
 0193  68 6f 74 6f 20 73 65 71                 - hoto seq
 019b  75 65 6e 63 65 2e 00                    - uence..
 01a2  43 61 6d 65 72 61 44 72 L64             - CameraDr
 01aa  69 76 65 72 3a 3a 72 65                 - iver::re
 01b2  61 64 44 61 74 61 20 2d                 - adData -
 01ba  20 54 75 72 6e 69 6e 67                 -  Turning
 01c2  20 74 68 65 20 63 61 6d                 -  the cam
 01ca  65 72 61 20 6f 6e 2e 00                 - era on..
 01d2  43 61 6d 65 72 61 44 72 L65             - CameraDr
 01da  69 76 65 72 3a 3a 54 6f                 - iver::To
 01e2  6f 6b 20 61 20 70 68 6f                 - ok a pho
 01ea  74 6f 20 61 74 20 25 73                 - to at %s
 01f2  00                                      - .
 01f3  43 61 6d 65 72 61 44 72 L66             - CameraDr
 01fb  69 76 65 72 3a 3a 54 6f                 - iver::To
 0203  6f 6b 20 61 20 70 68 6f                 - ok a pho
 020b  74 6f 20 61 74 20 25 73                 - to at %s
 0213  2e 00                                   - ..
 0215  9a 99 99 99 99 99 c9 3f L67             - .......?
 021d  fc a9 f1 d2 4d 62 50 3f L68             - ....MbP?
 0225  7b 14 ae 47 e1 7a 84 3f L69             - {..G.z.?
 022d  00 00 00 00 00 80 41 40 L70             - ......A@
 0235  00 00 00 00 00 40 60 40 L71             - .....@`@
 023d  00 00 00 00 00 00 24 40 L72             - ......$@
 0245  00 00 00 00 80 84 2e 41 L73             - .......A
 024d  9a 99 99 99 99 99 e9 3f L74             - .......?

No disassembly errors

------------------------------------------------------------

Segment: CONST2  PARA USE32  00000196 bytes  
 0000  00 00 00 00 00 00 00 00 L75             - ........
 0008  b8 00 00 00                             DD      DGROUP:L77
 000c  00 00 00 00                             - ....
 0010  c6 00 00 00                             DD      DGROUP:L78
 0014  00 00 00 00                             - ....
 0018  d4 00 00 00                             DD      DGROUP:L79
 001c  00 00 00 00                             - ....
 0020  e2 00 00 00                             DD      DGROUP:L80
 0024  00 00 00 00                             - ....
 0028  f0 00 00 00                             DD      DGROUP:L81
 002c  00 00 00 00                             - ....
 0030  fe 00 00 00                             DD      DGROUP:L82
 0034  00 00 00 00                             - ....
 0038  78 01 00 00                             DD      DGROUP:L91
 003c  00 00 00 00                             - ....
 0040  00 00 00 00                             DD      char unsigned const near __stattabcmd[]
 0044  00 00 00 00                             - ....
 0048  82 01 00 00                             DD      DGROUP:L92
 004c  00 00 00 00                             - ....
 0050  00 00 00 00                             DD      char unsigned const near __stattabcmd[]
 0054  00 00 00 00                             - ....
 0058  62 01 00 00                             DD      DGROUP:L90
 005c  00 00 00 00                             - ....
 0060  8c 01 00 00                             DD      DGROUP:L93
 0064  00 00 00 00                             - ....
 0068  00 00 00 00                             DD      char unsigned const near __stattabcmd[]
 006c  00 00 00 00                             - ....
 0070  60 01 00 00                             DD      DGROUP:L89
 0074  00 00 00 00                             - ....
 0078  00 00 00 00                             DD      char unsigned const near __stattabcmd[]
 007c  00 00 00 00                             - ....
 0080  60 01 00 00                             DD      DGROUP:L89
 0084  00 00 00 00 00 00 00 00 L76             - ........
 008c  0c 01 00 00                             DD      DGROUP:L83
 0090  00 00 00 00                             - ....
 0094  1a 01 00 00                             DD      DGROUP:L84
 0098  00 00 00 00                             - ....
 009c  28 01 00 00                             DD      DGROUP:L85
 00a0  00 00 00 00                             - ....
 00a4  36 01 00 00                             DD      DGROUP:L86
 00a8  00 00 00 00                             - ....
 00ac  44 01 00 00                             DD      DGROUP:L87
 00b0  00 00 00 00                             - ....
 00b4  52 01 00 00                             DD      DGROUP:L88
 00b8  07 00 18 00 00 00 00 00 L77             - ........
 00c0  00 00                                   - ..
 00c2  00 00 00 00                             DD      near PeriodicTask::~PeriodicTask()
 00c6  08 00 18 00 00 00 72 01 L78             - ......r.
 00ce  00 00                                   - ..
 00d0  00 00 00 00                             DD      near BicamGPS::~BicamGPS()
 00d4  08 00 18 00 00 00 32 0d L79             - ......2.
 00dc  00 00                                   - ..
 00de  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 00e2  08 00 18 00 00 00 46 0d L80             - ......F.
 00ea  00 00                                   - ..
 00ec  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 00f0  08 00 18 00 00 00 5a 0d L81             - ......Z.
 00f8  00 00                                   - ..
 00fa  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 00fe  08 00 18 00 00 00 6e 0d L82             - ......n.
 0106  00 00                                   - ..
 0108  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 010c  07 00 0c 00 00 00 00 00 L83             - ........
 0114  00 00                                   - ..
 0116  00 00 00 00                             DD      near PeriodicTask::~PeriodicTask()
 011a  08 00 0c 00 00 00 72 01 L84             - ......r.
 0122  00 00                                   - ..
 0124  00 00 00 00                             DD      near BicamGPS::~BicamGPS()
 0128  08 00 0c 00 00 00 32 0d L85             - ......2.
 0130  00 00                                   - ..
 0132  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 0136  08 00 0c 00 00 00 46 0d L86             - ......F.
 013e  00 00                                   - ..
 0140  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 0144  08 00 0c 00 00 00 5a 0d L87             - ......Z.
 014c  00 00                                   - ..
 014e  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 0152  08 00 0c 00 00 00 6e 0d L88             - ......n.
 015a  00 00                                   - ..
 015c  00 00 00 00                             DD      near XPortGPIO::~XPortGPIO()
 0160  03 00                   L89             - ..
 0162  02 00 cc ff ff ff 68 ff L90             - ......h.
 016a  ff ff 02 00 00 00                       - ......
 0170  00 00 00 00                             DD      char unsigned const near __typesig[]
 0174  00 00 00 00                             - ....
 0178  0a 00 60 00 00 00       L91             - ..`...
 017e  00 00 00 00                             DD      void near operator delete( void near * )
 0182  0a 00 60 00 00 00       L92             - ..`...
 0188  00 00 00 00                             DD      void near operator delete( void near * )
 018c  0a 00 60 00 00 00       L93             - ..`...
 0192  00 00 00 00                             DD      void near operator delete( void near * )

No disassembly errors

------------------------------------------------------------

Segment: _DATA  PARA USE32  000000d3 bytes  
 0000                          char near array_h_id[] LABEL BYTE
 0000  24 48 65 61 64 65 72 3a                 - $Header:
 0008  20 2f 68 6f 6d 65 2f 63                 -  /home/c
 0010  76 73 2f 61 75 76 2d 71                 - vs/auv-q
 0018  6e 78 2f 61 75 76 2f 61                 - nx/auv/a
 0020  6c 74 65 78 2f 6f 6e 62                 - ltex/onb
 0028  6f 61 72 64 2f 66 72 61                 - oard/fra
 0030  6d 65 77 6f 72 6b 2f 44                 - mework/D
 0038  79 6e 61 6d 69 63 41 72                 - ynamicAr
 0040  72 61 79 2e 68 2c 76 20                 - ray.h,v 
 0048  31 2e 34 20 32 30 30 37                 - 1.4 2007
 0050  2f 30 33 2f 31 36 20 32                 - /03/16 2
 0058  32 3a 35 34 3a 33 30 20                 - 2:54:30 
 0060  68 65 6e 74 68 6f 72 6e                 - henthorn
 0068  20 45 78 70 20 24 00 00                 -  Exp $..
 0070                          char near Math_h_id[] LABEL BYTE
 0070  24 48 65 61 64 65 72 3a                 - $Header:
 0078  20 2f 68 6f 6d 65 2f 63                 -  /home/c
 0080  76 73 2f 61 75 76 2d 71                 - vs/auv-q
 0088  6e 78 2f 61 75 76 2f 61                 - nx/auv/a
 0090  6c 74 65 78 2f 6f 6e 62                 - ltex/onb
 0098  6f 61 72 64 2f 75 74 69                 - oard/uti
 00a0  6c 73 2f 4d 61 74 68 50                 - ls/MathP
 00a8  2e 68 2c 76 20 31 2e 34                 - .h,v 1.4
 00b0  2e 32 2e 32 20 32 30 31                 - .2.2 201
 00b8  36 2f 31 30 2f 30 35 20                 - 6/10/05 
 00c0  31 38 3a 32 34 3a 32 33                 - 18:24:23
 00c8  20 72 6f 62 20 45 78 70                 -  rob Exp
 00d0  20 24 00                                -  $.

No disassembly errors

------------------------------------------------------------

Segment: _BSS  PARA USE32  0000000a bytes  

No disassembly errors

------------------------------------------------------------

Comdat: void (near * near Camera::__mbrptrthunk())()  SEGMENT ANY '_TEXT'  00000006 bytes  
 0000  b8 00 00 00 00                    mov     eax,offset void near Camera::readData()
 0005  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: istream near & near operator >>( istream near &, <long near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: istream near & near operator >>( istream near &, <int near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: void (near * const near __vftbl[])()  SEGMENT ANY 'DGROUP:CONST2'  00000018 bytes  
 0000  00 00 00 00                             DD      near Camera::~Camera()
 0004  00 00 00 00                             DD      void near PeriodicTask::run()
 0008  00 00 00 00                             DD      void near Task::processCommand( Task::Command near * )
 000c  00 00 00 00                             DD      int unsigned near Task::maxCommandBytes()
 0010  00 00 00 00                             DD      void near PeriodicTask::log( int )
 0014  00 00 00 00                             DD      void near PeriodicTask::startSampling()

No disassembly errors

------------------------------------------------------------

Comdat: char unsigned const near __stattabcmd[]  SEGMENT ANY 'DGROUP:CONST2'  00000006 bytes  
 0000  01 00 06 00 00 00                       - ......

No disassembly errors

------------------------------------------------------------

Comdat: char unsigned const near __typesig[]  SEGMENT ANY 'DGROUP:CONST2'  00000011 bytes  
 0000  00 00 00 00 00                          - .....
 0005  00 00 00 00                             DD      near SharedObject::Error::Error( SharedObject::Error const near & )
 0009  00 00 00 00                             DD      near SharedObject::Error::~Error()
 000d  64 00 00 00                             - d...

No disassembly errors

------------------------------------------------------------

Comdat: ostream near & near operator <<( ostream near &, <long near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: ostream near & near operator <<( ostream near &, <int near >::smanip const near & )  SEGMENT ANY '_TEXT'  00000021 bytes  
 0000  68 0c 00 00 00                    push    0000000cH
 0005  e8 00 00 00 00                    call    __CHK
 000a  53                                push    ebx
 000b  51                                push    ecx
 000c  89 c3                             mov     ebx,eax
 000e  89 d1                             mov     ecx,edx
 0010  8b 52 04                          mov     edx,+4H[edx]
 0013  8b 00                             mov     eax,[eax]
 0015  8b 40 04                          mov     eax,+4H[eax]
 0018  01 d8                             add     eax,ebx
 001a  ff 11                             call    dword ptr [ecx]
 001c  89 d8                             mov     eax,ebx
 001e  59                                pop     ecx
 001f  5b                                pop     ebx
 0020  c3                                ret     

No disassembly errors

------------------------------------------------------------

Comdat: char unsigned const near __typesig[]  SEGMENT ANY 'DGROUP:CONST2'  00000011 bytes  
 0000  00 00 00 00 00                          - .....
 0005  00 00 00 00                             DD      near Camera::Camera( Camera const near & )
 0009  00 00 00 00                             DD      near Camera::~Camera()
 000d  c2 0d 00 00                             - ....

No disassembly errors

------------------------------------------------------------
