# lansalot/agopengps architecture

> Architecture diagram of the GitHub repository lansalot/agopengps, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lansalot/agopengps
- Repository: https://github.com/lansalot/agopengps

## Overview

AgOpenGPS is agricultural precision-mapping and machine-guidance software, accompanied by AgIO, a communications hub. The main workflow takes GPS/NMEA position input into the guidance application, where field geometry and guidance models support mapping, steering guidance, and implement section control; AgIO and companion tools exchange or simulate device communications. The tree and README establish these capabilities, but sampled source is limited, so several links represent documented behavior rather than inspected call sites.

Main entry points: [`SourceCode/GPS/Forms/FormGPS.cs`](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Forms/FormGPS.cs) (GPS Interface), [`SourceCode/AgIO/Source/Program.cs`](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Program.cs) (AgIO Hub), [`SourceCode/GPS/Program.cs`](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Program.cs) (AgOpenGPS), [`SourceCode/GPS/Classes/CNMEA.cs`](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Classes/CNMEA.cs) (NMEA Processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_apps["Applications"]
  node_gpsapp["AgOpenGPS<br/>[Program.cs]"]
  node_mainform["GPS Interface<br/>[FormGPS.cs]"]
end

subgraph group_comm["Communications"]
  node_agio["AgIO Hub<br/>[Program.cs]"]
  node_commform["Communication UI<br/>[FormLoop.cs]"]
  node_nmea["NMEA Processing<br/>[CNMEA.cs]"]
  node_udp["UDP Transport<br/>[FormUDP.cs]"]
  node_serial["Serial Transport"]
  node_gpsout["GPS Output<br/>[Program.cs]"]
  node_sim["Module Simulator<br/>[FormSim.cs]"]
end

subgraph group_field["Field and Guidance"]
  node_fieldmodels["Field Models<br/>[Field.cs]"]
  node_fieldio["Field Files<br/>[TrackFiles.cs]"]
  node_guidance["Guidance Engine<br/>[CGuidance.cs]"]
  node_sections["Section Control<br/>[CSection.cs]"]
  node_renderer["Map Rendering<br/>[GLW.cs]"]
end

subgraph group_integrations["Sharing and Updates"]
  node_agshareui["Field Sharing UI"]
  node_agshare["AgShare Client<br/>[AgShareClient.cs]"]
  node_updater["Updater<br/>[UpdateService.cs]"]
  node_firmware["Firmware Update UI"]
end

subgraph group_core["Shared Core"]
  node_coremodel["Application Model"]
  node_settings["XML Settings"]
end

node_operator(("Operator"))
node_shareapi{{"AgShare Service"}}
node_github{{"GitHub Releases"}}

node_operator -->|"starts"| node_gpsapp
node_gpsapp -->|"opens"| node_mainform
node_operator -->|"starts"| node_agio
node_agio -->|"opens"| node_commform
node_agio -->|"configures"| node_udp
node_agio -->|"configures"| node_serial
node_operator -->|"runs"| node_sim
node_operator -->|"runs"| node_gpsout
node_agio -.->|"relays position"| node_nmea
node_nmea -.->|"supplies position"| node_mainform
node_mainform -.->|"uses field"| node_fieldmodels
node_fieldmodels -.->|"persists field"| node_fieldio
node_mainform -.->|"requests guidance"| node_guidance
node_mainform -.->|"controls sections"| node_sections
node_mainform -.->|"renders map"| node_renderer
node_operator -->|"shares field"| node_agshareui
node_agshareui -.->|"requests transfer"| node_agshare
node_agshare -->|"exchanges fields"| node_shareapi
node_operator -->|"checks updates"| node_updater
node_updater -->|"checks releases"| node_github
node_operator -->|"opens firmware update"| node_firmware
node_mainform -.->|"uses state"| node_coremodel
node_agio -.->|"loads settings"| node_settings

click node_gpsapp "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Program.cs"
click node_mainform "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Forms/FormGPS.cs"
click node_agio "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Program.cs"
click node_commform "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Forms/FormLoop.cs"
click node_nmea "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Classes/CNMEA.cs"
click node_udp "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Forms/FormUDP.cs"
click node_serial "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Forms/SerialComm.Designer.cs"
click node_gpsout "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS_Out/Source/Program.cs"
click node_sim "https://github.com/lansalot/agopengps/blob/develop/SourceCode/ModSim/Source/Forms/FormSim.cs"
click node_fieldmodels "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/Models/Field/Field.cs"
click node_fieldio "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/IO/TrackFiles.cs"
click node_guidance "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Classes/CGuidance.cs"
click node_sections "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Classes/CSection.cs"
click node_renderer "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/DrawLib/GLW.cs"
click node_agshareui "https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Forms/Field/FormAgShareUploader.cs"
click node_agshare "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/AgShare/AgShareClient.cs"
click node_updater "https://github.com/lansalot/agopengps/blob/develop/SourceCode/Updater/Services/UpdateService.cs"
click node_firmware "https://github.com/lansalot/agopengps/blob/develop/SourceCode/Updater/Forms/FormFirmwareUpdate.cs"
click node_coremodel "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/Models/ApplicationModel.cs"
click node_settings "https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgLibrary/Settings/XmlSettingsHandler.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gpsapp,node_mainform toneBlue
class node_agio,node_commform,node_nmea,node_udp,node_serial,node_gpsout,node_sim toneAmber
class node_fieldmodels,node_fieldio,node_guidance,node_sections,node_renderer toneMint
class node_agshareui,node_agshare,node_updater,node_firmware toneRose
class node_coremodel,node_settings,node_operator,node_shareapi,node_github toneIndigo
```

## Components

### Applications

- [AgOpenGPS](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Program.cs): `SourceCode/GPS/Program.cs`
- [GPS Interface](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Forms/FormGPS.cs): `SourceCode/GPS/Forms/FormGPS.cs`

### Communications

- [AgIO Hub](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Program.cs): `SourceCode/AgIO/Source/Program.cs`
- [Communication UI](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Forms/FormLoop.cs): `SourceCode/AgIO/Source/Forms/FormLoop.cs`
- [NMEA Processing](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Classes/CNMEA.cs): `SourceCode/GPS/Classes/CNMEA.cs`
- [UDP Transport](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Forms/FormUDP.cs): `SourceCode/AgIO/Source/Forms/FormUDP.cs`
- [Serial Transport](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgIO/Source/Forms/SerialComm.Designer.cs): `SourceCode/AgIO/Source/Forms/SerialComm.Designer.cs`
- [GPS Output](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS_Out/Source/Program.cs): `SourceCode/GPS_Out/Source/Program.cs`
- [Module Simulator](https://github.com/lansalot/agopengps/blob/develop/SourceCode/ModSim/Source/Forms/FormSim.cs): `SourceCode/ModSim/Source/Forms/FormSim.cs`

### Field and Guidance

- [Field Models](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/Models/Field/Field.cs): `SourceCode/AgOpenGPS.Core/Models/Field/Field.cs`
- [Field Files](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/IO/TrackFiles.cs): `SourceCode/GPS/IO/TrackFiles.cs`
- [Guidance Engine](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Classes/CGuidance.cs): `SourceCode/GPS/Classes/CGuidance.cs`
- [Section Control](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Classes/CSection.cs): `SourceCode/GPS/Classes/CSection.cs`
- [Map Rendering](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/DrawLib/GLW.cs): `SourceCode/AgOpenGPS.Core/DrawLib/GLW.cs`

### Sharing and Updates

- [Field Sharing UI](https://github.com/lansalot/agopengps/blob/develop/SourceCode/GPS/Forms/Field/FormAgShareUploader.cs): `SourceCode/GPS/Forms/Field/FormAgShareUploader.cs`
- [AgShare Client](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/AgShare/AgShareClient.cs): `SourceCode/AgOpenGPS.Core/AgShare/AgShareClient.cs`
- [Updater](https://github.com/lansalot/agopengps/blob/develop/SourceCode/Updater/Services/UpdateService.cs): `SourceCode/Updater/Services/UpdateService.cs`
- [Firmware Update UI](https://github.com/lansalot/agopengps/blob/develop/SourceCode/Updater/Forms/FormFirmwareUpdate.cs): `SourceCode/Updater/Forms/FormFirmwareUpdate.cs`

### Shared Core

- [Application Model](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgOpenGPS.Core/Models/ApplicationModel.cs): `SourceCode/AgOpenGPS.Core/Models/ApplicationModel.cs`
- [XML Settings](https://github.com/lansalot/agopengps/blob/develop/SourceCode/AgLibrary/Settings/XmlSettingsHandler.cs): `SourceCode/AgLibrary/Settings/XmlSettingsHandler.cs`

### Other components

- **Operator**
- **AgShare Service**
- **GitHub Releases**

## Connections

- Operator → AgOpenGPS: starts
- AgOpenGPS → GPS Interface: opens
- Operator → AgIO Hub: starts
- AgIO Hub → Communication UI: opens
- AgIO Hub → UDP Transport: configures
- AgIO Hub → Serial Transport: configures
- Operator → Module Simulator: runs
- Operator → GPS Output: runs
- AgIO Hub → NMEA Processing: relays position
- NMEA Processing → GPS Interface: supplies position
- GPS Interface → Field Models: uses field
- Field Models → Field Files: persists field
- GPS Interface → Guidance Engine: requests guidance
- GPS Interface → Section Control: controls sections
- GPS Interface → Map Rendering: renders map
- Operator → Field Sharing UI: shares field
- Field Sharing UI → AgShare Client: requests transfer
- AgShare Client → AgShare Service: exchanges fields
- Operator → Updater: checks updates
- Updater → GitHub Releases: checks releases
- Operator → Firmware Update UI: opens firmware update
- GPS Interface → Application Model: uses state
- AgIO Hub → XML Settings: loads settings
