ioos / ioos_qc

:ballot_box_with_check: :ocean: IOOS QARTOD and other Quality Control tests implemented in Python
https://ioos.github.io/ioos_qc/
Apache License 2.0
46 stars 27 forks source link

Add an optional range from target test to the location_test #47

Open JessyBarrette opened 3 years ago

JessyBarrette commented 3 years ago

The location_test as of now tests the distance between successive positions which is a good test for a trajectory dataset like a glider or an Argo float. This is however limited regarding testing the actual location versus the expected location of a platform or profile as an example.

I'd like to propose adding three optional inputs to the location_test that define a target location (target_lon [degree_east], target_lat [degree_north]) and an acceptable distance from the target (target_range [m]). _targetlon and _targetlat can either be a single value or an array the same size as the lon and lat inputs.

The location_test would output a SUSPECT flag if the distance from the target is exceeding the provided target_range.

As an example, such location_test can be useful to test:

Although not necessarily considered to be used that way, it could also potentially be used to compare a mobile platform trajectory versus a predefined trajectory.

46 present an implementation of the description above.