Skip to main content

to_json

Function to_json 

Source
pub fn to_json(resource: &PolarResource) -> Value
Expand description

Writes one polar resource back out in Signal K’s own shape, suitable for a PUT to performance.polars.<id> or performance.activePolarData.

optimalBeats/optimalGybes are filled in from [Polar::best_upwind_angle_deg]/[Polar::best_downwind_angle_deg] – computed here rather than carried on PolarResource itself, since they are a function of the table, never a second, independently stated fact that could drift from it.