Closed HadjerSahariYassir closed 1 year ago
Hi hadjersh97,
This is an exciting but challenging issue.
It's a problem of the calculation algorithm. Within the function saturationHMRByTempAndPres
the saturation vapour pressure is calculated at the passed temperature. The used calculation is not able to compute the low values in the yellow area accurately. Accordingly, you would have to create your own, more accurate computation for the humidity mixing ratio so that you can move the line in the yellow area.
The much simpler case is hiding the hodograph. There's a constructor option for this.
new ThermodynamicDiagram({
…
hodograph: {
visible: false
}
…
});
I found a more accurate computation, the Buck equation. (see Wikipedia)
const T = tempKelvinToCelsius(p.diagramTmpk)
const eWater = 0.61121 * Math.exp((18.678 - T/234.5) * (T/(257.14+T))) * 10;
const hmr = 621.97*eWater/(p.diagramPres - eWater);
But you will see that in the upper left corner the equation is not accurate either. The line is not drawn exactly at the cursor.
Hi chird,
Yes in the upper left corner, the line is not drawn exactly at the cursor. but i can keep it like that.
For the second issue which is hodograph , it works once , but i need to update hodograph visibility according to the user (checkbox) , Enable/disable , i didn't find function similar to update of sounding ?
Also please , i still have a task to zoom the ThermodinamicDiagram so it is possible ? Thanks so much!
Hi ,
I found your old questions. Sorry for my late reply.
You can just set the visible
property of the Hodograph. If your basic ThermodynamicDiagram
object is diagram
, you can just use:
diagram.hodograph.visible = false;
See my answer in #74
Cheers
Hi Chird, hope you're doing well. I have an issue with mixingRation line when i move the line it is stopped at the left boundry the line can't be moved in the yellow zone, i didn't find where is the mistake , as shown in the next picture.![image](https://user-images.githubusercontent.com/75619237/207550398-840eb247-61b3-4a80-98d5-1305a89d1205.png)
And here is the code
and if possible also is there a way to disable all the hodographe svg![image](https://user-images.githubusercontent.com/75619237/207551357-04da28c3-2437-40d8-a488-c15e9e14f31b.png)
And Thanks a lot Cheers