Comrade said:
From what I know, the proper name for "analog ones" is linear, and latching for "digital ones".
Not all analog ones use a linear output curve. You may read posts or pages that equate them, but they are not exactly the same thing. A linear output sensor is analog output, but an analog output sensor isn't always linear output.
Latching means exactly that--the output latches on once a magnet has activated it (per whatever specifications that specific sensor has. A latching output sensor is generally a digital output sensor too (I haven't worked with any analog output latching ones yet), but a digital output sensor is not always latching.
Latching means there is a specific Gauss strength they need to latch "on" and a specific Gauss strength to latch "off".
Depends on the sensor. The ones used in motors for this purpose use an opposing polarity, not just a specific strength (though they require that, too). One page that explains more about their latching sensors:
https://www.allegromicro.com/en/insights-and-innovations/technical-documents/hall-effect-sensor-ic-publications/latching-switch-hall-effect-ic-basics
pdf version
https://www.allegromicro.com/-/media/files/application-notes/an296067-latching-switch-hall-effect-ic-basics.ashx
They have other documents talking about their other types:
https://www.allegromicro.com/en/insights-and-innovations/technical-documents/hall-effect-sensor-ic-publications/unipolar-hall-effect-sensor-ic-basics
https://www.allegromicro.com/en/products/sense/switches-and-latches/micropower-switches-latches
https://www.allegromicro.com/en/insights-and-innovations/technical-documents/hall-effect-sensor-ic-publications/bipolar-switch-hall-effect-ics
So a hall sensor that might work well in this context would latch at say 100 and release at say 50. So it will produce a square wave as the magnet comes closer and then gets too far.
That sounds more like a Bipolar sensor.
https://www.allegromicro.com/en/insights-and-innovations/technical-documents/hall-effect-sensor-ic-publications/bipolar-switch-hall-effect-ics
I'm not sure how a glued down magnet would generate an opposite polarity magnetic field.
The magnets in a typical BLDC motor are installed in alternating polarities. Other motor types may also be. You'd have to check any specific motor you are working with. (use a magnet you know to be polarized in a specific way, and see which magnet faces repel it and which attract it (don't ge it too close to the magnets under test or you may lose hold of it and it could crack them on impact), or use a magnetic sensor tool that tells you. A tiny compass might work but it may be too swamped by the surrounding fields to flip properly).