Merge branch 'dl9rdz:devel' into devel
This commit is contained in:
commit
dfb042eef4
|
|
@ -33,7 +33,8 @@ SondeHub integration has mainly been tested with RS41 and DFM.
|
||||||
|
|
||||||
|
|
||||||
Support for other radiosondes that use AFSK modulation is not feasible with the TTGO hardware.
|
Support for other radiosondes that use AFSK modulation is not feasible with the TTGO hardware.
|
||||||
In particular, decoding iMet radiosondes is not practical.
|
In particular, decoding iMet-1/iMet-4 radiosondes is not practical (iMet-5x seems to use FSK,
|
||||||
|
so should be feasible to implement).
|
||||||
|
|
||||||
Adding support for LMS6 (see issue #48) and ims100 (see branch ims100) could be feasible,
|
Adding support for LMS6 (see issue #48) and ims100 (see branch ims100) could be feasible,
|
||||||
but currently I don't have plans to do add this myself. Well-tested pull requests will of
|
but currently I don't have plans to do add this myself. Well-tested pull requests will of
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ headtxt = function(data,stat) {
|
||||||
var datetime = m.getUTCFullYear() + "-" + az(m.getUTCMonth()+1) + "-" + az(m.getUTCDate()) + "T" +
|
var datetime = m.getUTCFullYear() + "-" + az(m.getUTCMonth()+1) + "-" + az(m.getUTCDate()) + "T" +
|
||||||
az(m.getUTCHours()) + ":" + az(m.getUTCMinutes()) + ":" + az(m.getUTCSeconds()) + "Z";
|
az(m.getUTCHours()) + ":" + az(m.getUTCMinutes()) + ":" + az(m.getUTCSeconds()) + "Z";
|
||||||
var url = 'https://predict.cusf.co.uk/api/v1/';
|
var url = 'https://predict.cusf.co.uk/api/v1/';
|
||||||
url += '?launch_latitude='+data.lat + '&launch_longitude='+data.lon;
|
url += '?launch_latitude='+data.lat + '&launch_longitude='+fix_lon(data.lon);
|
||||||
url += '&launch_altitude='+data.alt + '&launch_datetime='+datetime;
|
url += '&launch_altitude='+data.alt + '&launch_datetime='+datetime;
|
||||||
url += '&ascent_rate='+ascent + '&burst_altitude=' + burst + '&descent_rate='+descent;
|
url += '&ascent_rate='+ascent + '&burst_altitude=' + burst + '&descent_rate='+descent;
|
||||||
|
|
||||||
|
|
@ -333,11 +333,11 @@ headtxt = function(data,stat) {
|
||||||
draw_predict = function(prediction,data) {
|
draw_predict = function(prediction,data) {
|
||||||
var ascending = prediction.prediction[0].trajectory;
|
var ascending = prediction.prediction[0].trajectory;
|
||||||
var highest = ascending[ascending.length-1];
|
var highest = ascending[ascending.length-1];
|
||||||
var highest_location = [highest.latitude,highest.longitude];
|
var highest_location = [highest.latitude,fix_lon(highest.longitude)];
|
||||||
|
|
||||||
var descending = prediction.prediction[1].trajectory;
|
var descending = prediction.prediction[1].trajectory;
|
||||||
var landing = descending[descending.length-1];
|
var landing = descending[descending.length-1];
|
||||||
var landing_location = [landing.latitude,landing.longitude];
|
var landing_location = [landing.latitude,fix_lon(landing.longitude)];
|
||||||
|
|
||||||
if (!marker_landing) {
|
if (!marker_landing) {
|
||||||
marker_landing = L.marker(landing_location,{icon: icon_landing}).addTo(map)
|
marker_landing = L.marker(landing_location,{icon: icon_landing}).addTo(map)
|
||||||
|
|
@ -353,7 +353,7 @@ headtxt = function(data,stat) {
|
||||||
dots_predict=[];
|
dots_predict=[];
|
||||||
|
|
||||||
if (data.climb > 0) {
|
if (data.climb > 0) {
|
||||||
ascending.forEach(p => dots_predict.push([p.latitude,p.longitude]));
|
ascending.forEach(p => dots_predict.push([p.latitude,fix_lon(p.longitude)]));
|
||||||
|
|
||||||
if (!marker_burst) {
|
if (!marker_burst) {
|
||||||
marker_burst = L.marker(highest_location,{icon:icon_burst}).addTo(map).bindPopup(poptxt('burst',highest),{closeOnClick:false, autoPan:false});
|
marker_burst = L.marker(highest_location,{icon:icon_burst}).addTo(map).bindPopup(poptxt('burst',highest),{closeOnClick:false, autoPan:false});
|
||||||
|
|
@ -365,7 +365,7 @@ headtxt = function(data,stat) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
descending.forEach(p => dots_predict.push([p.latitude,p.longitude]));
|
descending.forEach(p => dots_predict.push([p.latitude,fix_lon(p.longitude)]));
|
||||||
line_predict.setLatLngs(dots_predict);
|
line_predict.setLatLngs(dots_predict);
|
||||||
|
|
||||||
if (data.climb > 0) {
|
if (data.climb > 0) {
|
||||||
|
|
@ -378,6 +378,12 @@ headtxt = function(data,stat) {
|
||||||
clearTimeout(predictor);
|
clearTimeout(predictor);
|
||||||
predictor = setTimeout(function() {get_predict(last_data);}, predictor_time*1000);
|
predictor = setTimeout(function() {get_predict(last_data);}, predictor_time*1000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fix_lon = function(lon) {
|
||||||
|
if (lon > 180) { return lon - 360; }
|
||||||
|
if (lon < 0) { return lon + 360; }
|
||||||
|
return lon;
|
||||||
|
};
|
||||||
|
|
||||||
poptxt = function(t,i) {
|
poptxt = function(t,i) {
|
||||||
var lat_input = (i.id)?i.lat:i.latitude;
|
var lat_input = (i.id)?i.lat:i.latitude;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
const char *version_name = "rdzTTGOsonde";
|
const char *version_name = "rdzTTGOsonde";
|
||||||
const char *version_id = "devel20210817";
|
const char *version_id = "devel20210905";
|
||||||
const int SPIFFS_MAJOR=2;
|
const int SPIFFS_MAJOR=2;
|
||||||
const int SPIFFS_MINOR=14;
|
const int SPIFFS_MINOR=14;
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,11 @@ void Sonde::defaultConfig() {
|
||||||
#define BM8563_ADDRESS 0x51
|
#define BM8563_ADDRESS 0x51
|
||||||
Wire.beginTransmission(BM8563_ADDRESS);
|
Wire.beginTransmission(BM8563_ADDRESS);
|
||||||
byte err = Wire.endTransmission();
|
byte err = Wire.endTransmission();
|
||||||
|
if(err) { // try again
|
||||||
|
delay(400);
|
||||||
|
Wire.beginTransmission(BM8563_ADDRESS);
|
||||||
|
err = Wire.endTransmission();
|
||||||
|
}
|
||||||
if(err==0) {
|
if(err==0) {
|
||||||
Serial.println("M5stack Core2 board detected\n");
|
Serial.println("M5stack Core2 board detected\n");
|
||||||
config.type = TYPE_M5_CORE2;
|
config.type = TYPE_M5_CORE2;
|
||||||
|
|
@ -447,6 +452,10 @@ void Sonde::addSonde(float frequency, SondeType type, int active, char *launchsi
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Serial.printf("Adding %f - %d - %d - %s\n", frequency, type, active, launchsite);
|
Serial.printf("Adding %f - %d - %d - %s\n", frequency, type, active, launchsite);
|
||||||
|
// reset all data if type or frequency has changed
|
||||||
|
if(type != sondeList[nSonde].type || frequency != sondeList[nSonde].freq) {
|
||||||
|
memset(&sondeList[nSonde], 0, sizeof(SondeInfo));
|
||||||
|
}
|
||||||
sondeList[nSonde].type = type;
|
sondeList[nSonde].type = type;
|
||||||
sondeList[nSonde].typestr[0] = 0;
|
sondeList[nSonde].typestr[0] = 0;
|
||||||
sondeList[nSonde].freq = frequency;
|
sondeList[nSonde].freq = frequency;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue