kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
commit
15e53d9e1e
|
@ -51,6 +51,7 @@ auto_rx/imet4iq
|
|||
auto_rx/imet54mod
|
||||
auto_rx/mXXmod
|
||||
auto_rx/mp3h1mod
|
||||
auto_rx/mts01mod
|
||||
|
||||
m10
|
||||
meisei100mod
|
||||
|
|
|
@ -26,7 +26,7 @@ Intermet Systems | iMet-54 | :heavy_check_mark: | :heavy_check_mark: | :heavy_ch
|
|||
Lockheed Martin | LMS6-400/1680 | :heavy_check_mark: | :x: | :x: | :x: | Not Sent
|
||||
Meisei | iMS-100 | :heavy_check_mark: | :x: | :x: | :x: | Not Sent
|
||||
Meteo-Radiy | MRZ-H1 (400 MHz) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | Not Sent
|
||||
Meteosis | MTS01 | :heavy_check_mark: | :x: | :x: | :x: | Not Sent
|
||||
Meteosis | MTS01 | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | Not Sent
|
||||
|
||||
Support for other radiosondes may be added as required - please send us sondes to test with! If you have any information about telemetry formats, we'd love to hear from you (see our contact details below).
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ from queue import Queue
|
|||
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
|
||||
# PATCH - Small changes, or minor feature additions.
|
||||
|
||||
__version__ = "1.6.0-beta20"
|
||||
__version__ = "1.6.0-beta21"
|
||||
|
||||
|
||||
# Global Variables
|
||||
|
|
|
@ -141,7 +141,7 @@ def strip_sonde_serial(serial):
|
|||
""" Strip off any leading sonde type that may be present in a serial number """
|
||||
|
||||
# Look for serials with prefixes matching the following known sonde types.
|
||||
_re = re.compile("^(DFM|M10|M20|IMET|IMET5|IMET54|MRZ|LMS6|IMS100|MTS01)-")
|
||||
_re = re.compile("^(DFM|M10|M20|IMET|IMET5|IMET54|MRZ|LMS6|IMS100|RS11G|MTS01)-")
|
||||
|
||||
# If we have a match, return the trailing part of the serial, re-adding
|
||||
# any - separators if they exist.
|
||||
|
|
|
@ -143,6 +143,10 @@ always_decode = []
|
|||
# Lat/Lon in decimal degrees, altitude in metres.
|
||||
# Note: You do not need to specify your home station accurately if you don't want to!
|
||||
# Feel free to use a position somewhere near your general area, that doesn't identify your home location.
|
||||
#
|
||||
# If this is a mobile or portable station, it is recommended to leave this at 0.0, and disable
|
||||
# 'upload_listener_position' in the section below. Mobile station positions should be uploaded using
|
||||
# ChaseMapper.
|
||||
[location]
|
||||
station_lat = 0.0
|
||||
station_lon = 0.0
|
||||
|
@ -151,8 +155,9 @@ station_alt = 0.0
|
|||
# Station Position from GPSD
|
||||
# If your station is likely to move, then you may wish to have your station position updated from GPSD.
|
||||
# NOTE: This feature is intended to make life slightly easier when using an auto_rx station in a portable
|
||||
# capacity, in particular when using a rotator. For the web interface to start up correctly, a lat/lon still
|
||||
# needs to be entered above.
|
||||
# capacity, in particular when using a rotator. It is *not* intended for uploading positions of mobile
|
||||
# chase-cars.
|
||||
# For the web interface to start up correctly, a lat/lon still needs to be entered above.
|
||||
# If you are operating a stationary auto_rx station, please just set a fixed position above rather than using GPSD.
|
||||
#
|
||||
# If you are doing mobile balloon chasing, please use chasemapper ( https://github.com/projecthorus/chasemapper )
|
||||
|
@ -174,10 +179,14 @@ gpsd_port = 2947
|
|||
[habitat]
|
||||
|
||||
# Uploader callsign. PLEASE CHANGE THIS TO SOMETHING UNIQUE.
|
||||
uploader_callsign = CHANGEME_AUTO_RX
|
||||
# If using ChaseMapper to upload mobile station positions, ensure this callsign
|
||||
# is set identically to that set in ChaseMapper.
|
||||
uploader_callsign = CHANGEME
|
||||
|
||||
# Upload listener position to Sondehub? (So you show up on the map)
|
||||
# Note that if GPSD is used, this is overriden and enabled.
|
||||
# If this is a mobile or portable station, it is recommended to set this to False.
|
||||
# Mobile stations should use ChaseMapper or the SondeHub Tracker to upload positions.
|
||||
upload_listener_position = True
|
||||
|
||||
# Uploader Antenna Description.
|
||||
|
|
|
@ -144,6 +144,10 @@ always_decode = []
|
|||
# Lat/Lon in decimal degrees, altitude in metres.
|
||||
# Note: You do not need to specify your home station accurately if you don't want to!
|
||||
# Feel free to use a position somewhere near your general area, that doesn't identify your home location.
|
||||
#
|
||||
# If this is a mobile or portable station, it is recommended to leave this at 0.0, and disable
|
||||
# 'upload_listener_position' in the section below. Mobile station positions should be uploaded using
|
||||
# ChaseMapper.
|
||||
[location]
|
||||
station_lat = 0.0
|
||||
station_lon = 0.0
|
||||
|
@ -152,8 +156,9 @@ station_alt = 0.0
|
|||
# Station Position from GPSD
|
||||
# If your station is likely to move, then you may wish to have your station position updated from GPSD.
|
||||
# NOTE: This feature is intended to make life slightly easier when using an auto_rx station in a portable
|
||||
# capacity, in particular when using a rotator. For the web interface to start up correctly, a lat/lon still
|
||||
# needs to be entered above.
|
||||
# capacity, in particular when using a rotator. It is *not* intended for uploading positions of mobile
|
||||
# chase-cars.
|
||||
# For the web interface to start up correctly, a lat/lon still needs to be entered above.
|
||||
# If you are operating a stationary auto_rx station, please just set a fixed position above rather than using GPSD.
|
||||
#
|
||||
# If you are doing mobile balloon chasing, please use chasemapper ( https://github.com/projecthorus/chasemapper )
|
||||
|
@ -175,10 +180,14 @@ gpsd_port = 2947
|
|||
[habitat]
|
||||
|
||||
# Uploader callsign. PLEASE CHANGE THIS TO SOMETHING UNIQUE.
|
||||
uploader_callsign = CHANGEME_AUTO_RX
|
||||
# If using ChaseMapper to upload mobile station positions, ensure this callsign
|
||||
# is set identically to that set in ChaseMapper.
|
||||
uploader_callsign = CHANGEME
|
||||
|
||||
# Upload listener position to Sondehub? (So you show up on the map)
|
||||
# Note that if GPSD is used, this is overriden and enabled.
|
||||
# If this is a mobile or portable station, it is recommended to set this to False.
|
||||
# Mobile stations should use ChaseMapper or the SondeHub Tracker to upload positions.
|
||||
upload_listener_position = True
|
||||
|
||||
# Uploader Antenna Description.
|
||||
|
|
|
@ -800,7 +800,7 @@ static int conf_out(gpx_t *gpx, ui8_t *conf_bits, int ec) {
|
|||
}
|
||||
|
||||
|
||||
if (conf_id >= 0 && conf_id <= 8) {
|
||||
if (conf_id >= 0 && conf_id <= 8 && ec == 0) {
|
||||
gpx->cfgchk24[conf_id] = 1;
|
||||
val = bits2val(conf_bits+4, 4*6);
|
||||
gpx->val24[conf_id] = val;
|
||||
|
@ -822,8 +822,8 @@ static int conf_out(gpx_t *gpx, ui8_t *conf_bits, int ec) {
|
|||
gpx->Rf = 220e3;
|
||||
if (gpx->cfgchk)
|
||||
{ // 0xC: "P+" DFM-09P , "T-" DFM-17TU ; 0xD: "P-" DFM-17P ?
|
||||
if (gpx->ptu_out >= 0xD || (gpx->ptu_out >= 0xC && gpx->meas24[6] < 220e3)) { // gpx->meas24[6] < 220e3 <=> gpx->meas24[0] > 1e6 ?
|
||||
gpx->sensortyp = 'P'; // gpx->meas24[0] > 1e6 ?
|
||||
if (gpx->ptu_out >= 0xD || (gpx->ptu_out >= 0xC && gpx->meas24[6] < 220e3)) { // gpx->meas24[6] < 220e3 <=> gpx->meas24[0] > 2e5 ?
|
||||
gpx->sensortyp = 'P'; // gpx->meas24[0] > 2e5 ?
|
||||
}
|
||||
if ( ((gpx->ptu_out == 0xB || gpx->ptu_out == 0xC) && gpx->sensortyp == 'T') || gpx->ptu_out >= 0xD) gpx->Rf = 332e3; // DFM-17 ?
|
||||
|
||||
|
|
|
@ -61,6 +61,9 @@ typedef struct {
|
|||
int year; int month; int day;
|
||||
int hrs; int min; int sec;
|
||||
double lat; double lon; double alt;
|
||||
double vH; double vD;
|
||||
float T; float RH;
|
||||
int batt;
|
||||
char ID[8+4];
|
||||
ui8_t frame_bytes[FRAMELEN+4];
|
||||
char frame_bits[BITFRAMELEN+8];
|
||||
|
@ -133,6 +136,18 @@ static int fn(gpx_t *gpx, int n) {
|
|||
return pos;
|
||||
}
|
||||
|
||||
static float get_Temp(float R) {
|
||||
// Thermistor approximation
|
||||
// 1/T = 1/To + 1/B log(r) , r=R/Ro
|
||||
float B0 = 3000.0; // B/Kelvin
|
||||
float T0 = 0.0 + 273.15;
|
||||
float R0 = 15.0;
|
||||
float T = 0; // T/Kelvin
|
||||
if (R > 0) T = 1.0/(1.0/T0 + 1.0/B0 * log(R/R0));
|
||||
return T - 273.15; // Celsius
|
||||
}
|
||||
|
||||
|
||||
static int print_frame(gpx_t *gpx, int pos) {
|
||||
int i, j;
|
||||
int crcdat, crcval, crc_ok;
|
||||
|
@ -195,6 +210,9 @@ static int print_frame(gpx_t *gpx, int pos) {
|
|||
gpx->month = atoi(datetime_str+ 2); datetime_str[ 2] = '\0';
|
||||
gpx->year = atoi(datetime_str) + 2000;
|
||||
|
||||
int pos_BATT = fn(gpx, 4);
|
||||
gpx->batt = atof(gpx->frm_str+pos_BATT);
|
||||
|
||||
int pos_LAT = fn(gpx, 5);
|
||||
gpx->lat = atof(gpx->frm_str+pos_LAT);
|
||||
|
||||
|
@ -204,12 +222,28 @@ static int print_frame(gpx_t *gpx, int pos) {
|
|||
int pos_ALT = fn(gpx, 7);
|
||||
gpx->alt = atof(gpx->frm_str+pos_ALT);
|
||||
|
||||
int pos_VD = fn(gpx, 8); // 0..360 Heading
|
||||
gpx->vD = atof(gpx->frm_str+pos_VD);
|
||||
|
||||
int pos_VH = fn(gpx, 9); // m/s vH
|
||||
gpx->vH = atof(gpx->frm_str+pos_VH);
|
||||
|
||||
int pos_rawT1 = fn(gpx, 11);
|
||||
int pos_rawT2 = fn(gpx, 12);
|
||||
int pos_rawRH = fn(gpx, 13);
|
||||
|
||||
gpx->T = get_Temp(atof(gpx->frm_str+pos_rawT1)); // rawT1==rawT2
|
||||
|
||||
|
||||
if (gpx->option.vbs) {
|
||||
printf(" [%4d] ", gpx->frnr);
|
||||
printf(" (%s) ", gpx->ID);
|
||||
printf(" %4d-%02d-%02d ", gpx->year, gpx->month, gpx->day);
|
||||
printf("%02d:%02d:%02d ", gpx->hrs, gpx->min, gpx->sec);
|
||||
printf(" lat: %.6f lon: %.6f alt: %.0f ", gpx->lat, gpx->lon, gpx->alt);
|
||||
printf(" vH: %4.1f D: %5.1f ", gpx->vH, gpx->vD);
|
||||
printf(" Vbat:%.1fV ", gpx->batt/1000.0);
|
||||
if (gpx->T > -270.0f) printf(" T=%.1fC ", gpx->T);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
@ -218,8 +252,10 @@ static int print_frame(gpx_t *gpx, int pos) {
|
|||
// UTC oder GPS?
|
||||
char *ver_jsn = NULL;
|
||||
printf("{ \"type\": \"%s\"", "MTS01");
|
||||
printf(", \"frame\": %d, \"id\": \"MTS01-%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f",
|
||||
gpx->frnr, gpx->ID, gpx->year, gpx->month, gpx->day, gpx->hrs, gpx->min, (float)gpx->sec, gpx->lat, gpx->lon, gpx->alt );
|
||||
printf(", \"frame\": %d, \"id\": \"MTS01-%s\", \"datetime\": \"%04d-%02d-%02dT%02d:%02d:%06.3fZ\", \"lat\": %.5f, \"lon\": %.5f, \"alt\": %.5f, \"vel_h\": %.5f, \"heading\": %.5f",
|
||||
gpx->frnr, gpx->ID, gpx->year, gpx->month, gpx->day, gpx->hrs, gpx->min, (float)gpx->sec, gpx->lat, gpx->lon, gpx->alt, gpx->vH, gpx->vD );
|
||||
printf(", \"batt\": %.2f", gpx->batt/1000.0);
|
||||
if (gpx->T > -270.0f) printf(", \"temp\": %.1f", gpx->T);
|
||||
if (gpx->jsn_freq > 0) {
|
||||
printf(", \"freq\": %d", gpx->jsn_freq);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue