Soz the function accepst the bpy.blahblah.cubesat.location param, does some calculations on the longitude, latitude, and altitude of the cubesat with respect to the origin, then calls the pyIGRF function which returns a bunch of stuff but namely the x, y, z, and magnitude of the magnetic field vector in terms of the North East Down coordinate system. There's a short description of what that means for the vectors in some comments.
Soz the function accepst the bpy.blahblah.cubesat.location param, does some calculations on the longitude, latitude, and altitude of the cubesat with respect to the origin, then calls the pyIGRF function which returns a bunch of stuff but namely the x, y, z, and magnitude of the magnetic field vector in terms of the North East Down coordinate system. There's a short description of what that means for the vectors in some comments.