Skip to content

Add XML documentation and replace BGGM attributions with NOAA#28

Merged
StreckerCM merged 5 commits intopreviewfrom
docs/issue-11-xml-documentation
Feb 5, 2026
Merged

Add XML documentation and replace BGGM attributions with NOAA#28
StreckerCM merged 5 commits intopreviewfrom
docs/issue-11-xml-documentation

Conversation

@StreckerCM
Copy link
Copy Markdown
Owner

@StreckerCM StreckerCM commented Feb 4, 2026

Summary

  • Add /// XML documentation comments to all public APIs across the GeoMagSharp library
  • Replace all BGGM/BGS (British Geological Survey) attributions with NOAA WMM references, since the BGGM coefficient file is no longer freely available
  • Fix exception class documentation (formatting and inaccurate descriptions)
  • Fix 3 pre-existing bugs discovered during review
  • Clean up file headers (trailing whitespace, incorrect filenames, empty fields)

Closes #11

Attribution Changes

File Change
Calculator.cs Replaced BGGM file header and class summary with NOAA WMM references
GeoMagEnums.cs Updated Algorithm.BGS description from "British Geological Survey" to "Default spherical harmonic algorithm"
CalculationOptions.cs Updated constructor doc comment to remove BGS-specific reference
README.md Replaced BGS credit line with NOAA WMM reference

Bug Fixes

File Bug Fix
Longitude.cs Copy constructor took Latitude parameter instead of Longitude Changed parameter type to Longitude
MagneticModel.cs Copy constructor SharmCoeff.AddRange(SharmCoeff) copied from self Changed to SharmCoeff.AddRange(other.SharmCoeff)
Units.cs Distance.ToString(Unit.kilometer) returned "mi" instead of "km" Fixed return value to "km"

XML Documentation Changes

Category Files Items Documented
Core GeoMag.cs, Calculator.cs, ModelReader.cs Class summaries, constructors, all public methods
Exceptions GeoMagException.cs Fixed formatting on 7 exception classes, corrected inaccurate descriptions
Units Units.cs, ExtensionMethods.cs Distance/Angle enums, conversion methods, IsValidYear
Configuration CalculationOptions.cs, Preferences.cs Constructors, properties, Save/Load methods
Coordinates Latitude.cs, Longitude.cs All 4 constructors each
Magnetic Models Coefficients.cs, MagneticModel.cs, MagneticModelSet.cs, MagneticModelCollection.cs Constructors, properties, collection methods, serialization
Results GeoMagVector.cs, MagneticCalculations.cs, MagneticValue.cs Constructors

File Header Cleanup

File Fix
ModelReader.cs Corrected filename from "FileReader.cs", removed empty fields
GeoMag.cs Removed trailing whitespace, empty Warnings/Current version fields
Calculator.cs Complete header rewrite with NOAA references

Test plan

  • Build succeeds with no errors or new warnings
  • All 43 unit tests pass
  • Verify XML docs render correctly in IntelliSense

StreckerCM and others added 2 commits February 3, 2026 21:23
Add /// <summary> XML documentation comments to all public classes,
constructors, methods, properties, and enums across the GeoMagSharp
library. This covers 15 files including GeoMag, Calculator, Units,
ExtensionMethods, and all Model classes (Configuration, Coordinates,
Magnetic, Results).

Closes #11

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
The BGGM coefficient file is no longer freely available from the
British Geological Survey. Updated Calculator.cs header, class
documentation, and enum descriptions to reference the NOAA World
Magnetic Model instead.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@StreckerCM StreckerCM changed the title Add XML documentation to public APIs Add XML documentation and replace BGGM attributions with NOAA Feb 4, 2026
StreckerCM and others added 3 commits February 3, 2026 23:03
- Add class-level XML doc to ModelReader
- Update ModelReader.cs file header (was still referencing FileReader.cs)
- Fix XML doc formatting on all exception classes (///<summary> -> /// <summary>)
- Correct inaccurate exception descriptions (several had copy-paste errors)
- Update README.md credits to reference NOAA WMM instead of BGS

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
- Fix Longitude copy constructor parameter type (Latitude -> Longitude)
- Fix MagneticModel copy constructor copying from self instead of other
- Fix Distance.ToString returning "mi" for kilometer instead of "km"
- Clean up GeoMag.cs file header (trailing whitespace, empty fields)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
…documentation

# Conflicts:
#	GeoMagSharp/ModelReader.cs
@StreckerCM StreckerCM merged commit abdb737 into preview Feb 5, 2026
1 check passed
StreckerCM added a commit that referenced this pull request Feb 13, 2026
- Add XML documentation comments to all public APIs across GeoMagSharp library
- Replace BGGM/BGS attributions with NOAA WMM references
- Fix exception class documentation (formatting and inaccurate descriptions)
- Fix Longitude copy constructor parameter type (Latitude -> Longitude)
- Fix MagneticModel copy constructor copying from self instead of other
- Fix Distance.ToString returning "mi" for kilometer instead of "km"
- Clean up file headers (trailing whitespace, incorrect filenames, empty fields)
- Update README.md credits

Closes #11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant