#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # $Id: FormatNotes,v 1.1.2.1 2003/11/21 02:44:01 swift Exp $ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # RCS Log: # # $Log: FormatNotes,v $ # Revision 1.1.2.1 2003/11/21 02:44:01 swift # Added documentation of SBE41 status bits. Also documented format for ARG # data and status bits. # # Revision 1.1 2003/11/12 23:05:54 swift # Initial revision # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Format specification for APF9 ARG firmware revision 121103 =========================================================== Test Message Format: -------------------- Byte(s) Pneumonic Description ------------------------------------------------------------------------------ 0 CRC Message CRC computed with BathySystem's CRC generator. 1 MSG Message id. Test message blocks are allowed to span more than one message so a message id is required. 2 BLK Message block id. The block id increments with each transmitted message block with overflow at 0xff. 3,4 FLT Float id. 5,6 SEC The time [seconds] since the start of the mission prelude. 7,8 STATUS This word records the state of 16 status bits. Individual bits can be accessed with an appropriate bit-mask. 9,10 P Pressure [centibars] measured once each test-message block. 11 VAC Vacuum [counts] measured during self-test. 12 ABP Air bladder pressure [counts] measured once each test-message block. 13 BAT Quiescent battery voltage [counts] measured once each test-message block. 14 UP Mission configuration: up-time [TQuantum] modulo-256. 15,16 DOWN Mission configuration: down-time [TQuantum] modulo-65536. 17,18 PRKP Mission configuration: park pressure [decibars]. 19 PPP Mission configuration: park piston position [counts]. 20 NUDGE Mission configuration: buoyancy nudge for ascent maintenance [counts] (aka., depth correction factor). 21 EXT Mission configuration: piston full extension [counts]. 22 OK Mission configuration: internal vacuum threshold [counts] for mission abortion. (aka., OK-vacuum count). 23 ASCEND Mission configuration: ascent time-out period [TQuantum] modulo-256. 24 TBP Mission configuration: maximum air bladder pressure [counts]. 25,26 TP Mission configuration: target profile pressure [decibars]. 27 TPP Mission configuration: target profile piston position [counts]. 28 N Mission configuration: park & profile cycle length. 29 MON Firmware revision: month. 30 DAY Firmware revision: day. 31 YR Firmware revision: year. Data Message Format: -------------------- Message #1 ---------- Byte(s) Pneumonic Description ------------------------------------------------------------------------------ 0 CRC Message CRC computed with BathySystem's CRC generator. 1 MSG Message id. Test message blocks are allowed to span more than one message so a message id is required. 2 BLK Message block id. The block id increments with each transmitted message block with overflow at 0xff. 3,4 FLT Float id. 5 PRF Profile id modulo-256. 6 LEN Number of TSP samples in this message block. 7,8 STATUS This word records the state of 16 status bits. Individual bits can be accessed with an appropriate bit-mask. 9,10 SP The surface pressure [centibars] as recorded just prior to the descent to the park depth. 11 VAC The internal vacuum [counts] recorded when the park phase of the mission cycle terminated. 12 ABP The air bladder pressure [counts] recorded just after each argos transmission. 13 SPP The piston position [counts] recorded when the surface-detection algorithm terminated. 14 PPP2 The piston position [counts] recorded at time that the park phase of the mission cycle terminated. 15 PPP The piston position [counts] recorded at the time that the last deep-descent phase terminated. 16,17 SBE41 This word records the state of 16 status bits specifically related to the SBE41. Individual bits can be accessed with an appropriate bit-mask. 18,19 PMT The total length of time [seconds] that the pump motor ran during the current profile cycle. 20 VQ The quiescent battery voltage [counts] measured when the park phase of the profile cycle terminated. 21 IQ The quiescent battery current [counts] measured when the park phase of the profile cycle terminated. 22 VSBE The battery voltage [counts] measured when the SBE41 sampled after the park phase of the profile cycle terminated. 23 ISBE The battery current [counts] measured when the SBE41 sampled after the park phase of the profile cycle terminated. 24 VHPP The battery voltage [counts] measured just prior to then end of the initial extension of the buoyancy pump at the start of the profile phase of the profile cycle. 25 IHPP The battery current [counts] measured just prior to then end of the initial extension of the buoyancy pump at the start of the profile phase of the profile cycle. 26 VAP The battery voltage [counts] measured during the most recent period when the air pump was activated. 27 IAP The battery current [counts] measured during the most recent period when the air pump was activated. 28 NADJ The number of buoyancy adjustments during the park phase of the profile cycle. 29 ARG This byte records the 8 status bits specifically related to the ARG. Individual bits can be accessed with an appropriate bit-mask. 30,31 NARG The number of bytes in the ARG buffer. /* definition of the 'STATUS' bits in the engineering data above */ DeepPrf 0x0001 The current profile is a deep profile. 0x0002 Not used yet. Obs25Min 0x0004 Sample time-out (25 min) expired. PistonFullExt 0x0008 Piston fully extended before surface-detection algorithm terminated. AscentTimeOut 0x0010 Ascent time-out expired. TestMsg 0x0020 Current argos message is a test message. PreludeMsg 0x0040 Current argos message transmitted during mission prelude. BadSeqPnt 0x0080 Invalid sequence point detected. Sbe41PFail 0x0200 Sbe41(P) exception. Sbe41PtsFail 0x0400 Sbe41(PTS) exception. Sbe41PUnreliable 0x0800 Sbe41(P) unreliable. ArgFail 0x1000 ARG function failed. /* definition of the 'SBE41' status bits in the engineering data above */ Sbe41PedanticExceptn 0x0001 An exception was detected while parsing the p-only pedantic regex. Sbe41PedanticFail 0x0002 The SBE41 response to p-only measurement failed the pedantic regex. Sbe41RegexFail 0x0004 The SBE41 response to p-only measurement failed the nonpedantic regex. Sbe41NullArg 0x0008 NULL argument detected during p-only measurement. Sbe41RegExceptn 0x0010 An exception was detected while parsing the p-only nonpedantic regex. Sbe41NoResponse 0x0020 No response detected from SBE41 for p-only request. 0x0040 Not used yet. 0x0080 Not used yet. Sbe41PedanticExceptn 0x0100 An exception was detected while parsing the pts pedantic regex. Sbe41PedanticFail 0x0200 The SBE41 response to pts measurement failed the pedantic regex. Sbe41RegexFail 0x0400 The SBE41 response to pts measurement failed the nonpedantic regex. Sbe41NullArg 0x0800 NULL argument detected during pts measurement. Sbe41RegExceptn 0x1000 An exception was detected while parsing the pts nonpedantic regex. Sbe41NoResponse 0x2000 No response detected from SBE41 for pts request. 0x4000 Not used yet. 0x8000 Not used yet. /* definition of the 'ARG' status bits in the engineering data above */ ArgEmitFail 0x01 Attempt to query the ARG for data failed. ArgStopFail 0x02 Attempt to deactivate ARG's DAQ mode failed. ArgStartFail 0x04 Attempt to activate ARG's DAQ mode failed. ArgNoResponse 0x08 No response received from the ARG. ArgLoginFail 0x10 Attempt to login to the ARG failed. 0x20 Not used yet. 0x40 Not used yet. 0x80 Not used yet. Messages 2-N: ------------- The hydrographic data are transmitted in messages 2-N in the order that they were collected. The sample taken at the end of the park phase will be transmitted first (in message 2) followed by the samples collected during the profile phase. Each sample consists of 6 bytes in order of T (2 bytes), S (2 bytes), P (2 bytes). The hydrographic data are encoded as shown in the C-source code below. If the number of ARG data bytes is greater than zero then the ARG data are written into the argos stream immediately after the hydrographic data. The ARG portion of the data stream starts with the time when the ARG's DAQ mode was activated. This time is represented as the number of seconds since Jan 1, 1970 at 00:00:00GMT and is stored as 4 bytes starting with the most significant byte. The NARG bytes of ARG data come next in the argos data stream. Refer to Jeff Nystuen's documentation for how the ARG data are encoded. Message N: Auxiliary Engineering data ------------------------------------- The last message is filled out with auxiliary engineering data. This is engineering data that is of a lower priority that the engineering data transmitted in message 1. The amount of engineering data will be variable and only enough to complete the last message (at most). The auxiliary engineering data will never cause an additional message to be generated. If the auxiliary engineering data are not sufficient to complete the last message then the remaining unused bytes will be set to 0xff. Measuring descent rate: The only auxiliary data transmitted in this firmware revision are the descent pressure marks. During the park-descent phase, the pressure is measured just after the piston has been retracted; this is the first descent mark. In addition, at hourly intervals after initiation of the park-descent phase, the pressure is measured. These measurements mark the descent and can be used to determine the descent rate as a function of time. The first byte beyond the end of the hydrographic data is the count of the number of descent pressure marks. This byte is followed by 1-byte pressures (bars) marking the descent phase. /*------------------------------------------------------------------------*/ /* function to encode pressure as a 2-byte unsigned integer */ /*------------------------------------------------------------------------*/ /** This function implements the hex-encoding of IEEE-formattted floating point pressure data into 16-bit unsigned integers with 2's complement representation. The encoding formula accounts for the full range of 32-bit IEEE floating point values but only values in the open range: -3276.7=3276.7) P=0x7fff; else if (p<=-3276.7) P=0x8001; /* encode the pressure as the number of centibars (rounded) */ else P = (unsigned int)(10*(p + ((p<0) ? -0.05 : 0.05))); /* -0.15=61.439) S=0xefff; else if (s<=-4.095) S=0xf001; /* encode the salinity as the number of PPM (rounded) */ else S = (unsigned int)(1000*(s + ((s<0) ? -0.0005 : 0.0005))); /* -0.0015=61.439) T=0xefff; else if (t<=-4.095) T=0xf001; /* encode the temperature as the number of millidegrees (rounded) */ else T = (unsigned int)(1000*(t + ((t<0) ? -0.0005 : 0.0005))); /* -0.0015