Skip to content

Glider depth polynomial inverts below 2000m #344

@thomaszwagerman

Description

@thomaszwagerman

During development of #343 discovered an inconsistency in how the depth polynomial behaves for gliders.

In short, the depth scaling model in SlocumGlider can produce zero or negative battery consumption for bathymetry below -2000 m.

The depth polynomial is applied to negative elevation values, causing the linear model to cross zero and become negative.

Depth polynomial definition:

depth_coefficients = np.array([0.001, 2])
self.depth_polynomial = np.poly1d(depth_coefficients)

This corresponds to:

f(elevation) = 0.001 * elevation + 2

Used in:

battery = [
    bs * self.depth_polynomial(cellbox.agg_data["elevation"])
    for bs in battery_speed
]

Important to note that bathymetry is stored as negative elevation.

Which implies when solving for zero:

0.001e + 2 = 0
0.001e = -2
e = -2000

So at:

elevation = -2000

The depth multiplier becomes:

0.001 * (-2000) + 2 = 0

Below this depth:

elevation = -3000
0.001 * (-3000) + 2 = -1

This results in:

battery = bs * (-1)

ie we're producing negative battery consumption (we're charging the batteries below 2000m)

We should bind the model in some way so it cannot cross 0, or redefine the depth model in terms of positive dive depth rather than negative elevation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIt might be considered a bug...

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions