Magnetic variation returns as zero even if there is GPS fix
curl -s http://localhost:80/signalk/v1/api/vessels/self/navigation/magneticVariation/value
returns zero.
It seems comes from gpsd
navigation.magneticVariation 0 rad 04/17 04:18:50 gpsd.GN (RMC) navigation.magneticVariation 0 rad 04/17 04:18:50 gpsd.GP (RMC) navigation.magneticVariationAgeOfService 1618647530 s 04/17 04:18:50 gpsd.GN (RMC) navigation.magneticVariationAgeOfService 1618647530 s 04/17 04:18:50 gpsd.GP (RMC)
The issue is most probably with your input data. There is no special processing for this in the server.
Record some data and take a look with Data Fiddler.
geographiclib has tools to calculate it properly based on time and location. No other inputs are required.
https://geographiclib.sourceforge.io/html/magnetic.html
Closing as stale