It is short and simple, but there are a few things that can be improved.
The Slave is constantly hammered with I2C sessions. If the Slave is a simple 16MHz Arduino board (such as you Nano), then it needs "time to breathe". Even a 'delay(1);' of 1 millisecond in the loop() of the Master is enough.
I prefer that you define how often that variable needs to be updated. Is twice per second enough, then make the delay 500ms.
In the Slave, you should start with 'Wire.begin(9);', and after that, do other Wire functions, such as Wire.onRequest() and Wire.onReceive().
Some improvements can be made in the overall working of the code:
- It is easier to use just one I2C sessions that transfers all the 4 bytes.
- Variables that are used in the loop() and in interrupts should be 'volatile'.
- The Slave loop() sets the variable 'sendGPS' over and over again. It needs to be set only once after a command from via the I2C bus.