Dependent types are nice, but much what the grandparent wants can be achieved fine with normal types. E.g. in Haskell, define the Longitude type and some helper functions
And don't export the Longitude constructor to maintain invariants. Obviously, the same can be done in OO languages that allow you to hide members, C (via opaque pointers), etc.
Dependent types to the rescue!