we don't just imagine things, we make them!
red line
English Chinese SUPPORT . Prices . BUY . TCS HOME


TCS-AWS packet description. Same format for SMS or GPRS packet.

The TCS Automatic Weather Station can send an automatic message every si (sampling interval) that can be programmed from 2 to 60 minutes. The message can be sent as an SMS, that can be routed to an e-mail address by most operators, or can be sent as an UDP packet in GPRS to an addess and port, that can be programmed also via SMS.
It is also possible, with the logging option, to store data locally into a flash eprom and retrieve them later placing a data call. This is very convenient to obtain detailed logs with sampling intervals as accurate as 2 minutes, to evaluate climate changes. data can be gathered once a day and stored on a PC for later analysis.
If you want to see a real file of a short period, with sampling interval 2 minutes, you can download it, it is called log_flash_2min.xls , try it and see the vast amount of data it may provides to develop applications with a network of weather stations.

Packet format
To simplify things we have used the well know NMEA format, normally used in GPS systems. A NMEA packet (or sentence) starts with an header that identifies the manufacturer and the type of sentence, in this case it is $DPTAW.
Variables are then sent as ASCII codes separated by a comma. This system has the advantage of being readable also by a spreadsheet, like Excel.
The NMEA sentence is terminated by an asterisk and a 2 byte checksum. Please see the bottom of this page for detaisl about calculating the checksum.
The variables listed below are all included in the sentence, in the order in which they appear in the list. A void is included with 2 commas (no data between commas).
Here is an example of a TCS-AWS packet ( in NMEA 183 format) as it is sent either by SMS or GPRS:
$DPTAW,2002/12/09,19:10,TCSMETEO_1,558,2,23,0,23,23,23,,85,0,,20,20,21,,0.0,0.0,0.0,,,,B,12.5,*06

Variable name Variable description Variable range Variable example
header Header of each line that identifies how the line is built. (DPTAW means DpsPromaTic Automatic Weather) 6 alphanumeric characters $DPTAW
yyyy/mm/dd date in Year/month/day format 4 digits for year value, 2 digits for month and day 2002/12/08
hh:mm Time in hour and minute format (24 Hours) 2 digits (00-24) for hours and 2 digits (00-59) for minutes 16:30
id TCS board identifier. It consists in 10 alphanumeric characters that identify the TCS unit and can be programmed using the #MHD command. Alphanumeric characters TCSMETEO_1
smsc SMS serial number. It is the current serial number of the SMSs sent by the TCs board. It can be programmed using the #MHD command. decimal number(s) from 1 to 9999. 558
si Sampling Interval. Interval at which data are aggregated and evaluated from the 1 second basic samples. This is also the interval at which SMS or GPRS packets are sent. decimal number(s) from 2 to 60, 1 or 2 digits. 10
was Wind average speed detected every second during interval si decimal number(s) from 0 to 255, 1 to 3 digits. 40
wssd Wind speed standard deviation during sampling interval. 0 means constant speed, the greater the number the greater the speed variability during the interval si decimal number(s) from 0 to 255, 1 to 3 digits 5
wmins Minimum Wind Speed detected during the interval si decimal number(s) from 0 to 255, 1 to 3 digits 0
wgust Wind Gust ( 3 seconds gust as per WMO definition) detected every second during the interval si decimal number(s) from 0 to 255, 1 to 3 digits 75
dwgust Daily Wind Gust ( 3 seconds gust as per WMO definition) detected during the day (from midnight) decimal number(s) from 0 to 255, 1 to 3 digits 48
void reserved for future use    
wdir Wind direction in degrees. 0=Nord,90=East,180=South,270=West. Division 5 degrees. Wind average is computed according to wind vectors strength. Average of data acquired every second during interval si decimal numbers from 0 to 355 180
wdsd Wind direction standard deviation. 0 means very stable direction. The bigger the number the higher the instability of direction. decimal numbers from 0 to 125 10
void1 reserved for future use    
temp Average of temperature values acquired every second during interval si decimal values from -20 to 60. 0 has no sign. -5,0,18
dmintemp Minimum temperature value detected during the day (from midnight) decimal values from -20 to 60. 0 has no sign. -5,0,18
dmaxtemp Maximum teperature value detected during the day (from midnight) decimal values from -20 to 60. 0 has no sign. -5,0,18
void2 reserved for future use    
rf Rain fall value accumulated during interval si values in 0.2 mm steps 0.0 or 2.4 or 15.6 etc.
drf Daily rain fall amount (from midnight) values in 0.2 mm steps 0.0 or 2.4 or 15.6 etc.
24rf Last 24 hours rain fall amount. values in 0.2 mm steps 0.0 or 2.4 or 15.6 etc.
void3 reserved for future use    
rh Average of Relative Humidity values acquired every second during interval si.
These data may be not available on all versions.
Decimal values from 0 to 100 15 or 45 or 80 etc.
dminrh Minimum Relative Humidity value detected during the day (from midnight).
These data may be not available on all versions.
Decimal values from 0 to 100 15 or 45 or 80 etc.
dmaxrh Maximum Relative Humidity value detected during the day (from midnight).
These data may be not available on all versions.
Decimal values from 0 to 100 15 or 45 or 80 etc.
pwtype Type of power supply. E= External (usually a Solar Panel). B=Battery 1 alphanumeric character. Usually E or B. B
battvolt Voltage of the stand-by battery Decimal values from 0.0 to 99.9 12.5
checksum Checksum of log line. A. The checksum is the 8-bit exclusive OR (no start or stop bits) of all characters in the sentence, including the "," delimiters, between -- but not including -- the "$" and "*" delimiters. See below for more details. * (star) sign, followed by 2 decimal numbers *06


Example of TCS-AWS packet sent either by SMS or GPRS:

$DPTAW,2002/12/09,19:10,METEO01,2,23,0,23,23,23,,85,0,,20,20,21,,0.0,0.0,0.0 ,,,*06

Q. How is the checksum calculated in NMEA 0183?
A. The checksum is the 8-bit exclusive OR (no start or stop bits) of all characters in the sentence, including the "," delimiters, between -- but not including -- the "$" and "*" delimiters.
The hexadecimal value of the most significant and least significant 4 bits of the result are converted to two ASCII characters (0-9, A-F) for transmission. The most significant character is transmitted first.
Below is the Visual Basic code to calculate the checksum value for the NMEA sentence
Private Function GetChecksum(ByRef sInString As String) As String
Dim lCurrent&, lLast&
On Error Resume Next
'-- We don't use the $ in the checksum
If Mid$(sInString, 1, 1) = "$" Then
sInString = Mid$(sInString, 2)
End If
'-- Get the ASC of the first Char
lLast& = Asc(Mid$(sInString, 1, 1))
'-- Use a loop to Xor through the string
For lCurrent& = 2 To Len(sInString)
lLast& = lLast& Xor Asc(Mid$(sInString, lCurrent&, 1))
Next
'-- Pass the data back as a string
GetChecksum = CStr(Hex(lLast&))
End Function

Example in C

char cNMEA_Checksum(char *st){
char sum = 0;
int i;


i = strlen(++st) - 1; //Skip '$' e '*'


while(i){
sum ^= *st++;
i--;
}

return sum;
}
 
made in italy with love 
	by dps-promatic
 ©2001 DPS-Promatic srl
 (Copyright & privacy)
 Last modified:2008/03/11:19:48:48
DPS-Promatic srl - via Edison 21, 47100 Forlì, Italy 
P.I. 01519970402 Fax+39-0543-725274
Contact us... 
991